Commit 2d338cd8 authored by beiqiao's avatar beiqiao

语法提示,文档说明,进一步更新。 (补充Layout布局)

parent 4a3a32b8
...@@ -11,7 +11,16 @@ ...@@ -11,7 +11,16 @@
</template> </template>
<script> <script>
/**
* alertTips 提示
* @description 通过基础的 12 分栏,迅速简便地创建布局(搭配<u-row>使用)
* @tutorial https://www.uviewui.com/components/layout.html
* @property {String Number} span 栅格占据的列数,总12等分(默认0)
* @property {String Number} offset 分栏左边偏移,计算方式与span相同(默认0)
* @example <u-col span="3"><view class="demo-layout bg-purple"></view></u-col>
*/
export default { export default {
name: "u-col",
props: { props: {
// 占父容器宽度的多少等分,总分为12份 // 占父容器宽度的多少等分,总分为12份
span: { span: {
......
...@@ -10,7 +10,17 @@ ...@@ -10,7 +10,17 @@
</template> </template>
<script> <script>
/**
* alertTips 提示
* @description 通过基础的 12 分栏,迅速简便地创建布局。
* @tutorial https://www.uviewui.com/components/layout.html#row-props
* @property {String Number} gutter 栅格间隔,左右各为此值的一半,单位rpx(默认0)
* @property {String} justify 水平排列方式(微信小程序暂不支持)默认(start(或flex-start))
* @property {String} align 垂直排列方式(默认center)
* @example <u-row gutter="16"></u-row>
*/
export default { export default {
name: "u-row",
props: { props: {
// 给col添加间距,左右边距各占一半 // 给col添加间距,左右边距各占一半
gutter: { gutter: {
...@@ -35,13 +45,13 @@ ...@@ -35,13 +45,13 @@
}, },
computed: { computed: {
uJustify() { uJustify() {
if(this.justify == 'end' || this.justify == 'start') return 'flex-' + this.justify; if (this.justify == 'end' || this.justify == 'start') return 'flex-' + this.justify;
else if(this.justify == 'around' || this.justify == 'between') return 'space-' + this.justify; else if (this.justify == 'around' || this.justify == 'between') return 'space-' + this.justify;
else return this.justify; else return this.justify;
}, },
uAlignItem() { uAlignItem() {
if(this.align == 'top') return 'flex-start'; if (this.align == 'top') return 'flex-start';
if(this.align == 'bottom') return 'flex-end'; if (this.align == 'bottom') return 'flex-end';
else return this.align; else return this.align;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment