diff --git a/packages/area/index.ts b/packages/area/index.ts index c657961e..ea338929 100644 --- a/packages/area/index.ts +++ b/packages/area/index.ts @@ -27,8 +27,7 @@ VantComponent({ observer: 'setValues', }, columnsNum: { - type: Number, - optionalTypes: [String], + type: null, value: 3, }, columnsPlaceholder: { diff --git a/packages/checkbox/index.ts b/packages/checkbox/index.ts index 10ed8e7f..e380c74e 100644 --- a/packages/checkbox/index.ts +++ b/packages/checkbox/index.ts @@ -31,8 +31,7 @@ VantComponent({ value: 'round', }, iconSize: { - type: Number, - optionalTypes: [String], + type: null, value: 20, }, }, diff --git a/packages/circle/index.ts b/packages/circle/index.ts index 53d27ab4..28d73067 100644 --- a/packages/circle/index.ts +++ b/packages/circle/index.ts @@ -41,8 +41,7 @@ VantComponent({ value: WHITE, }, color: { - type: String, - optionalTypes: [Object], + type: null, value: BLUE, observer() { this.setHoverColor().then(() => { diff --git a/packages/grid/index.ts b/packages/grid/index.ts index 39af3181..0fa96bcc 100644 --- a/packages/grid/index.ts +++ b/packages/grid/index.ts @@ -10,8 +10,7 @@ VantComponent({ observer: 'updateChildren', }, gutter: { - type: Number, - optionalTypes: [String], + type: null, value: 0, observer: 'updateChildren', }, diff --git a/packages/overlay/index.ts b/packages/overlay/index.ts index eab4b8bd..0fdfa777 100644 --- a/packages/overlay/index.ts +++ b/packages/overlay/index.ts @@ -5,8 +5,7 @@ VantComponent({ show: Boolean, customStyle: String, duration: { - type: Number, - optionalTypes: [String], + type: null, value: 300, }, zIndex: { diff --git a/packages/progress/index.ts b/packages/progress/index.ts index e048a54d..becb6233 100644 --- a/packages/progress/index.ts +++ b/packages/progress/index.ts @@ -25,9 +25,8 @@ VantComponent({ value: '#fff', }, strokeWidth: { - type: Number, + type: null, value: 4, - optionalTypes: [String], }, }, diff --git a/packages/radio/index.ts b/packages/radio/index.ts index 4e8220f2..4f0ffc3e 100644 --- a/packages/radio/index.ts +++ b/packages/radio/index.ts @@ -27,8 +27,7 @@ VantComponent({ value: 'round', }, iconSize: { - type: Number, - optionalTypes: [String], + type: null, value: 20, }, }, diff --git a/packages/share-sheet/index.ts b/packages/share-sheet/index.ts index a9ffe2da..029d7246 100644 --- a/packages/share-sheet/index.ts +++ b/packages/share-sheet/index.ts @@ -34,8 +34,7 @@ VantComponent({ value: true, }, duration: { - type: Number, - optionalTypes: [String], + type: null, value: 300, }, }, diff --git a/packages/skeleton/index.ts b/packages/skeleton/index.ts index b9b2e8f4..a41e33e8 100644 --- a/packages/skeleton/index.ts +++ b/packages/skeleton/index.ts @@ -33,10 +33,9 @@ VantComponent({ value: '40%', }, rowWidth: { - type: String, - optionalTypes: [Array], + type: null, value: '100%', - observer(val: string | string[]) { + observer(val) { this.setData({ isArray: val instanceof Array }); }, }, diff --git a/packages/slider/index.ts b/packages/slider/index.ts index 1b7367e1..1e0a02dd 100644 --- a/packages/slider/index.ts +++ b/packages/slider/index.ts @@ -27,9 +27,8 @@ VantComponent({ value: 1, }, value: { - type: Number, + type: null, value: 0, - optionalTypes: [Array], observer(val) { if (val !== this.value) { this.updateValue(val); diff --git a/packages/swipe-cell/index.ts b/packages/swipe-cell/index.ts index 258e1527..ae593c6c 100644 --- a/packages/swipe-cell/index.ts +++ b/packages/swipe-cell/index.ts @@ -28,8 +28,7 @@ VantComponent({ }, asyncClose: Boolean, name: { - type: String, - optionalTypes: [Number], + type: null, value: '', }, }, diff --git a/packages/tabs/index.ts b/packages/tabs/index.ts index 4ef9a1d0..3f932388 100644 --- a/packages/tabs/index.ts +++ b/packages/tabs/index.ts @@ -37,14 +37,12 @@ VantComponent({ }, }, lineWidth: { - type: Number, - optionalTypes: [String], + type: null, value: 40, observer: 'resize', }, lineHeight: { - type: Number, - optionalTypes: [String], + type: null, value: -1, }, active: { diff --git a/packages/tree-select/index.ts b/packages/tree-select/index.ts index aca18cd1..ff46fdaa 100644 --- a/packages/tree-select/index.ts +++ b/packages/tree-select/index.ts @@ -22,8 +22,7 @@ VantComponent({ observer: 'updateSubItems', }, height: { - type: Number, - optionalTypes: [String], + type: null, value: 300, }, max: { diff --git a/packages/uploader/index.ts b/packages/uploader/index.ts index 0f44bf25..0ab1c44f 100644 --- a/packages/uploader/index.ts +++ b/packages/uploader/index.ts @@ -12,13 +12,11 @@ VantComponent({ afterRead: null, beforeRead: null, previewSize: { - type: Number, - optionalTypes: [String], + type: null, value: 80, }, name: { - type: String, - optionalTypes: [Number], + type: null, value: '', }, accept: {