mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-05-23 23:19:15 +08:00
refactor(VantComponent): remove null type (#4476)
This commit is contained in:
parent
687c7c10f9
commit
e2e0a2bcb1
@ -27,7 +27,8 @@ VantComponent({
|
|||||||
observer: 'setValues',
|
observer: 'setValues',
|
||||||
},
|
},
|
||||||
columnsNum: {
|
columnsNum: {
|
||||||
type: null,
|
type: Number,
|
||||||
|
optionalTypes: [String],
|
||||||
value: 3,
|
value: 3,
|
||||||
},
|
},
|
||||||
columnsPlaceholder: {
|
columnsPlaceholder: {
|
||||||
|
@ -31,7 +31,8 @@ VantComponent({
|
|||||||
value: 'round',
|
value: 'round',
|
||||||
},
|
},
|
||||||
iconSize: {
|
iconSize: {
|
||||||
type: null,
|
type: Number,
|
||||||
|
optionalTypes: [String],
|
||||||
value: 20,
|
value: 20,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -41,7 +41,8 @@ VantComponent({
|
|||||||
value: WHITE,
|
value: WHITE,
|
||||||
},
|
},
|
||||||
color: {
|
color: {
|
||||||
type: null,
|
type: String,
|
||||||
|
optionalTypes: [Object],
|
||||||
value: BLUE,
|
value: BLUE,
|
||||||
observer() {
|
observer() {
|
||||||
this.setHoverColor().then(() => {
|
this.setHoverColor().then(() => {
|
||||||
|
@ -10,7 +10,8 @@ VantComponent({
|
|||||||
observer: 'updateChildren',
|
observer: 'updateChildren',
|
||||||
},
|
},
|
||||||
gutter: {
|
gutter: {
|
||||||
type: null,
|
type: Number,
|
||||||
|
optionalTypes: [String],
|
||||||
value: 0,
|
value: 0,
|
||||||
observer: 'updateChildren',
|
observer: 'updateChildren',
|
||||||
},
|
},
|
||||||
|
@ -5,7 +5,8 @@ VantComponent({
|
|||||||
show: Boolean,
|
show: Boolean,
|
||||||
customStyle: String,
|
customStyle: String,
|
||||||
duration: {
|
duration: {
|
||||||
type: null,
|
type: Number,
|
||||||
|
optionalTypes: [String],
|
||||||
value: 300,
|
value: 300,
|
||||||
},
|
},
|
||||||
zIndex: {
|
zIndex: {
|
||||||
|
@ -27,7 +27,8 @@ VantComponent({
|
|||||||
value: 'round',
|
value: 'round',
|
||||||
},
|
},
|
||||||
iconSize: {
|
iconSize: {
|
||||||
type: null,
|
type: Number,
|
||||||
|
optionalTypes: [String],
|
||||||
value: 20,
|
value: 20,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -34,7 +34,8 @@ VantComponent({
|
|||||||
value: true,
|
value: true,
|
||||||
},
|
},
|
||||||
duration: {
|
duration: {
|
||||||
type: null,
|
type: Number,
|
||||||
|
optionalTypes: [String],
|
||||||
value: 300,
|
value: 300,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -33,9 +33,10 @@ VantComponent({
|
|||||||
value: '40%',
|
value: '40%',
|
||||||
},
|
},
|
||||||
rowWidth: {
|
rowWidth: {
|
||||||
type: null,
|
type: String,
|
||||||
|
optionalTypes: [Array],
|
||||||
value: '100%',
|
value: '100%',
|
||||||
observer(val) {
|
observer(val: string | string[]) {
|
||||||
this.setData({ isArray: val instanceof Array });
|
this.setData({ isArray: val instanceof Array });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -28,7 +28,8 @@ VantComponent({
|
|||||||
},
|
},
|
||||||
asyncClose: Boolean,
|
asyncClose: Boolean,
|
||||||
name: {
|
name: {
|
||||||
type: null,
|
type: String,
|
||||||
|
optionalTypes: [Number],
|
||||||
value: '',
|
value: '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -37,12 +37,14 @@ VantComponent({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
lineWidth: {
|
lineWidth: {
|
||||||
type: null,
|
type: Number,
|
||||||
|
optionalTypes: [String],
|
||||||
value: 40,
|
value: 40,
|
||||||
observer: 'resize',
|
observer: 'resize',
|
||||||
},
|
},
|
||||||
lineHeight: {
|
lineHeight: {
|
||||||
type: null,
|
type: Number,
|
||||||
|
optionalTypes: [String],
|
||||||
value: -1,
|
value: -1,
|
||||||
},
|
},
|
||||||
active: {
|
active: {
|
||||||
@ -98,7 +100,7 @@ VantComponent({
|
|||||||
scrollLeft: 0,
|
scrollLeft: 0,
|
||||||
scrollable: false,
|
scrollable: false,
|
||||||
currentIndex: 0,
|
currentIndex: 0,
|
||||||
container: null as unknown as () => WechatMiniprogram.NodesRef,
|
container: (null as unknown) as () => WechatMiniprogram.NodesRef,
|
||||||
skipTransition: true,
|
skipTransition: true,
|
||||||
scrollWithAnimation: false,
|
scrollWithAnimation: false,
|
||||||
lineOffsetLeft: 0,
|
lineOffsetLeft: 0,
|
||||||
|
@ -22,7 +22,8 @@ VantComponent({
|
|||||||
observer: 'updateSubItems',
|
observer: 'updateSubItems',
|
||||||
},
|
},
|
||||||
height: {
|
height: {
|
||||||
type: null,
|
type: Number,
|
||||||
|
optionalTypes: [String],
|
||||||
value: 300,
|
value: 300,
|
||||||
},
|
},
|
||||||
max: {
|
max: {
|
||||||
|
@ -12,11 +12,13 @@ VantComponent({
|
|||||||
afterRead: null,
|
afterRead: null,
|
||||||
beforeRead: null,
|
beforeRead: null,
|
||||||
previewSize: {
|
previewSize: {
|
||||||
type: null,
|
type: Number,
|
||||||
|
optionalTypes: [String],
|
||||||
value: 80,
|
value: 80,
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
type: null,
|
type: String,
|
||||||
|
optionalTypes: [Number],
|
||||||
value: '',
|
value: '',
|
||||||
},
|
},
|
||||||
accept: {
|
accept: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user