仿互站小程序
This commit is contained in:
21
vant/col/index.js
Normal file
21
vant/col/index.js
Normal file
@@ -0,0 +1,21 @@
|
||||
(0, require("../common/component").VantComponent)({
|
||||
relation: {
|
||||
name: "row",
|
||||
type: "ancestor"
|
||||
},
|
||||
props: {
|
||||
span: Number,
|
||||
offset: Number
|
||||
},
|
||||
data: {
|
||||
style: ""
|
||||
},
|
||||
methods: {
|
||||
setGutter: function(t) {
|
||||
var e = t / 2 + "px", n = t ? "padding-left: " + e + "; padding-right: " + e + ";" : "";
|
||||
n !== this.data.style && this.set({
|
||||
style: n
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
13
vant/col/index.json
Normal file
13
vant/col/index.json
Normal 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"
|
||||
}
|
||||
}
|
4
vant/col/index.wxml
Normal file
4
vant/col/index.wxml
Normal file
@@ -0,0 +1,4 @@
|
||||
<view class="custom-class {{utils.bem( 'col',[span] )}} {{offset?'van-col--offset-'+offset:''}}" style="{{style}}">
|
||||
<slot></slot>
|
||||
</view>
|
||||
<wxs module="utils" src="../wxs/utils.wxs" />
|
198
vant/col/index.wxss
Normal file
198
vant/col/index.wxss
Normal file
@@ -0,0 +1,198 @@
|
||||
@import "../area/index.wxss";
|
||||
|
||||
.van-col {
|
||||
float: left;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.van-col--1 {
|
||||
width: 4.16666667%;
|
||||
}
|
||||
|
||||
.van-col--offset-1 {
|
||||
margin-left: 4.16666667%;
|
||||
}
|
||||
|
||||
.van-col--2 {
|
||||
width: 8.33333333%;
|
||||
}
|
||||
|
||||
.van-col--offset-2 {
|
||||
margin-left: 8.33333333%;
|
||||
}
|
||||
|
||||
.van-col--3 {
|
||||
width: 12.5%;
|
||||
}
|
||||
|
||||
.van-col--offset-3 {
|
||||
margin-left: 12.5%;
|
||||
}
|
||||
|
||||
.van-col--4 {
|
||||
width: 16.66666667%;
|
||||
}
|
||||
|
||||
.van-col--offset-4 {
|
||||
margin-left: 16.66666667%;
|
||||
}
|
||||
|
||||
.van-col--5 {
|
||||
width: 20.83333333%;
|
||||
}
|
||||
|
||||
.van-col--offset-5 {
|
||||
margin-left: 20.83333333%;
|
||||
}
|
||||
|
||||
.van-col--6 {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.van-col--offset-6 {
|
||||
margin-left: 25%;
|
||||
}
|
||||
|
||||
.van-col--7 {
|
||||
width: 29.16666667%;
|
||||
}
|
||||
|
||||
.van-col--offset-7 {
|
||||
margin-left: 29.16666667%;
|
||||
}
|
||||
|
||||
.van-col--8 {
|
||||
width: 33.33333333%;
|
||||
}
|
||||
|
||||
.van-col--offset-8 {
|
||||
margin-left: 33.33333333%;
|
||||
}
|
||||
|
||||
.van-col--9 {
|
||||
width: 37.5%;
|
||||
}
|
||||
|
||||
.van-col--offset-9 {
|
||||
margin-left: 37.5%;
|
||||
}
|
||||
|
||||
.van-col--10 {
|
||||
width: 41.66666667%;
|
||||
}
|
||||
|
||||
.van-col--offset-10 {
|
||||
margin-left: 41.66666667%;
|
||||
}
|
||||
|
||||
.van-col--11 {
|
||||
width: 45.83333333%;
|
||||
}
|
||||
|
||||
.van-col--offset-11 {
|
||||
margin-left: 45.83333333%;
|
||||
}
|
||||
|
||||
.van-col--12 {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.van-col--offset-12 {
|
||||
margin-left: 50%;
|
||||
}
|
||||
|
||||
.van-col--13 {
|
||||
width: 54.16666667%;
|
||||
}
|
||||
|
||||
.van-col--offset-13 {
|
||||
margin-left: 54.16666667%;
|
||||
}
|
||||
|
||||
.van-col--14 {
|
||||
width: 58.33333333%;
|
||||
}
|
||||
|
||||
.van-col--offset-14 {
|
||||
margin-left: 58.33333333%;
|
||||
}
|
||||
|
||||
.van-col--15 {
|
||||
width: 62.5%;
|
||||
}
|
||||
|
||||
.van-col--offset-15 {
|
||||
margin-left: 62.5%;
|
||||
}
|
||||
|
||||
.van-col--16 {
|
||||
width: 66.66666667%;
|
||||
}
|
||||
|
||||
.van-col--offset-16 {
|
||||
margin-left: 66.66666667%;
|
||||
}
|
||||
|
||||
.van-col--17 {
|
||||
width: 70.83333333%;
|
||||
}
|
||||
|
||||
.van-col--offset-17 {
|
||||
margin-left: 70.83333333%;
|
||||
}
|
||||
|
||||
.van-col--18 {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.van-col--offset-18 {
|
||||
margin-left: 75%;
|
||||
}
|
||||
|
||||
.van-col--19 {
|
||||
width: 79.16666667%;
|
||||
}
|
||||
|
||||
.van-col--offset-19 {
|
||||
margin-left: 79.16666667%;
|
||||
}
|
||||
|
||||
.van-col--20 {
|
||||
width: 83.33333333%;
|
||||
}
|
||||
|
||||
.van-col--offset-20 {
|
||||
margin-left: 83.33333333%;
|
||||
}
|
||||
|
||||
.van-col--21 {
|
||||
width: 87.5%;
|
||||
}
|
||||
|
||||
.van-col--offset-21 {
|
||||
margin-left: 87.5%;
|
||||
}
|
||||
|
||||
.van-col--22 {
|
||||
width: 91.66666667%;
|
||||
}
|
||||
|
||||
.van-col--offset-22 {
|
||||
margin-left: 91.66666667%;
|
||||
}
|
||||
|
||||
.van-col--23 {
|
||||
width: 95.83333333%;
|
||||
}
|
||||
|
||||
.van-col--offset-23 {
|
||||
margin-left: 95.83333333%;
|
||||
}
|
||||
|
||||
.van-col--24 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-col--offset-24 {
|
||||
margin-left: 100%;
|
||||
}
|
Reference in New Issue
Block a user