uview-plus 3.2.6 → 3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +5 -0
- package/components/u-action-sheet/props.js +11 -10
- package/components/u-album/props.js +12 -11
- package/components/u-alert/props.js +9 -8
- package/components/u-avatar/props.js +15 -14
- package/components/u-avatar-group/props.js +10 -9
- package/components/u-back-top/props.js +11 -10
- package/components/u-badge/props.js +15 -14
- package/components/u-button/props.js +29 -37
- package/components/u-calendar/props.js +28 -27
- package/components/u-car-keyboard/props.js +1 -0
- package/components/u-cell/props.js +21 -20
- package/components/u-cell/u-cell.vue +3 -2
- package/components/u-cell-group/props.js +3 -2
- package/components/u-checkbox/props.js +14 -13
- package/components/u-checkbox-group/props.js +17 -16
- package/components/u-circle-progress/props.js +2 -1
- package/components/u-code/props.js +7 -6
- package/components/u-code-input/props.js +17 -16
- package/components/u-col/props.js +6 -5
- package/components/u-collapse/props.js +4 -3
- package/components/u-collapse-item/props.js +12 -11
- package/components/u-column-notice/props.js +11 -10
- package/components/u-count-down/props.js +5 -4
- package/components/u-count-to/props.js +12 -11
- package/components/u-datetime-picker/props.js +25 -24
- package/components/u-divider/props.js +9 -8
- package/components/u-dropdown/props.js +1 -0
- package/components/u-dropdown-item/props.js +1 -0
- package/components/u-dropdown-item/u-dropdown-item.vue +3 -5
- package/components/u-empty/props.js +12 -11
- package/components/u-form/props.js +9 -8
- package/components/u-form-item/props.js +11 -10
- package/components/u-gap/props.js +5 -4
- package/components/u-grid/props.js +4 -3
- package/components/u-grid-item/props.js +3 -2
- package/components/u-icon/props.js +18 -17
- package/components/u-image/props.js +17 -16
- package/components/u-index-anchor/props.js +6 -5
- package/components/u-index-item/props.js +1 -0
- package/components/u-index-list/props.js +6 -5
- package/components/u-input/props.js +36 -35
- package/components/u-keyboard/props.js +17 -16
- package/components/u-line/props.js +7 -6
- package/components/u-line-progress/props.js +6 -5
- package/components/u-link/props.js +8 -7
- package/components/u-list/props.js +15 -14
- package/components/u-list-item/props.js +2 -1
- package/components/u-loading-icon/props.js +12 -11
- package/components/u-loading-page/props.js +10 -9
- package/components/u-loadmore/props.js +19 -18
- package/components/u-modal/props.js +17 -16
- package/components/u-navbar/props.js +17 -16
- package/components/u-no-network/props.js +4 -3
- package/components/u-notice-bar/props.js +14 -13
- package/components/u-notify/props.js +10 -9
- package/components/u-number-box/props.js +23 -22
- package/components/u-number-keyboard/props.js +4 -3
- package/components/u-overlay/props.js +5 -4
- package/components/u-parse/props.js +9 -8
- package/components/u-picker/props.js +17 -16
- package/components/u-picker-column/props.js +1 -0
- package/components/u-popup/props.js +16 -15
- package/components/u-radio/props.js +14 -13
- package/components/u-radio-group/props.js +18 -17
- package/components/u-rate/props.js +15 -14
- package/components/u-read-more/props.js +9 -8
- package/components/u-row/props.js +4 -3
- package/components/u-row-notice/props.js +8 -7
- package/components/u-safe-bottom/props.js +1 -0
- package/components/u-scroll-list/props.js +7 -6
- package/components/u-search/props.js +25 -24
- package/components/u-skeleton/props.js +12 -11
- package/components/u-slider/props.js +12 -11
- package/components/u-status-bar/props.js +2 -1
- package/components/u-steps/props.js +8 -7
- package/components/u-steps-item/props.js +5 -4
- package/components/u-sticky/props.js +7 -6
- package/components/u-subsection/props.js +10 -9
- package/components/u-swipe-action/props.js +2 -1
- package/components/u-swipe-action-item/props.js +8 -7
- package/components/u-swiper/props.js +25 -24
- package/components/u-swiper-indicator/props.js +6 -5
- package/components/u-switch/props.js +12 -11
- package/components/u-tabbar/props.js +9 -8
- package/components/u-tabbar-item/props.js +7 -6
- package/components/u-table/props.js +1 -0
- package/components/u-tabs/props.js +13 -12
- package/components/u-tabs-item/props.js +1 -0
- package/components/u-tag/props.js +20 -18
- package/components/u-td/props.js +1 -0
- package/components/u-text/props.js +22 -21
- package/components/u-textarea/props.js +24 -23
- package/components/u-toolbar/props.js +7 -6
- package/components/u-tooltip/props.js +12 -11
- package/components/u-tr/props.js +1 -0
- package/components/u-transition/props.js +5 -4
- package/components/u-upload/props.js +23 -22
- package/index.js +16 -1
- package/libs/function/index.js +30 -23
- package/package.json +1 -1
|
@@ -1,161 +1,153 @@
|
|
|
1
|
-
|
|
2
|
-
* @Author : LQ
|
|
3
|
-
* @Description :
|
|
4
|
-
* @version : 1.0
|
|
5
|
-
* @Date : 2021-08-16 10:04:04
|
|
6
|
-
* @LastAuthor : LQ
|
|
7
|
-
* @lastTime : 2021-08-16 10:04:24
|
|
8
|
-
* @FilePath : /u-view2.0/uview-ui/components/u-button/props.js
|
|
9
|
-
*/
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
10
2
|
export default {
|
|
11
3
|
props: {
|
|
12
4
|
// 是否细边框
|
|
13
5
|
hairline: {
|
|
14
6
|
type: Boolean,
|
|
15
|
-
default: () =>
|
|
7
|
+
default: () => defProps.button.hairline
|
|
16
8
|
},
|
|
17
9
|
// 按钮的预置样式,info,primary,error,warning,success
|
|
18
10
|
type: {
|
|
19
11
|
type: String,
|
|
20
|
-
default: () =>
|
|
12
|
+
default: () => defProps.button.type
|
|
21
13
|
},
|
|
22
14
|
// 按钮尺寸,large,normal,small,mini
|
|
23
15
|
size: {
|
|
24
16
|
type: String,
|
|
25
|
-
default: () =>
|
|
17
|
+
default: () => defProps.button.size
|
|
26
18
|
},
|
|
27
19
|
// 按钮形状,circle(两边为半圆),square(带圆角)
|
|
28
20
|
shape: {
|
|
29
21
|
type: String,
|
|
30
|
-
default: () =>
|
|
22
|
+
default: () => defProps.button.shape
|
|
31
23
|
},
|
|
32
24
|
// 按钮是否镂空
|
|
33
25
|
plain: {
|
|
34
26
|
type: Boolean,
|
|
35
|
-
default: () =>
|
|
27
|
+
default: () => defProps.button.plain
|
|
36
28
|
},
|
|
37
29
|
// 是否禁止状态
|
|
38
30
|
disabled: {
|
|
39
31
|
type: Boolean,
|
|
40
|
-
default: () =>
|
|
32
|
+
default: () => defProps.button.disabled
|
|
41
33
|
},
|
|
42
34
|
// 是否加载中
|
|
43
35
|
loading: {
|
|
44
36
|
type: Boolean,
|
|
45
|
-
default: () =>
|
|
37
|
+
default: () => defProps.button.loading
|
|
46
38
|
},
|
|
47
39
|
// 加载中提示文字
|
|
48
40
|
loadingText: {
|
|
49
41
|
type: [String, Number],
|
|
50
|
-
default: () =>
|
|
42
|
+
default: () => defProps.button.loadingText
|
|
51
43
|
},
|
|
52
44
|
// 加载状态图标类型
|
|
53
45
|
loadingMode: {
|
|
54
46
|
type: String,
|
|
55
|
-
default: () =>
|
|
47
|
+
default: () => defProps.button.loadingMode
|
|
56
48
|
},
|
|
57
49
|
// 加载图标大小
|
|
58
50
|
loadingSize: {
|
|
59
51
|
type: [String, Number],
|
|
60
|
-
default: () =>
|
|
52
|
+
default: () => defProps.button.loadingSize
|
|
61
53
|
},
|
|
62
54
|
// 开放能力,具体请看uniapp稳定关于button组件部分说明
|
|
63
55
|
// https://uniapp.dcloud.io/component/button
|
|
64
56
|
openType: {
|
|
65
57
|
type: String,
|
|
66
|
-
default: () =>
|
|
58
|
+
default: () => defProps.button.openType
|
|
67
59
|
},
|
|
68
60
|
// 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
|
|
69
61
|
// 取值为submit(提交表单),reset(重置表单)
|
|
70
62
|
formType: {
|
|
71
63
|
type: String,
|
|
72
|
-
default: () =>
|
|
64
|
+
default: () => defProps.button.formType
|
|
73
65
|
},
|
|
74
66
|
// 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
|
|
75
67
|
// 只微信小程序、QQ小程序有效
|
|
76
68
|
appParameter: {
|
|
77
69
|
type: String,
|
|
78
|
-
default: () =>
|
|
70
|
+
default: () => defProps.button.appParameter
|
|
79
71
|
},
|
|
80
72
|
// 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
|
|
81
73
|
hoverStopPropagation: {
|
|
82
74
|
type: Boolean,
|
|
83
|
-
default: () =>
|
|
75
|
+
default: () => defProps.button.hoverStopPropagation
|
|
84
76
|
},
|
|
85
77
|
// 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
|
|
86
78
|
lang: {
|
|
87
79
|
type: String,
|
|
88
|
-
default: () =>
|
|
80
|
+
default: () => defProps.button.lang
|
|
89
81
|
},
|
|
90
82
|
// 会话来源,open-type="contact"时有效。只微信小程序有效
|
|
91
83
|
sessionFrom: {
|
|
92
84
|
type: String,
|
|
93
|
-
default: () =>
|
|
85
|
+
default: () => defProps.button.sessionFrom
|
|
94
86
|
},
|
|
95
87
|
// 会话内消息卡片标题,open-type="contact"时有效
|
|
96
88
|
// 默认当前标题,只微信小程序有效
|
|
97
89
|
sendMessageTitle: {
|
|
98
90
|
type: String,
|
|
99
|
-
default: () =>
|
|
91
|
+
default: () => defProps.button.sendMessageTitle
|
|
100
92
|
},
|
|
101
93
|
// 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
|
|
102
94
|
// 默认当前分享路径,只微信小程序有效
|
|
103
95
|
sendMessagePath: {
|
|
104
96
|
type: String,
|
|
105
|
-
default: () =>
|
|
97
|
+
default: () => defProps.button.sendMessagePath
|
|
106
98
|
},
|
|
107
99
|
// 会话内消息卡片图片,open-type="contact"时有效
|
|
108
100
|
// 默认当前页面截图,只微信小程序有效
|
|
109
101
|
sendMessageImg: {
|
|
110
102
|
type: String,
|
|
111
|
-
default: () =>
|
|
103
|
+
default: () => defProps.button.sendMessageImg
|
|
112
104
|
},
|
|
113
105
|
// 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
|
|
114
106
|
// 用户点击后可以快速发送小程序消息,open-type="contact"时有效
|
|
115
107
|
showMessageCard: {
|
|
116
108
|
type: Boolean,
|
|
117
|
-
default: () =>
|
|
109
|
+
default: () => defProps.button.showMessageCard
|
|
118
110
|
},
|
|
119
111
|
// 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
|
|
120
112
|
dataName: {
|
|
121
113
|
type: String,
|
|
122
|
-
default: () =>
|
|
114
|
+
default: () => defProps.button.dataName
|
|
123
115
|
},
|
|
124
116
|
// 节流,一定时间内只能触发一次
|
|
125
117
|
throttleTime: {
|
|
126
118
|
type: [String, Number],
|
|
127
|
-
default: () =>
|
|
119
|
+
default: () => defProps.button.throttleTime
|
|
128
120
|
},
|
|
129
121
|
// 按住后多久出现点击态,单位毫秒
|
|
130
122
|
hoverStartTime: {
|
|
131
123
|
type: [String, Number],
|
|
132
|
-
default: () =>
|
|
124
|
+
default: () => defProps.button.hoverStartTime
|
|
133
125
|
},
|
|
134
126
|
// 手指松开后点击态保留时间,单位毫秒
|
|
135
127
|
hoverStayTime: {
|
|
136
128
|
type: [String, Number],
|
|
137
|
-
default: () =>
|
|
129
|
+
default: () => defProps.button.hoverStayTime
|
|
138
130
|
},
|
|
139
131
|
// 按钮文字,之所以通过props传入,是因为slot传入的话
|
|
140
132
|
// nvue中无法控制文字的样式
|
|
141
133
|
text: {
|
|
142
134
|
type: [String, Number],
|
|
143
|
-
default: () =>
|
|
135
|
+
default: () => defProps.button.text
|
|
144
136
|
},
|
|
145
137
|
// 按钮图标
|
|
146
138
|
icon: {
|
|
147
139
|
type: String,
|
|
148
|
-
default: () =>
|
|
140
|
+
default: () => defProps.button.icon
|
|
149
141
|
},
|
|
150
142
|
// 按钮图标
|
|
151
143
|
iconColor: {
|
|
152
144
|
type: String,
|
|
153
|
-
default: () =>
|
|
145
|
+
default: () => defProps.button.icon
|
|
154
146
|
},
|
|
155
147
|
// 按钮颜色,支持传入linear-gradient渐变色
|
|
156
148
|
color: {
|
|
157
149
|
type: String,
|
|
158
|
-
default: () =>
|
|
150
|
+
default: () => defProps.button.color
|
|
159
151
|
}
|
|
160
152
|
}
|
|
161
153
|
}
|
|
@@ -1,139 +1,140 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 日历顶部标题
|
|
4
5
|
title: {
|
|
5
6
|
type: String,
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.calendar.title
|
|
7
8
|
},
|
|
8
9
|
// 是否显示标题
|
|
9
10
|
showTitle: {
|
|
10
11
|
type: Boolean,
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.calendar.showTitle
|
|
12
13
|
},
|
|
13
14
|
// 是否显示副标题
|
|
14
15
|
showSubtitle: {
|
|
15
16
|
type: Boolean,
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.calendar.showSubtitle
|
|
17
18
|
},
|
|
18
19
|
// 日期类型选择,single-选择单个日期,multiple-可以选择多个日期,range-选择日期范围
|
|
19
20
|
mode: {
|
|
20
21
|
type: String,
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.calendar.mode
|
|
22
23
|
},
|
|
23
24
|
// mode=range时,第一个日期底部的提示文字
|
|
24
25
|
startText: {
|
|
25
26
|
type: String,
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.calendar.startText
|
|
27
28
|
},
|
|
28
29
|
// mode=range时,最后一个日期底部的提示文字
|
|
29
30
|
endText: {
|
|
30
31
|
type: String,
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.calendar.endText
|
|
32
33
|
},
|
|
33
34
|
// 自定义列表
|
|
34
35
|
customList: {
|
|
35
36
|
type: Array,
|
|
36
|
-
default: () =>
|
|
37
|
+
default: () => defProps.calendar.customList
|
|
37
38
|
},
|
|
38
39
|
// 主题色,对底部按钮和选中日期有效
|
|
39
40
|
color: {
|
|
40
41
|
type: String,
|
|
41
|
-
default: () =>
|
|
42
|
+
default: () => defProps.calendar.color
|
|
42
43
|
},
|
|
43
44
|
// 最小的可选日期
|
|
44
45
|
minDate: {
|
|
45
46
|
type: [String, Number],
|
|
46
|
-
default: () =>
|
|
47
|
+
default: () => defProps.calendar.minDate
|
|
47
48
|
},
|
|
48
49
|
// 最大可选日期
|
|
49
50
|
maxDate: {
|
|
50
51
|
type: [String, Number],
|
|
51
|
-
default: () =>
|
|
52
|
+
default: () => defProps.calendar.maxDate
|
|
52
53
|
},
|
|
53
54
|
// 默认选中的日期,mode为multiple或range是必须为数组格式
|
|
54
55
|
defaultDate: {
|
|
55
56
|
type: [Array, String, Date, null],
|
|
56
|
-
default: () =>
|
|
57
|
+
default: () => defProps.calendar.defaultDate
|
|
57
58
|
},
|
|
58
59
|
// mode=multiple时,最多可选多少个日期
|
|
59
60
|
maxCount: {
|
|
60
61
|
type: [String, Number],
|
|
61
|
-
default: () =>
|
|
62
|
+
default: () => defProps.calendar.maxCount
|
|
62
63
|
},
|
|
63
64
|
// 日期行高
|
|
64
65
|
rowHeight: {
|
|
65
66
|
type: [String, Number],
|
|
66
|
-
default: () =>
|
|
67
|
+
default: () => defProps.calendar.rowHeight
|
|
67
68
|
},
|
|
68
69
|
// 日期格式化函数
|
|
69
70
|
formatter: {
|
|
70
71
|
type: [Function, null],
|
|
71
|
-
default: () =>
|
|
72
|
+
default: () => defProps.calendar.formatter
|
|
72
73
|
},
|
|
73
74
|
// 是否显示农历
|
|
74
75
|
showLunar: {
|
|
75
76
|
type: Boolean,
|
|
76
|
-
default: () =>
|
|
77
|
+
default: () => defProps.calendar.showLunar
|
|
77
78
|
},
|
|
78
79
|
// 是否显示月份背景色
|
|
79
80
|
showMark: {
|
|
80
81
|
type: Boolean,
|
|
81
|
-
default: () =>
|
|
82
|
+
default: () => defProps.calendar.showMark
|
|
82
83
|
},
|
|
83
84
|
// 确定按钮的文字
|
|
84
85
|
confirmText: {
|
|
85
86
|
type: String,
|
|
86
|
-
default: () =>
|
|
87
|
+
default: () => defProps.calendar.confirmText
|
|
87
88
|
},
|
|
88
89
|
// 确认按钮处于禁用状态时的文字
|
|
89
90
|
confirmDisabledText: {
|
|
90
91
|
type: String,
|
|
91
|
-
default: () =>
|
|
92
|
+
default: () => defProps.calendar.confirmDisabledText
|
|
92
93
|
},
|
|
93
94
|
// 是否显示日历弹窗
|
|
94
95
|
show: {
|
|
95
96
|
type: Boolean,
|
|
96
|
-
default: () =>
|
|
97
|
+
default: () => defProps.calendar.show
|
|
97
98
|
},
|
|
98
99
|
// 是否允许点击遮罩关闭日历
|
|
99
100
|
closeOnClickOverlay: {
|
|
100
101
|
type: Boolean,
|
|
101
|
-
default: () =>
|
|
102
|
+
default: () => defProps.calendar.closeOnClickOverlay
|
|
102
103
|
},
|
|
103
104
|
// 是否为只读状态,只读状态下禁止选择日期
|
|
104
105
|
readonly: {
|
|
105
106
|
type: Boolean,
|
|
106
|
-
default: () =>
|
|
107
|
+
default: () => defProps.calendar.readonly
|
|
107
108
|
},
|
|
108
109
|
// 是否展示确认按钮
|
|
109
110
|
showConfirm: {
|
|
110
111
|
type: Boolean,
|
|
111
|
-
default: () =>
|
|
112
|
+
default: () => defProps.calendar.showConfirm
|
|
112
113
|
},
|
|
113
114
|
// 日期区间最多可选天数,默认无限制,mode = range时有效
|
|
114
115
|
maxRange: {
|
|
115
116
|
type: [Number, String],
|
|
116
|
-
default: () =>
|
|
117
|
+
default: () => defProps.calendar.maxRange
|
|
117
118
|
},
|
|
118
119
|
// 范围选择超过最多可选天数时的提示文案,mode = range时有效
|
|
119
120
|
rangePrompt: {
|
|
120
121
|
type: String,
|
|
121
|
-
default: () =>
|
|
122
|
+
default: () => defProps.calendar.rangePrompt
|
|
122
123
|
},
|
|
123
124
|
// 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效
|
|
124
125
|
showRangePrompt: {
|
|
125
126
|
type: Boolean,
|
|
126
|
-
default: () =>
|
|
127
|
+
default: () => defProps.calendar.showRangePrompt
|
|
127
128
|
},
|
|
128
129
|
// 是否允许日期范围的起止时间为同一天,mode = range时有效
|
|
129
130
|
allowSameDay: {
|
|
130
131
|
type: Boolean,
|
|
131
|
-
default: () =>
|
|
132
|
+
default: () => defProps.calendar.allowSameDay
|
|
132
133
|
},
|
|
133
134
|
// 圆角值
|
|
134
135
|
round: {
|
|
135
136
|
type: [Boolean, String, Number],
|
|
136
|
-
default: () =>
|
|
137
|
+
default: () => defProps.calendar.round
|
|
137
138
|
},
|
|
138
139
|
// 最多展示月份数量
|
|
139
140
|
monthNum: {
|
|
@@ -1,110 +1,111 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 标题
|
|
4
5
|
title: {
|
|
5
6
|
type: [String, Number],
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.cell.title
|
|
7
8
|
},
|
|
8
9
|
// 标题下方的描述信息
|
|
9
10
|
label: {
|
|
10
11
|
type: [String, Number],
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.cell.label
|
|
12
13
|
},
|
|
13
14
|
// 右侧的内容
|
|
14
15
|
value: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.cell.value
|
|
17
18
|
},
|
|
18
19
|
// 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
|
|
19
20
|
icon: {
|
|
20
21
|
type: String,
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.cell.icon
|
|
22
23
|
},
|
|
23
24
|
// 是否禁用cell
|
|
24
25
|
disabled: {
|
|
25
26
|
type: Boolean,
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.cell.disabled
|
|
27
28
|
},
|
|
28
29
|
// 是否显示下边框
|
|
29
30
|
border: {
|
|
30
31
|
type: Boolean,
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.cell.border
|
|
32
33
|
},
|
|
33
34
|
// 内容是否垂直居中(主要是针对右侧的value部分)
|
|
34
35
|
center: {
|
|
35
36
|
type: Boolean,
|
|
36
|
-
default: () =>
|
|
37
|
+
default: () => defProps.cell.center
|
|
37
38
|
},
|
|
38
39
|
// 点击后跳转的URL地址
|
|
39
40
|
url: {
|
|
40
41
|
type: String,
|
|
41
|
-
default: () =>
|
|
42
|
+
default: () => defProps.cell.url
|
|
42
43
|
},
|
|
43
44
|
// 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
|
|
44
45
|
linkType: {
|
|
45
46
|
type: String,
|
|
46
|
-
default: () =>
|
|
47
|
+
default: () => defProps.cell.linkType
|
|
47
48
|
},
|
|
48
49
|
// 是否开启点击反馈(表现为点击时加上灰色背景)
|
|
49
50
|
clickable: {
|
|
50
51
|
type: Boolean,
|
|
51
|
-
default: () =>
|
|
52
|
+
default: () => defProps.cell.clickable
|
|
52
53
|
},
|
|
53
54
|
// 是否展示右侧箭头并开启点击反馈
|
|
54
55
|
isLink: {
|
|
55
56
|
type: Boolean,
|
|
56
|
-
default: () =>
|
|
57
|
+
default: () => defProps.cell.isLink
|
|
57
58
|
},
|
|
58
59
|
// 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
|
|
59
60
|
required: {
|
|
60
61
|
type: Boolean,
|
|
61
|
-
default: () =>
|
|
62
|
+
default: () => defProps.cell.required
|
|
62
63
|
},
|
|
63
64
|
// 右侧的图标箭头
|
|
64
65
|
rightIcon: {
|
|
65
66
|
type: String,
|
|
66
|
-
default: () =>
|
|
67
|
+
default: () => defProps.cell.rightIcon
|
|
67
68
|
},
|
|
68
69
|
// 右侧箭头的方向,可选值为:left,up,down
|
|
69
70
|
arrowDirection: {
|
|
70
71
|
type: String,
|
|
71
|
-
default: () =>
|
|
72
|
+
default: () => defProps.cell.arrowDirection
|
|
72
73
|
},
|
|
73
74
|
// 左侧图标样式
|
|
74
75
|
iconStyle: {
|
|
75
76
|
type: [Object, String],
|
|
76
77
|
default: () => {
|
|
77
|
-
return
|
|
78
|
+
return defProps.cell.iconStyle
|
|
78
79
|
}
|
|
79
80
|
},
|
|
80
81
|
// 右侧箭头图标的样式
|
|
81
82
|
rightIconStyle: {
|
|
82
83
|
type: [Object, String],
|
|
83
84
|
default: () => {
|
|
84
|
-
return
|
|
85
|
+
return defProps.cell.rightIconStyle
|
|
85
86
|
}
|
|
86
87
|
},
|
|
87
88
|
// 标题的样式
|
|
88
89
|
titleStyle: {
|
|
89
90
|
type: [Object, String],
|
|
90
91
|
default: () => {
|
|
91
|
-
return
|
|
92
|
+
return defProps.cell.titleStyle
|
|
92
93
|
}
|
|
93
94
|
},
|
|
94
95
|
// 单位元的大小,可选值为large
|
|
95
96
|
size: {
|
|
96
97
|
type: String,
|
|
97
|
-
default: () =>
|
|
98
|
+
default: () => defProps.cell.size
|
|
98
99
|
},
|
|
99
100
|
// 点击cell是否阻止事件传播
|
|
100
101
|
stop: {
|
|
101
102
|
type: Boolean,
|
|
102
|
-
default: () =>
|
|
103
|
+
default: () => defProps.cell.stop
|
|
103
104
|
},
|
|
104
105
|
// 标识符,cell被点击时返回
|
|
105
106
|
name: {
|
|
106
107
|
type: [Number, String],
|
|
107
|
-
default: () =>
|
|
108
|
+
default: () => defProps.cell.name
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
}
|
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
:size="size === 'large' ? 22 : 18"></u-icon>
|
|
13
13
|
</view>
|
|
14
14
|
<view class="u-cell__title">
|
|
15
|
+
<!-- 将slot与默认内容用if/else分开主要是因为微信小程序不支持slot嵌套传递,这样才能解决collapse组件的slot不失效问题,label暂时未用到。 -->
|
|
15
16
|
<slot name="title" v-if="$slots.title || !title">
|
|
16
17
|
</slot>
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
<text v-else class="u-cell__title-text" :style="[titleTextStyle]"
|
|
19
|
+
:class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__title-text--large']">{{ title }}</text>
|
|
19
20
|
<slot name="label">
|
|
20
21
|
<text class="u-cell__label" v-if="label"
|
|
21
22
|
:class="[disabled && 'u-cell--disabled', size === 'large' && 'u-cell__label--large']">{{ label }}</text>
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 分组标题
|
|
4
5
|
title: {
|
|
5
6
|
type: String,
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.cellGroup.title
|
|
7
8
|
},
|
|
8
9
|
// 是否显示外边框
|
|
9
10
|
border: {
|
|
10
11
|
type: Boolean,
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.cellGroup.border
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -1,69 +1,70 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// checkbox的名称
|
|
4
5
|
name: {
|
|
5
6
|
type: [String, Number, Boolean],
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.checkbox.name
|
|
7
8
|
},
|
|
8
9
|
// 形状,square为方形,circle为圆型
|
|
9
10
|
shape: {
|
|
10
11
|
type: String,
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.checkbox.shape
|
|
12
13
|
},
|
|
13
14
|
// 整体的大小
|
|
14
15
|
size: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.checkbox.size
|
|
17
18
|
},
|
|
18
19
|
// 是否默认选中
|
|
19
20
|
checked: {
|
|
20
21
|
type: Boolean,
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.checkbox.checked
|
|
22
23
|
},
|
|
23
24
|
// 是否禁用
|
|
24
25
|
disabled: {
|
|
25
26
|
type: [String, Boolean],
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.checkbox.disabled
|
|
27
28
|
},
|
|
28
29
|
// 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
|
|
29
30
|
activeColor: {
|
|
30
31
|
type: String,
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.checkbox.activeColor
|
|
32
33
|
},
|
|
33
34
|
// 未选中的颜色
|
|
34
35
|
inactiveColor: {
|
|
35
36
|
type: String,
|
|
36
|
-
default: () =>
|
|
37
|
+
default: () => defProps.checkbox.inactiveColor
|
|
37
38
|
},
|
|
38
39
|
// 图标的大小,单位px
|
|
39
40
|
iconSize: {
|
|
40
41
|
type: [String, Number],
|
|
41
|
-
default: () =>
|
|
42
|
+
default: () => defProps.checkbox.iconSize
|
|
42
43
|
},
|
|
43
44
|
// 图标颜色
|
|
44
45
|
iconColor: {
|
|
45
46
|
type: String,
|
|
46
|
-
default: () =>
|
|
47
|
+
default: () => defProps.checkbox.iconColor
|
|
47
48
|
},
|
|
48
49
|
// label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
|
|
49
50
|
label: {
|
|
50
51
|
type: [String, Number],
|
|
51
|
-
default: () =>
|
|
52
|
+
default: () => defProps.checkbox.label
|
|
52
53
|
},
|
|
53
54
|
// label的字体大小,px单位
|
|
54
55
|
labelSize: {
|
|
55
56
|
type: [String, Number],
|
|
56
|
-
default: () =>
|
|
57
|
+
default: () => defProps.checkbox.labelSize
|
|
57
58
|
},
|
|
58
59
|
// label的颜色
|
|
59
60
|
labelColor: {
|
|
60
61
|
type: String,
|
|
61
|
-
default: () =>
|
|
62
|
+
default: () => defProps.checkbox.labelColor
|
|
62
63
|
},
|
|
63
64
|
// 是否禁止点击提示语选中复选框
|
|
64
65
|
labelDisabled: {
|
|
65
66
|
type: [String, Boolean],
|
|
66
|
-
default: () =>
|
|
67
|
+
default: () => defProps.checkbox.labelDisabled
|
|
67
68
|
},
|
|
68
69
|
// 是否独立使用
|
|
69
70
|
usedAlone: {
|