vant components

This commit is contained in:
cookfront
2017-04-19 17:33:44 +08:00
commit 63c549d651
346 changed files with 25710 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
<template>
<div
:class="`${prefix}-row`"
:style="style">
<slot></slot>
</div>
</template>
<script>
export default {
name: 'van-row',
props: {
prefix: {
type: String,
default: 'van'
},
gutter: [Number, String]
},
computed: {
style() {
const gutter = Number(this.gutter);
const margin = `-${gutter / 2}px`;
return gutter
? { marginLeft: margin, marginRight: margin }
: {};
}
}
};
</script>