first
This commit is contained in:
1
node_modules/vant/es/row/index.css
generated
vendored
Normal file
1
node_modules/vant/es/row/index.css
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
.van-row::after{display:table;clear:both;content:''}.van-row--flex{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}.van-row--flex::after{display:none}.van-row--justify-center{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.van-row--justify-end{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.van-row--justify-space-between{-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.van-row--justify-space-around{-webkit-justify-content:space-around;justify-content:space-around}.van-row--align-center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.van-row--align-bottom{-webkit-box-align:end;-webkit-align-items:flex-end;align-items:flex-end}
|
85
node_modules/vant/es/row/index.js
generated
vendored
Normal file
85
node_modules/vant/es/row/index.js
generated
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
import { createNamespace } from '../utils';
|
||||
import { ParentMixin } from '../mixins/relation';
|
||||
|
||||
var _createNamespace = createNamespace('row'),
|
||||
createComponent = _createNamespace[0],
|
||||
bem = _createNamespace[1];
|
||||
|
||||
export default createComponent({
|
||||
mixins: [ParentMixin('vanRow')],
|
||||
props: {
|
||||
type: String,
|
||||
align: String,
|
||||
justify: String,
|
||||
tag: {
|
||||
type: String,
|
||||
default: 'div'
|
||||
},
|
||||
gutter: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
spaces: function spaces() {
|
||||
var gutter = Number(this.gutter);
|
||||
|
||||
if (!gutter) {
|
||||
return;
|
||||
}
|
||||
|
||||
var spaces = [];
|
||||
var groups = [[]];
|
||||
var totalSpan = 0;
|
||||
this.children.forEach(function (item, index) {
|
||||
totalSpan += Number(item.span);
|
||||
|
||||
if (totalSpan > 24) {
|
||||
groups.push([index]);
|
||||
totalSpan -= 24;
|
||||
} else {
|
||||
groups[groups.length - 1].push(index);
|
||||
}
|
||||
});
|
||||
groups.forEach(function (group) {
|
||||
var averagePadding = gutter * (group.length - 1) / group.length;
|
||||
group.forEach(function (item, index) {
|
||||
if (index === 0) {
|
||||
spaces.push({
|
||||
right: averagePadding
|
||||
});
|
||||
} else {
|
||||
var left = gutter - spaces[item - 1].right;
|
||||
var right = averagePadding - left;
|
||||
spaces.push({
|
||||
left: left,
|
||||
right: right
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
return spaces;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick: function onClick(event) {
|
||||
this.$emit('click', event);
|
||||
}
|
||||
},
|
||||
render: function render() {
|
||||
var _bem;
|
||||
|
||||
var h = arguments[0];
|
||||
var align = this.align,
|
||||
justify = this.justify;
|
||||
var flex = this.type === 'flex';
|
||||
return h(this.tag, {
|
||||
"class": bem((_bem = {
|
||||
flex: flex
|
||||
}, _bem["align-" + align] = flex && align, _bem["justify-" + justify] = flex && justify, _bem)),
|
||||
"on": {
|
||||
"click": this.onClick
|
||||
}
|
||||
}, [this.slots()]);
|
||||
}
|
||||
});
|
42
node_modules/vant/es/row/index.less
generated
vendored
Normal file
42
node_modules/vant/es/row/index.less
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
@import '../style/var';
|
||||
|
||||
.van-row {
|
||||
&::after {
|
||||
display: table;
|
||||
clear: both;
|
||||
content: '';
|
||||
}
|
||||
|
||||
&--flex {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&--justify-center {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
&--justify-end {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
&--justify-space-between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
&--justify-space-around {
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
&--align-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&--align-bottom {
|
||||
align-items: flex-end;
|
||||
}
|
||||
}
|
2
node_modules/vant/es/row/style/index.js
generated
vendored
Normal file
2
node_modules/vant/es/row/style/index.js
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import '../../style/base.css';
|
||||
import '../index.css';
|
2
node_modules/vant/es/row/style/less.js
generated
vendored
Normal file
2
node_modules/vant/es/row/style/less.js
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import '../../style/base.less';
|
||||
import '../index.less';
|
Reference in New Issue
Block a user