Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uview-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李晖
uview-ui
Commits
2d338cd8
Commit
2d338cd8
authored
Apr 23, 2020
by
beiqiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
语法提示,文档说明,进一步更新。 (补充Layout布局)
parent
4a3a32b8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
172 additions
and
153 deletions
+172
-153
u-col.vue
uview/components/u-col/u-col.vue
+97
-88
u-row.vue
uview/components/u-row/u-row.vue
+75
-65
No files found.
uview/components/u-col/u-col.vue
View file @
2d338cd8
...
@@ -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
:
{
...
...
uview/components/u-row/u-row.vue
View file @
2d338cd8
...
@@ -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
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment