mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 00:45:55 +08:00
微信登录版
This commit is contained in:
26
wechat_v2/miniprogram_npm/@vant/weapp/row/index.js
Normal file
26
wechat_v2/miniprogram_npm/@vant/weapp/row/index.js
Normal file
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
var component_1 = require('../common/component');
|
||||
var relation_1 = require('../common/relation');
|
||||
component_1.VantComponent({
|
||||
relation: relation_1.useChildren('col', function (target) {
|
||||
var gutter = this.data.gutter;
|
||||
if (gutter) {
|
||||
target.setData({ gutter: gutter });
|
||||
}
|
||||
}),
|
||||
props: {
|
||||
gutter: {
|
||||
type: Number,
|
||||
observer: 'setGutter',
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
setGutter: function () {
|
||||
var _this = this;
|
||||
this.children.forEach(function (col) {
|
||||
col.setData(_this.data);
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
3
wechat_v2/miniprogram_npm/@vant/weapp/row/index.json
Normal file
3
wechat_v2/miniprogram_npm/@vant/weapp/row/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
5
wechat_v2/miniprogram_npm/@vant/weapp/row/index.wxml
Normal file
5
wechat_v2/miniprogram_npm/@vant/weapp/row/index.wxml
Normal file
@@ -0,0 +1,5 @@
|
||||
<wxs src="./index.wxs" module="computed" />
|
||||
|
||||
<view class="van-row custom-class" style="{{ computed.rootStyle({ gutter }) }}">
|
||||
<slot />
|
||||
</view>
|
||||
18
wechat_v2/miniprogram_npm/@vant/weapp/row/index.wxs
Normal file
18
wechat_v2/miniprogram_npm/@vant/weapp/row/index.wxs
Normal file
@@ -0,0 +1,18 @@
|
||||
/* eslint-disable */
|
||||
var style = require('../wxs/style.wxs');
|
||||
var addUnit = require('../wxs/add-unit.wxs');
|
||||
|
||||
function rootStyle(data) {
|
||||
if (!data.gutter) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return style({
|
||||
'margin-right': addUnit(-data.gutter / 2),
|
||||
'margin-left': addUnit(-data.gutter / 2),
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
rootStyle: rootStyle,
|
||||
};
|
||||
1
wechat_v2/miniprogram_npm/@vant/weapp/row/index.wxss
Normal file
1
wechat_v2/miniprogram_npm/@vant/weapp/row/index.wxss
Normal file
@@ -0,0 +1 @@
|
||||
@import '../common/index.wxss';.van-row:after{display:table;clear:both;content:""}
|
||||
Reference in New Issue
Block a user