This commit is contained in:
2019-12-14 09:20:48 +08:00
parent 57e95e3217
commit 933673b092
372 changed files with 8090 additions and 0 deletions

1
utils/dist/row/index.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export {};

36
utils/dist/row/index.js vendored Normal file
View File

@@ -0,0 +1,36 @@
import { VantComponent } from '../common/component';
VantComponent({
relation: {
name: 'col',
type: 'descendant',
linked(target) {
if (this.data.gutter) {
target.setGutter(this.data.gutter);
}
}
},
props: {
gutter: Number
},
watch: {
gutter: 'setGutter'
},
mounted() {
if (this.data.gutter) {
this.setGutter();
}
},
methods: {
setGutter() {
const { gutter } = this.data;
const margin = `-${Number(gutter) / 2}px`;
const style = gutter
? `margin-right: ${margin}; margin-left: ${margin};`
: '';
this.setData({ style });
this.getRelationNodes('../col/index').forEach(col => {
col.setGutter(this.data.gutter);
});
}
}
});

3
utils/dist/row/index.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"component": true
}

3
utils/dist/row/index.wxml vendored Normal file
View File

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

1
utils/dist/row/index.wxss vendored Normal file
View File

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