增加zan-layout

This commit is contained in:
niunai
2017-03-03 17:58:08 +08:00
parent cead595693
commit e918c52fd0
23 changed files with 337 additions and 124 deletions
+29
View File
@@ -0,0 +1,29 @@
<template>
<div
:class="`${prefix}-row`"
:style="style">
<slot></slot>
</div>
</template>
<script>
export default {
name: 'zan-row',
props: {
prefix: {
type: String,
default: 'zan'
},
gutter: [Number, String]
},
computed: {
style() {
const gutter = Number(this.gutter);
const margin = `-${gutter / 2}px`;
return gutter ?
{ marginLeft: margin, marginRight: margin } :
{};
}
}
};
</script>