Commit f1717973c44be7e2a4cdbee0833529ac1cd92dc9

Authored by 前端爱码士
Committed by GitHub
1 parent 0cc53558

fix: 修复props中Array类型定义问题 (#2491)

src/components/Dropdown/src/Dropdown.vue
... ... @@ -57,7 +57,7 @@
57 57 * @type string[]
58 58 */
59 59 trigger: {
60   - type: [Array] as PropType<('contextmenu' | 'click' | 'hover')[]>,
  60 + type: Array as PropType<('contextmenu' | 'click' | 'hover')[]>,
61 61 default: () => {
62 62 return ['contextmenu'];
63 63 },
... ...
src/components/Form/src/props.ts
... ... @@ -23,7 +23,7 @@ export const basicProps = {
23 23 compact: propTypes.bool,
24 24 // 表单配置规则
25 25 schemas: {
26   - type: [Array] as PropType<FormSchema[]>,
  26 + type: Array as PropType<FormSchema[]>,
27 27 default: () => [],
28 28 },
29 29 mergeDynamicData: {
... ...
src/components/Preview/src/Functional.vue
... ... @@ -30,7 +30,7 @@
30 30 default: false,
31 31 },
32 32 imageList: {
33   - type: [Array] as PropType<string[]>,
  33 + type: Array as PropType<string[]>,
34 34 default: null,
35 35 },
36 36 index: {
... ...
src/components/Table/src/props.ts
... ... @@ -84,7 +84,7 @@ export const basicProps = {
84 84 default: null,
85 85 },
86 86 columns: {
87   - type: [Array] as PropType<BasicColumn[]>,
  87 + type: Array as PropType<BasicColumn[]>,
88 88 default: () => [],
89 89 },
90 90 showIndexColumn: { type: Boolean, default: true },
... ...
src/components/Upload/src/props.ts
... ... @@ -69,7 +69,7 @@ export const previewProps = {
69 69  
70 70 export const fileListProps = {
71 71 columns: {
72   - type: [Array] as PropType<FileBasicColumn[]>,
  72 + type: Array as PropType<FileBasicColumn[]>,
73 73 default: null,
74 74 },
75 75 actionColumn: {
... ...