uview-plus 3.1.49 → 3.1.50
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/README.md +10 -10
- package/changelog.md +5 -14
- 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-back-top/u-back-top.vue +1 -1
- package/components/u-badge/props.js +15 -14
- package/components/u-badge/u-badge.vue +1 -1
- package/components/u-button/props.js +29 -28
- package/components/u-calendar/month.vue +1 -1
- package/components/u-calendar/props.js +28 -27
- package/components/u-car-keyboard/props.js +1 -0
- package/components/u-car-keyboard/u-car-keyboard.vue +1 -1
- package/components/u-cell/props.js +18 -17
- package/components/u-cell/u-cell.vue +3 -12
- package/components/u-cell-group/props.js +3 -2
- package/components/u-cell-group/u-cell-group.vue +1 -1
- package/components/u-checkbox/props.js +14 -13
- package/components/u-checkbox/u-checkbox.vue +1 -1
- 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/u-code.vue +0 -5
- 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-down/u-count-down.vue +1 -6
- package/components/u-count-to/props.js +12 -11
- package/components/u-datetime-picker/props.js +25 -37
- package/components/u-datetime-picker/u-datetime-picker.vue +3 -22
- 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-empty/props.js +12 -11
- package/components/u-form/props.js +9 -8
- package/components/u-form/u-form.vue +1 -1
- package/components/u-form-item/props.js +9 -13
- package/components/u-form-item/u-form-item.vue +0 -1
- 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-grid-item/u-grid-item.vue +0 -5
- package/components/u-icon/props.js +18 -17
- package/components/u-icon/u-icon.vue +6 -9
- package/components/u-image/props.js +17 -16
- package/components/u-image/u-image.vue +1 -1
- package/components/u-index-anchor/props.js +6 -5
- package/components/u-index-anchor/u-index-anchor.vue +1 -1
- package/components/u-index-item/props.js +1 -0
- package/components/u-index-item/u-index-item.vue +1 -1
- package/components/u-index-list/props.js +6 -5
- package/components/u-index-list/u-index-list.vue +2 -3
- package/components/u-input/props.js +36 -35
- package/components/u-input/u-input.vue +4 -10
- 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-notify/u-notify.vue +0 -5
- package/components/u-number-box/props.js +23 -22
- package/components/u-number-box/u-number-box.vue +1 -21
- 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-parse/u-parse.vue +1 -6
- 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-row-notice/u-row-notice.vue +0 -5
- 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-status-bar/u-status-bar.vue +1 -1
- package/components/u-steps/props.js +8 -7
- package/components/u-steps/u-steps.vue +1 -1
- package/components/u-steps-item/props.js +5 -4
- package/components/u-steps-item/u-steps-item.vue +1 -1
- package/components/u-sticky/props.js +7 -6
- package/components/u-sticky/u-sticky.vue +0 -5
- package/components/u-subsection/props.js +10 -9
- package/components/u-swipe-action/props.js +2 -1
- package/components/u-swipe-action-item/nvue.js +0 -5
- package/components/u-swipe-action-item/props.js +7 -6
- 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 +16 -15
- 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-toast/u-toast.vue +0 -5
- 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-transition/transition.js +9 -8
- package/components/u-transition/u-transition.vue +1 -1
- package/components/u-upload/props.js +23 -22
- package/components/u-upload/u-upload.vue +1 -1
- package/index.js +5 -1
- package/libs/config/props/actionSheet.js +1 -1
- package/libs/config/props/album.js +1 -1
- package/libs/config/props/avatarGroup.js +1 -1
- package/libs/config/props/backtop.js +2 -2
- package/libs/config/props/badge.js +1 -1
- package/libs/config/props/calendar.js +3 -3
- package/libs/config/props/checkboxGroup.js +1 -1
- package/libs/config/props/datetimePicker.js +1 -1
- package/libs/config/props/form.js +3 -3
- package/libs/config/props/formItem.js +0 -1
- package/libs/config/props/indexList.js +1 -1
- package/libs/config/props/noticeBar.js +1 -1
- package/libs/config/props/picker.js +2 -2
- package/libs/config/props/popup.js +1 -1
- package/libs/config/props/search.js +2 -2
- package/libs/config/props/slider.js +1 -1
- package/libs/config/props/swiper.js +1 -1
- package/libs/config/props/tabs.js +7 -7
- package/libs/config/props/text.js +2 -2
- package/libs/config/props/toast.js +1 -1
- package/libs/config/props/tooltip.js +1 -1
- package/libs/config/props/upload.js +3 -3
- package/libs/css/components.scss +1 -11
- package/libs/css/flex.scss +71 -73
- package/package.json +1 -1
|
@@ -1,143 +1,131 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
|
-
// 是否显示input
|
|
4
|
-
hasInput: {
|
|
5
|
-
type: Boolean,
|
|
6
|
-
default: () => false
|
|
7
|
-
},
|
|
8
|
-
placeholder: {
|
|
9
|
-
type: String,
|
|
10
|
-
default: () => '请选择'
|
|
11
|
-
},
|
|
12
|
-
format: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: () => 'YYYY-MM-DD HH:mm'
|
|
15
|
-
},
|
|
16
4
|
// 是否打开组件
|
|
17
5
|
show: {
|
|
18
6
|
type: Boolean,
|
|
19
|
-
default:
|
|
7
|
+
default: defprops.datetimePicker.show
|
|
20
8
|
},
|
|
21
9
|
// 弹出的方向,可选值为 top bottom right left center
|
|
22
10
|
popupMode: {
|
|
23
11
|
type: String,
|
|
24
|
-
default:
|
|
12
|
+
default: defprops.picker.popupMode
|
|
25
13
|
},
|
|
26
14
|
// 是否展示顶部的操作栏
|
|
27
15
|
showToolbar: {
|
|
28
16
|
type: Boolean,
|
|
29
|
-
default:
|
|
17
|
+
default: defprops.datetimePicker.showToolbar
|
|
30
18
|
},
|
|
31
19
|
// #ifdef VUE2
|
|
32
20
|
// 绑定值
|
|
33
21
|
value: {
|
|
34
22
|
type: [String, Number],
|
|
35
|
-
default:
|
|
23
|
+
default: defprops.datetimePicker.value
|
|
36
24
|
},
|
|
37
25
|
// #endif
|
|
38
26
|
// #ifdef VUE3
|
|
39
27
|
// 绑定值
|
|
40
28
|
modelValue: {
|
|
41
29
|
type: [String, Number],
|
|
42
|
-
default:
|
|
30
|
+
default: defprops.datetimePicker.value
|
|
43
31
|
},
|
|
44
32
|
// #endif
|
|
45
33
|
// 顶部标题
|
|
46
34
|
title: {
|
|
47
35
|
type: String,
|
|
48
|
-
default:
|
|
36
|
+
default: defprops.datetimePicker.title
|
|
49
37
|
},
|
|
50
38
|
// 展示格式,mode=date为日期选择,mode=time为时间选择,mode=year-month为年月选择,mode=datetime为日期时间选择
|
|
51
39
|
mode: {
|
|
52
40
|
type: String,
|
|
53
|
-
default:
|
|
41
|
+
default: defprops.datetimePicker.mode
|
|
54
42
|
},
|
|
55
43
|
// 可选的最大时间
|
|
56
44
|
maxDate: {
|
|
57
45
|
type: Number,
|
|
58
46
|
// 最大默认值为后10年
|
|
59
|
-
default:
|
|
47
|
+
default: defprops.datetimePicker.maxDate
|
|
60
48
|
},
|
|
61
49
|
// 可选的最小时间
|
|
62
50
|
minDate: {
|
|
63
51
|
type: Number,
|
|
64
52
|
// 最小默认值为前10年
|
|
65
|
-
default:
|
|
53
|
+
default: defprops.datetimePicker.minDate
|
|
66
54
|
},
|
|
67
55
|
// 可选的最小小时,仅mode=time有效
|
|
68
56
|
minHour: {
|
|
69
57
|
type: Number,
|
|
70
|
-
default:
|
|
58
|
+
default: defprops.datetimePicker.minHour
|
|
71
59
|
},
|
|
72
60
|
// 可选的最大小时,仅mode=time有效
|
|
73
61
|
maxHour: {
|
|
74
62
|
type: Number,
|
|
75
|
-
default:
|
|
63
|
+
default: defprops.datetimePicker.maxHour
|
|
76
64
|
},
|
|
77
65
|
// 可选的最小分钟,仅mode=time有效
|
|
78
66
|
minMinute: {
|
|
79
67
|
type: Number,
|
|
80
|
-
default:
|
|
68
|
+
default: defprops.datetimePicker.minMinute
|
|
81
69
|
},
|
|
82
70
|
// 可选的最大分钟,仅mode=time有效
|
|
83
71
|
maxMinute: {
|
|
84
72
|
type: Number,
|
|
85
|
-
default:
|
|
73
|
+
default: defprops.datetimePicker.maxMinute
|
|
86
74
|
},
|
|
87
75
|
// 选项过滤函数
|
|
88
76
|
filter: {
|
|
89
77
|
type: [Function, null],
|
|
90
|
-
default:
|
|
78
|
+
default: defprops.datetimePicker.filter
|
|
91
79
|
},
|
|
92
80
|
// 选项格式化函数
|
|
93
81
|
formatter: {
|
|
94
82
|
type: [Function, null],
|
|
95
|
-
default:
|
|
83
|
+
default: defprops.datetimePicker.formatter
|
|
96
84
|
},
|
|
97
85
|
// 是否显示加载中状态
|
|
98
86
|
loading: {
|
|
99
87
|
type: Boolean,
|
|
100
|
-
default:
|
|
88
|
+
default: defprops.datetimePicker.loading
|
|
101
89
|
},
|
|
102
90
|
// 各列中,单个选项的高度
|
|
103
91
|
itemHeight: {
|
|
104
92
|
type: [String, Number],
|
|
105
|
-
default:
|
|
93
|
+
default: defprops.datetimePicker.itemHeight
|
|
106
94
|
},
|
|
107
95
|
// 取消按钮的文字
|
|
108
96
|
cancelText: {
|
|
109
97
|
type: String,
|
|
110
|
-
default:
|
|
98
|
+
default: defprops.datetimePicker.cancelText
|
|
111
99
|
},
|
|
112
100
|
// 确认按钮的文字
|
|
113
101
|
confirmText: {
|
|
114
102
|
type: String,
|
|
115
|
-
default:
|
|
103
|
+
default: defprops.datetimePicker.confirmText
|
|
116
104
|
},
|
|
117
105
|
// 取消按钮的颜色
|
|
118
106
|
cancelColor: {
|
|
119
107
|
type: String,
|
|
120
|
-
default:
|
|
108
|
+
default: defprops.datetimePicker.cancelColor
|
|
121
109
|
},
|
|
122
110
|
// 确认按钮的颜色
|
|
123
111
|
confirmColor: {
|
|
124
112
|
type: String,
|
|
125
|
-
default:
|
|
113
|
+
default: defprops.datetimePicker.confirmColor
|
|
126
114
|
},
|
|
127
115
|
// 每列中可见选项的数量
|
|
128
116
|
visibleItemCount: {
|
|
129
117
|
type: [String, Number],
|
|
130
|
-
default:
|
|
118
|
+
default: defprops.datetimePicker.visibleItemCount
|
|
131
119
|
},
|
|
132
120
|
// 是否允许点击遮罩关闭选择器
|
|
133
121
|
closeOnClickOverlay: {
|
|
134
122
|
type: Boolean,
|
|
135
|
-
default:
|
|
123
|
+
default: defprops.datetimePicker.closeOnClickOverlay
|
|
136
124
|
},
|
|
137
125
|
// 各列的默认索引
|
|
138
126
|
defaultIndex: {
|
|
139
127
|
type: Array,
|
|
140
|
-
default:
|
|
128
|
+
default: defprops.datetimePicker.defaultIndex
|
|
141
129
|
}
|
|
142
130
|
}
|
|
143
131
|
}
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view v-if="hasInput">
|
|
3
|
-
<u-input
|
|
4
|
-
:placeholder="placeholder"
|
|
5
|
-
border="surround"
|
|
6
|
-
v-model="inputValue"
|
|
7
|
-
@click="showByClickInput = !showByClickInput"
|
|
8
|
-
></u-input>
|
|
9
|
-
</view>
|
|
10
2
|
<u-picker
|
|
11
3
|
ref="picker"
|
|
12
|
-
:show="show
|
|
4
|
+
:show="show"
|
|
13
5
|
:popupMode="popupMode"
|
|
14
6
|
:closeOnClickOverlay="closeOnClickOverlay"
|
|
15
7
|
:columns="columns"
|
|
@@ -51,7 +43,7 @@
|
|
|
51
43
|
* @tutorial https://ijry.github.io/uview-plus/components/datetimePicker.html
|
|
52
44
|
* @property {Boolean} show 用于控制选择器的弹出与收起 ( 默认 false )
|
|
53
45
|
* @property {Boolean} showToolbar 是否显示顶部的操作栏 ( 默认 true )
|
|
54
|
-
* @property {String | Number}
|
|
46
|
+
* @property {String | Number} value 绑定值
|
|
55
47
|
* @property {String} title 顶部标题
|
|
56
48
|
* @property {String} mode 展示格式 mode=date为日期选择,mode=time为时间选择,mode=year-month为年月选择,mode=datetime为日期时间选择 ( 默认 ‘datetime )
|
|
57
49
|
* @property {Number} maxDate 可选的最大时间 默认值为后10年
|
|
@@ -82,9 +74,6 @@
|
|
|
82
74
|
mixins: [mpMixin, mixin, props],
|
|
83
75
|
data() {
|
|
84
76
|
return {
|
|
85
|
-
// 原来的日期选择器不方便,这里增加一个hasInput选项支持类似element的自带输入框的功能。
|
|
86
|
-
inputValue: '', // 表单显示值
|
|
87
|
-
showByClickInput: false, // 是否在hasInput模式下显示日期选择弹唱
|
|
88
77
|
columns: [],
|
|
89
78
|
innerDefaultIndex: [],
|
|
90
79
|
innerFormatter: (type, value) => value
|
|
@@ -99,7 +88,6 @@
|
|
|
99
88
|
// #ifdef VUE3
|
|
100
89
|
modelValue(newValue) {
|
|
101
90
|
this.init()
|
|
102
|
-
this.inputValue = dayjs(newValue).format(this.format || 'YYYY-MM-DD HH:mm')
|
|
103
91
|
},
|
|
104
92
|
// #endif
|
|
105
93
|
// #ifdef VUE2
|
|
@@ -145,9 +133,6 @@
|
|
|
145
133
|
},
|
|
146
134
|
// 点击工具栏的取消按钮
|
|
147
135
|
cancel() {
|
|
148
|
-
if (this.hasInput) {
|
|
149
|
-
this.showByClickInput = false
|
|
150
|
-
}
|
|
151
136
|
this.$emit('cancel')
|
|
152
137
|
},
|
|
153
138
|
// 点击工具栏的确定按钮
|
|
@@ -156,16 +141,12 @@
|
|
|
156
141
|
value: this.innerValue,
|
|
157
142
|
mode: this.mode
|
|
158
143
|
})
|
|
159
|
-
this.inputValue = dayjs(this.innerValue).format(this.format || 'YYYY-MM-DD HH:mm')
|
|
160
144
|
// #ifdef VUE3
|
|
161
145
|
this.$emit('update:modelValue', this.innerValue)
|
|
162
146
|
// #endif
|
|
163
147
|
// #ifdef VUE2
|
|
164
148
|
this.$emit('input', this.innerValue)
|
|
165
149
|
// #endif
|
|
166
|
-
if (this.hasInput) {
|
|
167
|
-
this.showByClickInput = false
|
|
168
|
-
}
|
|
169
150
|
},
|
|
170
151
|
//用正则截取输出值,当出现多组数字时,抛出错误
|
|
171
152
|
intercept(e,type){
|
|
@@ -233,7 +214,7 @@
|
|
|
233
214
|
setTimeout(() => {
|
|
234
215
|
this.updateIndexs(value)
|
|
235
216
|
}, 0);
|
|
236
|
-
|
|
217
|
+
|
|
237
218
|
},
|
|
238
219
|
// 更新索引
|
|
239
220
|
updateIndexs(value) {
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 是否虚线
|
|
4
5
|
dashed: {
|
|
5
6
|
type: Boolean,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.divider.dashed
|
|
7
8
|
},
|
|
8
9
|
// 是否细线
|
|
9
10
|
hairline: {
|
|
10
11
|
type: Boolean,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.divider.hairline
|
|
12
13
|
},
|
|
13
14
|
// 是否以点替代文字,优先于text字段起作用
|
|
14
15
|
dot: {
|
|
15
16
|
type: Boolean,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.divider.dot
|
|
17
18
|
},
|
|
18
19
|
// 内容文本的位置,left-左边,center-中间,right-右边
|
|
19
20
|
textPosition: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.divider.textPosition
|
|
22
23
|
},
|
|
23
24
|
// 文本内容
|
|
24
25
|
text: {
|
|
25
26
|
type: [String, Number],
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.divider.text
|
|
27
28
|
},
|
|
28
29
|
// 文本大小
|
|
29
30
|
textSize: {
|
|
30
31
|
type: [String, Number],
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.divider.textSize
|
|
32
33
|
},
|
|
33
34
|
// 文本颜色
|
|
34
35
|
textColor: {
|
|
35
36
|
type: String,
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.divider.textColor
|
|
37
38
|
},
|
|
38
39
|
// 线条颜色
|
|
39
40
|
lineColor: {
|
|
40
41
|
type: String,
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.divider.lineColor
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -1,59 +1,60 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 内置图标名称,或图片路径,建议绝对路径
|
|
4
5
|
icon: {
|
|
5
6
|
type: String,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.empty.icon
|
|
7
8
|
},
|
|
8
9
|
// 提示文字
|
|
9
10
|
text: {
|
|
10
11
|
type: String,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.empty.text
|
|
12
13
|
},
|
|
13
14
|
// 文字颜色
|
|
14
15
|
textColor: {
|
|
15
16
|
type: String,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.empty.textColor
|
|
17
18
|
},
|
|
18
19
|
// 文字大小
|
|
19
20
|
textSize: {
|
|
20
21
|
type: [String, Number],
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.empty.textSize
|
|
22
23
|
},
|
|
23
24
|
// 图标的颜色
|
|
24
25
|
iconColor: {
|
|
25
26
|
type: String,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.empty.iconColor
|
|
27
28
|
},
|
|
28
29
|
// 图标的大小
|
|
29
30
|
iconSize: {
|
|
30
31
|
type: [String, Number],
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.empty.iconSize
|
|
32
33
|
},
|
|
33
34
|
// 选择预置的图标类型
|
|
34
35
|
mode: {
|
|
35
36
|
type: String,
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.empty.mode
|
|
37
38
|
},
|
|
38
39
|
// 图标宽度,单位px
|
|
39
40
|
width: {
|
|
40
41
|
type: [String, Number],
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.empty.width
|
|
42
43
|
},
|
|
43
44
|
// 图标高度,单位px
|
|
44
45
|
height: {
|
|
45
46
|
type: [String, Number],
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.empty.height
|
|
47
48
|
},
|
|
48
49
|
// 是否显示组件
|
|
49
50
|
show: {
|
|
50
51
|
type: Boolean,
|
|
51
|
-
default:
|
|
52
|
+
default: defprops.empty.show
|
|
52
53
|
},
|
|
53
54
|
// 组件距离上一个元素之间的距离,默认px单位
|
|
54
55
|
marginTop: {
|
|
55
56
|
type: [String, Number],
|
|
56
|
-
default:
|
|
57
|
+
default: defprops.empty.marginTop
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
}
|
|
@@ -1,45 +1,46 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 当前form的需要验证字段的集合
|
|
4
5
|
model: {
|
|
5
6
|
type: Object,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.form.model
|
|
7
8
|
},
|
|
8
9
|
// 验证规则
|
|
9
10
|
rules: {
|
|
10
11
|
type: [Object, Function, Array],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.form.rules
|
|
12
13
|
},
|
|
13
14
|
// 有错误时的提示方式,message-提示信息,toast-进行toast提示
|
|
14
15
|
// border-bottom-下边框呈现红色,none-无提示
|
|
15
16
|
errorType: {
|
|
16
17
|
type: String,
|
|
17
|
-
default:
|
|
18
|
+
default: defprops.form.errorType
|
|
18
19
|
},
|
|
19
20
|
// 是否显示表单域的下划线边框
|
|
20
21
|
borderBottom: {
|
|
21
22
|
type: Boolean,
|
|
22
|
-
default:
|
|
23
|
+
default: defprops.form.borderBottom
|
|
23
24
|
},
|
|
24
25
|
// label的位置,left-左边,top-上边
|
|
25
26
|
labelPosition: {
|
|
26
27
|
type: String,
|
|
27
|
-
default:
|
|
28
|
+
default: defprops.form.labelPosition
|
|
28
29
|
},
|
|
29
30
|
// label的宽度,单位px
|
|
30
31
|
labelWidth: {
|
|
31
32
|
type: [String, Number],
|
|
32
|
-
default:
|
|
33
|
+
default: defprops.form.labelWidth
|
|
33
34
|
},
|
|
34
35
|
// lable字体的对齐方式
|
|
35
36
|
labelAlign: {
|
|
36
37
|
type: String,
|
|
37
|
-
default:
|
|
38
|
+
default: defprops.form.labelAlign
|
|
38
39
|
},
|
|
39
40
|
// lable的样式,对象形式
|
|
40
41
|
labelStyle: {
|
|
41
42
|
type: Object,
|
|
42
|
-
default:
|
|
43
|
+
default: defprops.form.labelStyle
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
}
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
const propertyName =
|
|
147
147
|
propertyChain[propertyChain.length - 1];
|
|
148
148
|
|
|
149
|
-
const rule = this.formRules[child.
|
|
149
|
+
const rule = this.formRules[child.prop];
|
|
150
150
|
// 如果不存在对应的规则,直接返回,否则校验器会报错
|
|
151
151
|
if (!rule) return;
|
|
152
152
|
// rule规则可为数组形式,也可为对象形式,此处拼接成为数组
|
|
@@ -1,48 +1,44 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// input的label提示语
|
|
4
5
|
label: {
|
|
5
6
|
type: String,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.formItem.label
|
|
7
8
|
},
|
|
8
9
|
// 绑定的值
|
|
9
10
|
prop: {
|
|
10
11
|
type: String,
|
|
11
|
-
default:
|
|
12
|
-
},
|
|
13
|
-
// 绑定的规则
|
|
14
|
-
prop: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: () => uni.$u.props.formItem.rule
|
|
12
|
+
default: defprops.formItem.prop
|
|
17
13
|
},
|
|
18
14
|
// 是否显示表单域的下划线边框
|
|
19
15
|
borderBottom: {
|
|
20
16
|
type: [String, Boolean],
|
|
21
|
-
default:
|
|
17
|
+
default: defprops.formItem.borderBottom
|
|
22
18
|
},
|
|
23
19
|
// label的宽度,单位px
|
|
24
20
|
labelWidth: {
|
|
25
21
|
type: [String, Number],
|
|
26
|
-
default:
|
|
22
|
+
default: defprops.formItem.labelWidth
|
|
27
23
|
},
|
|
28
24
|
// 右侧图标
|
|
29
25
|
rightIcon: {
|
|
30
26
|
type: String,
|
|
31
|
-
default:
|
|
27
|
+
default: defprops.formItem.rightIcon
|
|
32
28
|
},
|
|
33
29
|
// 左侧图标
|
|
34
30
|
leftIcon: {
|
|
35
31
|
type: String,
|
|
36
|
-
default:
|
|
32
|
+
default: defprops.formItem.leftIcon
|
|
37
33
|
},
|
|
38
34
|
// 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
|
|
39
35
|
required: {
|
|
40
36
|
type: Boolean,
|
|
41
|
-
default:
|
|
37
|
+
default: defprops.formItem.required
|
|
42
38
|
},
|
|
43
39
|
leftIconStyle: {
|
|
44
40
|
type: [String, Object],
|
|
45
|
-
default:
|
|
41
|
+
default: defprops.formItem.leftIconStyle,
|
|
46
42
|
}
|
|
47
43
|
}
|
|
48
44
|
}
|
|
@@ -84,7 +84,6 @@
|
|
|
84
84
|
* @tutorial https://ijry.github.io/uview-plus/components/form.html
|
|
85
85
|
* @property {String} label input的label提示语
|
|
86
86
|
* @property {String} prop 绑定的值
|
|
87
|
-
* @property {String} rule 绑定的规则
|
|
88
87
|
* @property {String | Boolean} borderBottom 是否显示表单域的下划线边框
|
|
89
88
|
* @property {String | Number} labelWidth label的宽度,单位px
|
|
90
89
|
* @property {String} rightIcon 右侧图标
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 背景颜色(默认transparent)
|
|
4
5
|
bgColor: {
|
|
5
6
|
type: String,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.gap.bgColor
|
|
7
8
|
},
|
|
8
9
|
// 分割槽高度,单位px(默认30)
|
|
9
10
|
height: {
|
|
10
11
|
type: [String, Number],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.gap.height
|
|
12
13
|
},
|
|
13
14
|
// 与上一个组件的距离
|
|
14
15
|
marginTop: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.gap.marginTop
|
|
17
18
|
},
|
|
18
19
|
// 与下一个组件的距离
|
|
19
20
|
marginBottom: {
|
|
20
21
|
type: [String, Number],
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.gap.marginBottom
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 分成几列
|
|
4
5
|
col: {
|
|
5
6
|
type: [String, Number],
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.grid.col
|
|
7
8
|
},
|
|
8
9
|
// 是否显示边框
|
|
9
10
|
border: {
|
|
10
11
|
type: Boolean,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.grid.border
|
|
12
13
|
},
|
|
13
14
|
// 宫格对齐方式,表现为数量少的时候,靠左,居中,还是靠右
|
|
14
15
|
align: {
|
|
15
16
|
type: String,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.grid.align
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 宫格的name
|
|
4
5
|
name: {
|
|
5
6
|
type: [String, Number, null],
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.gridItem.name
|
|
7
8
|
},
|
|
8
9
|
// 背景颜色
|
|
9
10
|
bgColor: {
|
|
10
11
|
type: String,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.gridItem.bgColor
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
}
|