|
|
@@ -94,44 +94,6 @@ import { createComponent } from '@/packages/utils/create';
|
|
|
import { formatNumber } from './util';
|
|
|
|
|
|
const { componentName, create, translate } = createComponent('input');
|
|
|
-interface Events {
|
|
|
- eventName: 'focus' | 'blur' | 'clear' | 'change' | 'update:modelValue';
|
|
|
- params: (string | number | Event)[];
|
|
|
-}
|
|
|
-export type InputAlignType = 'left' | 'center' | 'right'; // text-align
|
|
|
-export type InputFormatTrigger = 'onChange' | 'onBlur'; // onChange: 在输入时执行格式化 ; onBlur: 在失焦时执行格式化
|
|
|
-export type InputType =
|
|
|
- | 'tel'
|
|
|
- | 'url'
|
|
|
- | 'date'
|
|
|
- | 'file'
|
|
|
- | 'text'
|
|
|
- | 'time'
|
|
|
- | 'week'
|
|
|
- | 'color'
|
|
|
- | 'digit'
|
|
|
- | 'email'
|
|
|
- | 'image'
|
|
|
- | 'month'
|
|
|
- | 'radio'
|
|
|
- | 'range'
|
|
|
- | 'reset'
|
|
|
- | 'button'
|
|
|
- | 'hidden'
|
|
|
- | 'number'
|
|
|
- | 'search'
|
|
|
- | 'submit'
|
|
|
- | 'checkbox'
|
|
|
- | 'password'
|
|
|
- | 'textarea'
|
|
|
- | 'datetime-local';
|
|
|
-export type confirmTextType = 'send' | 'search' | 'next' | 'go' | 'done'
|
|
|
-
|
|
|
-export type InputRule = {
|
|
|
- pattern?: RegExp;
|
|
|
- message?: string;
|
|
|
- required?: boolean;
|
|
|
-};
|
|
|
|
|
|
export default create({
|
|
|
props: {
|
|
|
@@ -264,8 +226,9 @@ export default create({
|
|
|
default: false
|
|
|
},
|
|
|
confirmType: {
|
|
|
- type: String as PropType<confirmTextType>,
|
|
|
+ type: String as PropType<import('./type').ConfirmTextType>,
|
|
|
default: 'done'
|
|
|
+ },
|
|
|
adjustPosition: {
|
|
|
type: Boolean,
|
|
|
default: true
|