仿互站小程序

This commit is contained in:
Drawfans
2020-06-09 16:17:23 +08:00
commit 7bfd53851e
321 changed files with 22890 additions and 0 deletions

43
vant/radio-group/index.js Normal file
View File

@@ -0,0 +1,43 @@
(0, require("../common/component").VantComponent)({
field: !0,
relation: {
name: "radio",
type: "descendant",
linked: function(e) {
var a = this.data, d = a.value, n = a.disabled, i = a.checkedClass;
e.set({
value: d,
disabled: n || e.data.disabled,
checkedClass: i
});
}
},
props: {
value: null,
disabled: Boolean,
checkedClass: null
},
watch: {
value: function(e) {
this.getRelationNodes("../radio/index").forEach(function(a) {
a.set({
value: e
});
});
},
checkedClass: function(e) {
this.getRelationNodes("../radio/index").forEach(function(a) {
a.set({
checkedClass: e
});
});
},
disabled: function(e) {
this.getRelationNodes("../radio/index").forEach(function(a) {
a.set({
disabled: e || a.data.disabled
});
});
}
}
});

View File

@@ -0,0 +1,13 @@
{
"component": true,
"usingComponents": {
"van-icon": "../icon/index",
"forview": "/utils/forview/index",
"van-loading": "/vant/loading/index",
"van-dialog": "/vant/dialog/index",
"van-button": "/vant/button/index",
"van-popup": "/vant/popup/index",
"van-tab": "/vant/tab/index",
"van-tabs": "/vant/tabs/index"
}
}

View File

@@ -0,0 +1 @@
<slot></slot>

View File

@@ -0,0 +1 @@
@import "../area/index.wxss";