Skip to content

Commit ca2ad60

Browse files
committed
fix: input type ts
1 parent 26496ba commit ca2ad60

File tree

1 file changed

+26
-22
lines changed

1 file changed

+26
-22
lines changed

components/input/inputProps.ts

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { ExtractPropTypes, PropType } from 'vue';
22
import PropTypes from '../_util/vue-types';
33
import type { SizeType } from '../config-provider';
44
import omit from '../_util/omit';
5+
import type { LiteralUnion } from '../_util/type';
56
export const inputDefaultValue = Symbol() as unknown as string;
67
const inputProps = {
78
id: PropTypes.string,
@@ -18,28 +19,31 @@ const inputProps = {
1819
autocomplete: String,
1920
type: {
2021
type: String as PropType<
21-
| 'button'
22-
| 'checkbox'
23-
| 'color'
24-
| 'date'
25-
| 'datetime-local'
26-
| 'email'
27-
| 'file'
28-
| 'hidden'
29-
| 'image'
30-
| 'month'
31-
| 'number'
32-
| 'password'
33-
| 'radio'
34-
| 'range'
35-
| 'reset'
36-
| 'search'
37-
| 'submit'
38-
| 'tel'
39-
| 'text'
40-
| 'time'
41-
| 'url'
42-
| 'week'
22+
LiteralUnion<
23+
| 'button'
24+
| 'checkbox'
25+
| 'color'
26+
| 'date'
27+
| 'datetime-local'
28+
| 'email'
29+
| 'file'
30+
| 'hidden'
31+
| 'image'
32+
| 'month'
33+
| 'number'
34+
| 'password'
35+
| 'radio'
36+
| 'range'
37+
| 'reset'
38+
| 'search'
39+
| 'submit'
40+
| 'tel'
41+
| 'text'
42+
| 'time'
43+
| 'url'
44+
| 'week',
45+
string
46+
>
4347
>,
4448
default: 'text',
4549
},

0 commit comments

Comments
 (0)