Browse Source

fix: input type ts

pull/5094/head
tangjinzhou 3 years ago
parent
commit
ca2ad60aef
  1. 6
      components/input/inputProps.ts

6
components/input/inputProps.ts

@ -2,6 +2,7 @@ import type { ExtractPropTypes, PropType } from 'vue';
import PropTypes from '../_util/vue-types'; import PropTypes from '../_util/vue-types';
import type { SizeType } from '../config-provider'; import type { SizeType } from '../config-provider';
import omit from '../_util/omit'; import omit from '../_util/omit';
import type { LiteralUnion } from '../_util/type';
export const inputDefaultValue = Symbol() as unknown as string; export const inputDefaultValue = Symbol() as unknown as string;
const inputProps = { const inputProps = {
id: PropTypes.string, id: PropTypes.string,
@ -18,6 +19,7 @@ const inputProps = {
autocomplete: String, autocomplete: String,
type: { type: {
type: String as PropType< type: String as PropType<
LiteralUnion<
| 'button' | 'button'
| 'checkbox' | 'checkbox'
| 'color' | 'color'
@ -39,7 +41,9 @@ const inputProps = {
| 'text' | 'text'
| 'time' | 'time'
| 'url' | 'url'
| 'week' | 'week',
string
>
>, >,
default: 'text', default: 'text',
}, },

Loading…
Cancel
Save