Commit f1717973c44be7e2a4cdbee0833529ac1cd92dc9
Committed by
GitHub
1 parent
0cc53558
fix: 修复props中Array类型定义问题 (#2491)
Showing
5 changed files
with
5 additions
and
5 deletions
src/components/Dropdown/src/Dropdown.vue
@@ -57,7 +57,7 @@ | @@ -57,7 +57,7 @@ | ||
57 | * @type string[] | 57 | * @type string[] |
58 | */ | 58 | */ |
59 | trigger: { | 59 | trigger: { |
60 | - type: [Array] as PropType<('contextmenu' | 'click' | 'hover')[]>, | 60 | + type: Array as PropType<('contextmenu' | 'click' | 'hover')[]>, |
61 | default: () => { | 61 | default: () => { |
62 | return ['contextmenu']; | 62 | return ['contextmenu']; |
63 | }, | 63 | }, |
src/components/Form/src/props.ts
@@ -23,7 +23,7 @@ export const basicProps = { | @@ -23,7 +23,7 @@ export const basicProps = { | ||
23 | compact: propTypes.bool, | 23 | compact: propTypes.bool, |
24 | // 表单配置规则 | 24 | // 表单配置规则 |
25 | schemas: { | 25 | schemas: { |
26 | - type: [Array] as PropType<FormSchema[]>, | 26 | + type: Array as PropType<FormSchema[]>, |
27 | default: () => [], | 27 | default: () => [], |
28 | }, | 28 | }, |
29 | mergeDynamicData: { | 29 | mergeDynamicData: { |
src/components/Preview/src/Functional.vue
src/components/Table/src/props.ts
@@ -84,7 +84,7 @@ export const basicProps = { | @@ -84,7 +84,7 @@ export const basicProps = { | ||
84 | default: null, | 84 | default: null, |
85 | }, | 85 | }, |
86 | columns: { | 86 | columns: { |
87 | - type: [Array] as PropType<BasicColumn[]>, | 87 | + type: Array as PropType<BasicColumn[]>, |
88 | default: () => [], | 88 | default: () => [], |
89 | }, | 89 | }, |
90 | showIndexColumn: { type: Boolean, default: true }, | 90 | showIndexColumn: { type: Boolean, default: true }, |
src/components/Upload/src/props.ts
@@ -69,7 +69,7 @@ export const previewProps = { | @@ -69,7 +69,7 @@ export const previewProps = { | ||
69 | 69 | ||
70 | export const fileListProps = { | 70 | export const fileListProps = { |
71 | columns: { | 71 | columns: { |
72 | - type: [Array] as PropType<FileBasicColumn[]>, | 72 | + type: Array as PropType<FileBasicColumn[]>, |
73 | default: null, | 73 | default: null, |
74 | }, | 74 | }, |
75 | actionColumn: { | 75 | actionColumn: { |