仿互站小程序

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

28
vant/row/index.js Normal file
View File

@@ -0,0 +1,28 @@
(0, require("../common/component").VantComponent)({
relation: {
name: "col",
type: "descendant",
linked: function(t) {
this.data.gutter && t.setGutter(this.data.gutter);
}
},
props: {
gutter: Number
},
watch: {
gutter: "setGutter"
},
mounted: function() {
this.data.gutter && this.setGutter();
},
methods: {
setGutter: function() {
var t = this, e = this.data.gutter, n = "-" + Number(e) / 2 + "px", r = e ? "margin-right: " + n + "; margin-left: " + n + ";" : "";
this.set({
style: r
}), this.getRelationNodes("../col/index").forEach(function(e) {
e.setGutter(t.data.gutter);
});
}
}
});

13
vant/row/index.json Normal file
View File

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

3
vant/row/index.wxml Normal file
View File

@@ -0,0 +1,3 @@
<view class="custom-class van-row" style="{{style}}">
<slot></slot>
</view>

7
vant/row/index.wxss Normal file
View File

@@ -0,0 +1,7 @@
@import "../area/index.wxss";
.van-row:after {
content: "";
display: table;
clear: both;
}