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
9adac84c
Unverified
Commit
9adac84c
authored
Jun 21, 2020
by
BeiQiaoT
Committed by
GitHub
Jun 21, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #170 from YanxinNet/beiqiao
部分组件的doc编写
parents
4ed03bb8
23f256c5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
105 additions
and
0 deletions
+105
-0
u-calendar.vue
uview-ui/components/u-calendar/u-calendar.vue
+31
-0
u-form-item.vue
uview-ui/components/u-form-item/u-form-item.vue
+20
-0
u-form.vue
uview-ui/components/u-form/u-form.vue
+10
-0
u-input.vue
uview-ui/components/u-input/u-input.vue
+24
-0
u-select.vue
uview-ui/components/u-select/u-select.vue
+20
-0
No files found.
uview-ui/components/u-calendar/u-calendar.vue
View file @
9adac84c
...
@@ -58,6 +58,37 @@
...
@@ -58,6 +58,37 @@
</u-popup>
</u-popup>
</
template
>
</
template
>
<
script
>
<
script
>
/**
* calendar 日历
* @description 此组件用于单个选择日期,范围选择日期等,日历被包裹在底部弹起的容器中。
* @tutorial http://uviewui.com/components/calendar.html
* @property {String} mode 选择日期的模式,date-为单个日期,range-为选择日期范围
* @property {Boolean} v-model 布尔值变量,用于控制日历的弹出与收起
* @property {Boolean} safe-area-inset-bottom 是否开启底部安全区适配(默认false)
* @property {Boolean} change-year 是否显示顶部的切换年份方向的按钮(默认true)
* @property {Boolean} change-month 是否显示顶部的切换月份方向的按钮(默认true)
* @property {String Number} max-year 可切换的最大年份(默认2050)
* @property {String Number} min-year 最小可选日期(默认1950)
* @property {String Number} min-date 可切换的最小年份(默认1950-01-01)
* @property {String Number} max-date 最大可选日期(默认当前日期)
* @property {String Number} 弹窗顶部左右两边的圆角值,单位rpx(默认20)
* @property {Boolean} mask-close-able 是否允许通过点击遮罩关闭日历(默认true)
* @property {String} month-arrow-color 月份切换按钮箭头颜色(默认#606266)
* @property {String} year-arrow-color 年份切换按钮箭头颜色(默认#909399)
* @property {String} color 日期字体的默认颜色(默认#303133)
* @property {String} active-bg-color 起始/结束日期按钮的背景色(默认#2979ff)
* @property {String Number} z-index 弹出时的z-index值(默认10075)
* @property {String} active-color 起始/结束日期按钮的字体颜色(默认#ffffff)
* @property {String} range-bg-color 起始/结束日期之间的区域的背景颜色(默认rgba(41,121,255,0.13))
* @property {String} range-color 选择范围内字体颜色(默认#2979ff)
* @property {String} start-text 起始日期底部的提示文字(默认 '开始')
* @property {String} end-text 结束日期底部的提示文字(默认 '结束')
* @property {String} btn-type 底部确定按钮的主题(默认 'primary')
* @property {String} toolTip 顶部提示文字,如设置名为tooltip的slot,此参数将失效(默认 '选择日期')
* @property {Boolean} closeable 是否显示右上角的关闭图标(默认true)
* @example <u-calendar v-model="show" :mode="mode"></u-calendar>
*/
export
default
{
export
default
{
name
:
'
u-calendar
'
,
name
:
'
u-calendar
'
,
props
:
{
props
:
{
...
...
uview-ui/components/u-form-item/u-form-item.vue
View file @
9adac84c
...
@@ -46,6 +46,26 @@ import Emitter from '../../libs/util/emitter.js';
...
@@ -46,6 +46,26 @@ import Emitter from '../../libs/util/emitter.js';
import
schema
from
'
../../libs/util/async-validator
'
;
import
schema
from
'
../../libs/util/async-validator
'
;
// 去除警告信息
// 去除警告信息
schema
.
warning
=
function
(){};
schema
.
warning
=
function
(){};
/**
* form-item 表单item
* @description 此组件一般用于表单场景,可以配置Input输入框,Select弹出框,进行表单验证等。
* @tutorial http://uviewui.com/components/form.html
* @property {String} label 左侧提示文字
* @property {Object} prop 表单域model对象的属性名,在使用 validate、resetFields 方法的情况下,该属性是必填的
* @property {Boolean} border-bottom 是否显示表单域的下划线边框(默认true)
* @property {String} label-position 表单域提示文字的位置,left-左侧,top-上方(默认left)
* @property {String Number} label-width 提示文字的宽度,单位rpx(默认90)
* @property {Object} label-style lable的样式,对象形式
* @property {String} label-align lable的对齐方式(默认left)
* @property {String} right-icon 右侧自定义字体图标(限uView内置图标)或图片地址
* @property {String} left-icon 左侧自定义字体图标(限uView内置图标)或图片地址
* @property {Object} left-icon-style 左侧图标的样式,对象形式
* @property {Object} right-icon-style 右侧图标的样式,对象形式
* @property {Boolean} required 是否显示左边的"*"号,这里仅起展示作用,如需校验必填,请通过rules配置必填规则(默认false)
* @example <u-form-item label="姓名"><u-input v-model="form.name" /></u-form-item>
*/
export
default
{
export
default
{
name
:
'
u-form-item
'
,
name
:
'
u-form-item
'
,
mixins
:
[
Emitter
],
mixins
:
[
Emitter
],
...
...
uview-ui/components/u-form/u-form.vue
View file @
9adac84c
...
@@ -3,6 +3,16 @@
...
@@ -3,6 +3,16 @@
</
template
>
</
template
>
<
script
>
<
script
>
/**
* form 表单
* @description 此组件一般用于表单场景,可以配置Input输入框,Select弹出框,进行表单验证等。
* @tutorial http://uviewui.com/components/form.html
* @property {Object} model 表单数据对象
* @property {Object} rules 通过ref设置,见官网说明
* @property {Array} errorType 错误的提示方式,数组形式,见上方说明(默认['message'])
* @example <u-form :model="form" ref="uForm"></u-form>
*/
export
default
{
export
default
{
name
:
'
u-form
'
,
name
:
'
u-form
'
,
props
:
{
props
:
{
...
...
uview-ui/components/u-input/u-input.vue
View file @
9adac84c
...
@@ -65,6 +65,30 @@
...
@@ -65,6 +65,30 @@
<
script
>
<
script
>
import
Emitter
from
'
../../libs/util/emitter.js
'
;
import
Emitter
from
'
../../libs/util/emitter.js
'
;
/**
* input 输入框
* @description 此组件为一个输入框,默认没有边框和样式,是专门为配合表单组件u-form而设计的,利用它可以快速实现表单验证,输入内容,下拉选择等功能。
* @tutorial http://uviewui.com/components/input.html
* @property {String} type 模式选择,见官网说明
* @property {Boolean} clearable 是否显示右侧的清除图标(默认true)
* @property {} v-model 用于双向绑定输入框的值
* @property {String} input-align 输入框文字的对齐方式(默认left)
* @property {String} placeholder placeholder显示值(默认 '请输入内容')
* @property {Boolean} disabled 是否禁用输入框(默认false)
* @property {String Number} maxlength 输入框的最大可输入长度(默认140)
* @property {String} placeholderStyle placeholder的样式,字符串形式,如"color: red;"(默认 "color: #c0c4cc;")
* @property {String} confirm-type 设置键盘右下角按钮的文字,仅在type为text时生效(默认done)
* @property {Object} custom-style 自定义输入框的样式,对象形式
* @property {Boolean} focus 是否自动获得焦点(默认false)
* @property {Boolean} fixed 如果type为textarea,且在一个"position:fixed"的区域,需要指明为true(默认false)
* @property {Boolean} password-icon type为password时,是否显示右侧的密码查看图标(默认true)
* @property {Boolean} border 是否显示边框(默认false)
* @property {String} border-color 输入框的边框颜色(默认#dcdfe6)
* @property {Boolean} auto-height 是否自动增高输入区域,type为textarea时有效(默认true)
* @property {String Number} height 高度,单位rpx(text类型时为70,textarea时为100)
* @example <u-input v-model="value" :type="type" :border="border" />
*/
export
default
{
export
default
{
name
:
'
u-input
'
,
name
:
'
u-input
'
,
mixins
:
[
Emitter
],
mixins
:
[
Emitter
],
...
...
uview-ui/components/u-select/u-select.vue
View file @
9adac84c
...
@@ -50,6 +50,26 @@
...
@@ -50,6 +50,26 @@
</
template
>
</
template
>
<
script
>
<
script
>
/**
* select 列选择器
* @description 此选择器用于单列,多列,多列联动的选择场景。(从1.3.0版本起,不建议使用Picker组件的单列和多列模式,Select组件是专门为列选择而构造的组件,更简单易用。)
* @tutorial http://uviewui.com/components/select.html
* @property {String} mode 模式选择,"single-column"-单列模式,"mutil-column"-多列模式,"single-column-auto"-多列联动模式
* @property {Array} list 列数据,数组形式,见官网说明
* @property {Boolean} v-model 布尔值变量,用于控制选择器的弹出与收起
* @property {Boolean} safe-area-inset-bottom 是否开启底部安全区适配(默认false)
* @property {String} cancel-color 取消按钮的颜色(默认#606266)
* @property {String} confirm-color 确认按钮的颜色(默认#2979ff)
* @property {String} default-value 提供的默认选中的下标,见官网说明
* @property {Boolean} mask-close-able 是否允许通过点击遮罩关闭Picker(默认true)
* @property {String Number} z-index 弹出时的z-index值(默认10075)
* @property {String} value-name 自定义list数据的value属性名 1.3.6
* @property {String} label-name 自定义list数据的label属性名 1.3.6
* @property {String} child-name 自定义list数据的children属性名,只对多列联动模式有效 1.3.7
* @event {Function} confirm 点击确定按钮,返回当前选择的值
* @example <u-select v-model="show" :list="list"></u-select>
*/
export
default
{
export
default
{
props
:
{
props
:
{
// 列数据
// 列数据
...
...
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