仿互站小程序
This commit is contained in:
42
vant/switch-cell/index.js
Normal file
42
vant/switch-cell/index.js
Normal file
@@ -0,0 +1,42 @@
|
||||
(0, require("../common/component").VantComponent)({
|
||||
field: !0,
|
||||
props: {
|
||||
value: null,
|
||||
title: String,
|
||||
border: Boolean,
|
||||
checked: Boolean,
|
||||
loading: Boolean,
|
||||
disabled: Boolean,
|
||||
activeColor: String,
|
||||
inactiveColor: String,
|
||||
size: {
|
||||
type: String,
|
||||
value: "24px"
|
||||
},
|
||||
activeValue: {
|
||||
type: null,
|
||||
value: !0
|
||||
},
|
||||
inactiveValue: {
|
||||
type: null,
|
||||
value: !1
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
checked: function(e) {
|
||||
this.set({
|
||||
value: e
|
||||
});
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
this.set({
|
||||
value: this.data.checked
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
onChange: function(e) {
|
||||
this.$emit("change", e.detail);
|
||||
}
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user