Skip to content

Commit 4a28a3a

Browse files
committed
update(uni-ui): vue doc, indexed-list
1 parent 3981e5f commit 4a28a3a

File tree

10 files changed

+133
-6
lines changed

10 files changed

+133
-6
lines changed

components/uni-search-bar/uni-search-bar.vue

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,29 @@
2121

2222
<script>
2323
import uniIcons from "../uni-icons/uni-icons.vue";
24+
25+
/**
26+
* SearchBar 搜索栏
27+
* @description 评分组件
28+
* @tutorial https://ext.dcloud.net.cn/plugin?id=866
29+
* @property {Number} radius 搜索栏圆角
30+
* @property {Number} maxlength 输入最大长度
31+
* @property {String} placeholder 搜索栏Placeholder
32+
* @property {String} clearButton = [always|auto|none] 是否显示清除按钮
33+
* @value always 一直显示
34+
* @value auto 输入框不为空时显示
35+
* @value none 一直不显示
36+
* @property {String} cancelButton = [always|auto|none] 是否显示取消按钮
37+
* @value always 一直显示
38+
* @value auto 输入框不为空时显示
39+
* @value none 一直不显示
40+
* @property {String} cancelText 取消按钮的文字
41+
* @property {String} bgColor 输入框背景颜色
42+
* @event {Function} confirm uniSearchBar 的输入框 confirm 事件,返回参数为uniSearchBar的value,e={value:Number}
43+
* @event {Function} input uniSearchBar 的 value 改变时触发事件,返回参数为uniSearchBar的value,e={value:Number}
44+
* @event {Function} cancel 点击取消按钮时触发事件,返回参数为uniSearchBar的value,e={value:Number}
45+
*/
46+
2447
export default {
2548
name: "UniSearchBar",
2649
components: {

components/uni-section/uni-section.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@
1212
</template>
1313

1414
<script>
15+
/**
16+
* Section 标题栏
17+
* @description 标题栏
18+
* @property {String} type = [line|circle] 标题装饰类型
19+
* @value line 竖线
20+
* @value circle 圆形
21+
* @property {String} title 主标题
22+
* @property {String} subTitle 副标题
23+
*/
24+
1525
export default {
1626
name: 'UniTitle',
1727
props: {

components/uni-segmented-control/uni-segmented-control.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,19 @@
1616
</template>
1717

1818
<script>
19+
/**
20+
* SegmentedControl 分段器
21+
* @description 用作不同视图的显示
22+
* @tutorial https://ext.dcloud.net.cn/plugin?id=54
23+
* @property {Number} current 当前选中的tab索引值,从0计数
24+
* @property {String} styleType = [button|text] 分段器样式类型
25+
* @value button 按钮类型
26+
* @value text 文字类型
27+
* @property {String} activeColor 选中的标签背景色与边框颜色
28+
* @property {Array} values 选项数组
29+
* @event {Function} clickItem 组件触发点击事件时触发,e={currentIndex}
30+
*/
31+
1932
export default {
2033
name: 'UniSegmentedControl',
2134
props: {

components/uni-steps/uni-steps.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@
2323

2424
<script>
2525
import uniIcons from '../uni-icons/uni-icons.vue'
26+
27+
/**
28+
* Steps 步骤条
29+
* @description 评分组件
30+
* @tutorial https://ext.dcloud.net.cn/plugin?id=34
31+
* @property {Number} active 当前步骤
32+
* @property {String} direction = [row|column] 当前步骤
33+
* @value row 横向
34+
* @value column 纵向
35+
* @property {String} activeColor 选中状态的颜色
36+
* @property {Array} options 数据源,格式为:[{title:'xxx',desc:'xxx'},{title:'xxx',desc:'xxx'}]
37+
*/
38+
2639
export default {
2740
name: 'UniSteps',
2841
components: {

components/uni-swipe-action-item/uni-swipe-action-item.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,18 @@
8989
import mpalipay from './mpalipay'
9090
// #endif
9191
92+
/**
93+
* SwipeActionItem 滑动操作子组件
94+
* @description 通过滑动触发选项的容器
95+
* @tutorial https://ext.dcloud.net.cn/plugin?id=181
96+
* @property {Boolean} show = [true|false] 开启关闭组件,auto-close = false 时生效
97+
* @property {Boolean} disabled = [true|false] 是否禁止滑动
98+
* @property {Boolean} autoClose = [true|false] 其他组件开启的时候,当前组件是否自动关闭
99+
* @property {Array} options 组件选项内容及样式
100+
* @event {Function} click 点击选项按钮时触发事件,e = {content,index} ,content(点击内容)、index(下标)
101+
* @event {Function} change 组件打开或关闭时触发,true:开启状态;false:关闭状态
102+
*/
103+
92104
export default {
93105
// #ifdef APP-VUE|| MP-WEIXIN||H5
94106
mixins: [mpwxs],

components/uni-swipe-action/uni-swipe-action.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
</template>
66

77
<script>
8+
/**
9+
* SwipeAction 滑动操作
10+
* @description 通过滑动触发选项的容器
11+
* @tutorial https://ext.dcloud.net.cn/plugin?id=181
12+
*/
813
export default {
914
data() {
10-
return {
11-
12-
};
15+
return {};
1316
},
1417
provide() {
1518
return {

components/uni-swiper-dot/uni-swiper-dot.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@
2424
</template>
2525

2626
<script>
27+
/**
28+
* SwiperDod 轮播图指示点
29+
* @description 自定义轮播图指示点
30+
* @tutorial https://ext.dcloud.net.cn/plugin?id=284
31+
* @property {Number} current 当前指示点索引,必须是通过 `swiper` 的 `change` 事件获取到的 `e.detail.current`
32+
* @property {String} mode = [default|round|nav|indexes] 指示点的类型
33+
* @value defualt 默认指示点
34+
* @value round 圆形指示点
35+
* @value nav 条形指示点
36+
* @value indexes 索引指示点
37+
* @property {String} field mode 为 nav 时,显示的内容字段(mode = nav 时必填)
38+
* @property {String} info 轮播图的数据,通过数组长度决定指示点个数
39+
* @property {Object} dotsStyles 指示点样式
40+
* @event {Function} clickItem 组件触发点击事件时触发,e={currentIndex}
41+
*/
42+
2743
export default {
2844
name: 'UniSwiperDot',
2945
props: {

components/uni-tag/uni-tag.vue

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,27 @@
1212
</template>
1313

1414
<script>
15+
/**
16+
* Tag 标签
17+
* @description 用于展示1个或多个文字标签,可点击切换选中、不选中的状态
18+
* @tutorial https://ext.dcloud.net.cn/plugin?id=35
19+
* @property {String} text 标签内容
20+
* @property {String} size = [normal|small] 大小尺寸
21+
* @value normal 正常
22+
* @value small 小尺寸
23+
* @property {String} type = [default|primary|success|warning|error|royal] 颜色类型
24+
* @value default 灰色
25+
* @value primary 蓝色
26+
* @value success 绿色
27+
* @value warning 黄色
28+
* @value error 红色
29+
* @value royal 紫色
30+
* @property {Boolean} disabled = [true|false] 是否为禁用状态
31+
* @property {Boolean} inverted = [true|false] 是否无需背景颜色(空心标签)
32+
* @property {Boolean} circle = [true|false] 是否为圆角
33+
* @event {Function} click 点击 Tag 触发事件
34+
*/
35+
1536
export default {
1637
name: "UniTag",
1738
props: {

components/uni-title/uni-title.vue

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@
55
</template>
66

77
<script>
8+
/**
9+
* Title 章节标题
10+
* @description 章节标题,通常用于记录页面标题,使用当前组件,uni-app 如果开启统计,将会自动统计页面标题
11+
* @tutorial https://ext.dcloud.net.cn/plugin?id=1066
12+
* @property {String} type = [h1|h2|h3|h4|h5] 标题类型
13+
* @value h1 一级标题
14+
* @value h2 二级标题
15+
* @value h3 三级标题
16+
* @value h4 四级标题
17+
* @value h5 五级标题
18+
* @property {String} title 章节标题内容
19+
* @property {String} align = [left|center|right] 对齐方式
20+
* @value left 做对齐
21+
* @value center 居中对齐
22+
* @value right 右对齐
23+
* @property {String} color 字体颜色
24+
* @property {Boolean} stat = [true|false] 是否开启统计功能呢,如不填写type值,默认为开启,填写 type 属性,默认为关闭
25+
*/
826
export default {
927
props: {
1028
type: {

pages/extUI/indexed-list/indexed-list.nvue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<template>
2-
<view>
3-
<uni-indexed-list :options="list" :show-select="true" @click="bindClick" />
4-
</view>
2+
<uni-indexed-list :options="list" :show-select="true" @click="bindClick" />
53
</template>
64

75
<script>

0 commit comments

Comments
 (0)