uview-plus 3.0.17 → 3.1.0
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 +2 -0
- package/components/u--form/u--form.vue +4 -2
- package/components/u--image/u--image.vue +4 -2
- package/components/u--input/u--input.vue +5 -3
- package/components/u--text/u--text.vue +4 -2
- package/components/u--textarea/u--textarea.vue +4 -2
- package/components/u-action-sheet/props.js +11 -10
- package/components/u-action-sheet/u-action-sheet.vue +3 -1
- package/components/u-album/props.js +12 -11
- package/components/u-album/u-album.vue +4 -2
- package/components/u-alert/props.js +9 -8
- package/components/u-alert/u-alert.vue +3 -1
- package/components/u-avatar/props.js +15 -14
- package/components/u-avatar/u-avatar.vue +3 -1
- package/components/u-avatar-group/props.js +10 -9
- package/components/u-avatar-group/u-avatar-group.vue +3 -1
- package/components/u-back-top/props.js +11 -10
- package/components/u-back-top/u-back-top.vue +2 -0
- package/components/u-badge/props.js +15 -14
- package/components/u-badge/u-badge.vue +3 -1
- package/components/u-button/props.js +29 -28
- package/components/u-button/u-button.vue +4 -2
- package/components/u-calendar/month.vue +1 -1
- package/components/u-calendar/props.js +28 -27
- package/components/u-calendar/u-calendar.vue +3 -1
- package/components/u-car-keyboard/props.js +1 -0
- package/components/u-car-keyboard/u-car-keyboard.vue +4 -2
- package/components/u-cell/props.js +18 -17
- package/components/u-cell/u-cell.vue +3 -1
- package/components/u-cell-group/props.js +3 -2
- package/components/u-cell-group/u-cell-group.vue +3 -1
- package/components/u-checkbox/props.js +14 -13
- package/components/u-checkbox/u-checkbox.vue +3 -1
- package/components/u-checkbox-group/props.js +16 -15
- package/components/u-checkbox-group/u-checkbox-group.vue +3 -1
- package/components/u-circle-progress/props.js +2 -1
- package/components/u-circle-progress/u-circle-progress.vue +3 -1
- package/components/u-code/props.js +7 -6
- package/components/u-code/u-code.vue +3 -1
- package/components/u-code-input/props.js +16 -15
- package/components/u-code-input/u-code-input.vue +3 -1
- package/components/u-col/props.js +6 -5
- package/components/u-col/u-col.vue +3 -1
- package/components/u-collapse/props.js +4 -3
- package/components/u-collapse/u-collapse.vue +3 -1
- package/components/u-collapse-item/props.js +12 -11
- package/components/u-collapse-item/u-collapse-item.vue +15 -13
- package/components/u-column-notice/props.js +11 -10
- package/components/u-column-notice/u-column-notice.vue +3 -1
- package/components/u-count-down/props.js +5 -4
- package/components/u-count-down/u-count-down.vue +5 -3
- package/components/u-count-to/props.js +12 -11
- package/components/u-count-to/u-count-to.vue +3 -1
- package/components/u-datetime-picker/props.js +24 -23
- package/components/u-datetime-picker/u-datetime-picker.vue +3 -1
- package/components/u-divider/props.js +9 -8
- package/components/u-divider/u-divider.vue +3 -1
- package/components/u-dropdown/props.js +5 -4
- package/components/u-dropdown/u-dropdown.vue +4 -2
- package/components/u-dropdown-item/props.js +2 -1
- package/components/u-dropdown-item/u-dropdown-item.vue +4 -2
- package/components/u-empty/props.js +12 -11
- package/components/u-empty/u-empty.vue +3 -2
- package/components/u-form/props.js +9 -8
- package/components/u-form/u-form.vue +13 -11
- package/components/u-form-item/props.js +9 -8
- package/components/u-form-item/u-form-item.vue +3 -1
- package/components/u-gap/props.js +5 -4
- package/components/u-gap/u-gap.vue +3 -1
- package/components/u-grid/props.js +4 -3
- package/components/u-grid/u-grid.vue +3 -1
- package/components/u-grid-item/props.js +3 -2
- package/components/u-grid-item/u-grid-item.vue +3 -1
- package/components/u-icon/props.js +18 -17
- package/components/u-icon/u-icon.vue +4 -2
- package/components/u-image/props.js +18 -17
- package/components/u-image/u-image.vue +3 -1
- package/components/u-index-anchor/props.js +6 -5
- package/components/u-index-anchor/u-index-anchor.vue +3 -1
- package/components/u-index-item/props.js +1 -0
- package/components/u-index-item/u-index-item.vue +3 -1
- package/components/u-index-list/props.js +6 -5
- package/components/u-index-list/u-index-list.vue +3 -1
- package/components/u-input/props.js +36 -35
- package/components/u-input/u-input.vue +3 -1
- package/components/u-keyboard/props.js +17 -16
- package/components/u-keyboard/u-keyboard.vue +3 -1
- package/components/u-line/props.js +7 -6
- package/components/u-line/u-line.vue +3 -1
- package/components/u-line-progress/props.js +6 -5
- package/components/u-line-progress/u-line-progress.vue +3 -1
- package/components/u-link/props.js +8 -7
- package/components/u-link/u-link.vue +3 -1
- package/components/u-list/props.js +15 -14
- package/components/u-list/u-list.vue +3 -1
- package/components/u-list-item/props.js +2 -1
- package/components/u-list-item/u-list-item.vue +3 -1
- package/components/u-loading-icon/props.js +13 -12
- package/components/u-loading-icon/u-loading-icon.vue +4 -2
- package/components/u-loading-page/props.js +10 -9
- package/components/u-loading-page/u-loading-page.vue +3 -1
- package/components/u-loadmore/props.js +19 -18
- package/components/u-loadmore/u-loadmore.vue +3 -1
- package/components/u-modal/props.js +17 -16
- package/components/u-modal/u-modal.vue +4 -2
- package/components/u-navbar/props.js +34 -33
- package/components/u-navbar/u-navbar.vue +3 -1
- package/components/u-no-network/props.js +4 -3
- package/components/u-no-network/u-no-network.vue +3 -1
- package/components/u-notice-bar/props.js +14 -13
- package/components/u-notice-bar/u-notice-bar.vue +3 -1
- package/components/u-notify/props.js +10 -9
- package/components/u-notify/u-notify.vue +3 -1
- package/components/u-number-box/props.js +23 -22
- package/components/u-number-box/u-number-box.vue +3 -1
- package/components/u-number-keyboard/props.js +4 -3
- package/components/u-number-keyboard/u-number-keyboard.vue +3 -1
- package/components/u-overlay/props.js +5 -4
- package/components/u-overlay/u-overlay.vue +3 -1
- package/components/u-parse/props.js +9 -8
- package/components/u-picker/props.js +16 -15
- package/components/u-picker/u-picker.vue +3 -1
- package/components/u-picker-column/props.js +1 -0
- package/components/u-picker-column/u-picker-column.vue +3 -1
- package/components/u-popup/props.js +16 -15
- package/components/u-popup/u-popup.vue +4 -2
- package/components/u-radio/props.js +13 -12
- package/components/u-radio/u-radio.vue +3 -1
- package/components/u-radio-group/props.js +18 -17
- package/components/u-radio-group/u-radio-group.vue +3 -1
- package/components/u-rate/props.js +15 -14
- package/components/u-rate/u-rate.vue +3 -1
- package/components/u-read-more/props.js +9 -8
- package/components/u-read-more/u-read-more.vue +3 -1
- package/components/u-row/props.js +4 -3
- package/components/u-row/u-row.vue +3 -1
- package/components/u-row-notice/props.js +8 -7
- package/components/u-row-notice/u-row-notice.vue +3 -1
- package/components/u-safe-bottom/props.js +1 -0
- package/components/u-safe-bottom/u-safe-bottom.vue +4 -2
- package/components/u-scroll-list/props.js +7 -6
- package/components/u-scroll-list/u-scroll-list.vue +3 -1
- package/components/u-search/props.js +25 -24
- package/components/u-search/u-search.vue +3 -1
- package/components/u-skeleton/props.js +12 -11
- package/components/u-skeleton/u-skeleton.vue +3 -1
- package/components/u-slider/props.js +11 -10
- package/components/u-slider/u-slider.vue +5 -3
- package/components/u-status-bar/props.js +2 -1
- package/components/u-status-bar/u-status-bar.vue +3 -1
- package/components/u-steps/props.js +9 -8
- package/components/u-steps/u-steps.vue +3 -1
- package/components/u-steps-item/props.js +5 -4
- package/components/u-steps-item/u-steps-item.vue +3 -1
- package/components/u-sticky/props.js +7 -6
- package/components/u-sticky/u-sticky.vue +4 -2
- package/components/u-subsection/props.js +10 -9
- package/components/u-subsection/u-subsection.vue +3 -1
- package/components/u-swipe-action/props.js +2 -1
- package/components/u-swipe-action/u-swipe-action.vue +3 -1
- package/components/u-swipe-action-item/props.js +7 -6
- package/components/u-swipe-action-item/u-swipe-action-item.vue +5 -3
- package/components/u-swiper/props.js +25 -24
- package/components/u-swiper/u-swiper.vue +3 -1
- package/components/u-swiper-indicator/props.js +6 -5
- package/components/u-swiper-indicator/u-swiper-indicator.vue +3 -1
- package/components/u-switch/props.js +12 -11
- package/components/u-switch/u-switch.vue +3 -1
- package/components/u-tabbar/props.js +9 -8
- package/components/u-tabbar/u-tabbar.vue +3 -1
- package/components/u-tabbar-item/props.js +7 -6
- package/components/u-tabbar-item/u-tabbar-item.vue +3 -1
- package/components/u-table/props.js +1 -0
- package/components/u-table/u-table.vue +3 -1
- package/components/u-tabs/props.js +13 -12
- package/components/u-tabs/u-tabs.vue +3 -1
- package/components/u-tabs-item/props.js +1 -0
- package/components/u-tabs-item/u-tabs-item.vue +3 -1
- package/components/u-tag/props.js +16 -15
- package/components/u-tag/u-tag.vue +5 -3
- package/components/u-td/props.js +1 -0
- package/components/u-td/u-td.vue +3 -1
- package/components/u-text/props.js +22 -21
- package/components/u-text/u-text.vue +4 -2
- package/components/u-textarea/props.js +24 -23
- package/components/u-textarea/u-textarea.vue +3 -1
- package/components/u-toast/u-toast.vue +3 -1
- package/components/u-toolbar/props.js +7 -6
- package/components/u-toolbar/u-toolbar.vue +3 -1
- package/components/u-tooltip/props.js +12 -11
- package/components/u-tooltip/u-tooltip.vue +3 -1
- package/components/u-tr/props.js +1 -0
- package/components/u-tr/u-tr.vue +3 -1
- package/components/u-transition/props.js +5 -4
- package/components/u-transition/u-transition.vue +3 -1
- package/components/u-upload/props.js +23 -22
- package/components/u-upload/u-upload.vue +4 -2
- package/package.json +1 -1
|
@@ -1,54 +1,55 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 是否显示圆点
|
|
4
5
|
isDot: {
|
|
5
6
|
type: Boolean,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.badge.isDot
|
|
7
8
|
},
|
|
8
9
|
// 显示的内容
|
|
9
10
|
value: {
|
|
10
11
|
type: [Number, String],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.badge.value
|
|
12
13
|
},
|
|
13
14
|
// 显示的内容
|
|
14
15
|
modelValue: {
|
|
15
16
|
type: [Number, String],
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.badge.modelValue
|
|
17
18
|
},
|
|
18
19
|
// 是否显示
|
|
19
20
|
show: {
|
|
20
21
|
type: Boolean,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.badge.show
|
|
22
23
|
},
|
|
23
24
|
// 最大值,超过最大值会显示 '{max}+'
|
|
24
25
|
max: {
|
|
25
26
|
type: [Number, String],
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.badge.max
|
|
27
28
|
},
|
|
28
29
|
// 主题类型,error|warning|success|primary
|
|
29
30
|
type: {
|
|
30
31
|
type: String,
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.badge.type
|
|
32
33
|
},
|
|
33
34
|
// 当数值为 0 时,是否展示 Badge
|
|
34
35
|
showZero: {
|
|
35
36
|
type: Boolean,
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.badge.showZero
|
|
37
38
|
},
|
|
38
39
|
// 背景颜色,优先级比type高,如设置,type参数会失效
|
|
39
40
|
bgColor: {
|
|
40
41
|
type: [String, null],
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.badge.bgColor
|
|
42
43
|
},
|
|
43
44
|
// 字体颜色
|
|
44
45
|
color: {
|
|
45
46
|
type: [String, null],
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.badge.color
|
|
47
48
|
},
|
|
48
49
|
// 徽标形状,circle-四角均为圆角,horn-左下角为直角
|
|
49
50
|
shape: {
|
|
50
51
|
type: String,
|
|
51
|
-
default:
|
|
52
|
+
default: defprops.badge.shape
|
|
52
53
|
},
|
|
53
54
|
// 设置数字的显示方式,overflow|ellipsis|limit
|
|
54
55
|
// overflow会根据max字段判断,超出显示`${max}+`
|
|
@@ -56,22 +57,22 @@ export default {
|
|
|
56
57
|
// limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
|
|
57
58
|
numberType: {
|
|
58
59
|
type: String,
|
|
59
|
-
default:
|
|
60
|
+
default: defprops.badge.numberType
|
|
60
61
|
},
|
|
61
62
|
// 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
|
|
62
63
|
offset: {
|
|
63
64
|
type: Array,
|
|
64
|
-
default:
|
|
65
|
+
default: defprops.badge.offset
|
|
65
66
|
},
|
|
66
67
|
// 是否反转背景和字体颜色
|
|
67
68
|
inverted: {
|
|
68
69
|
type: Boolean,
|
|
69
|
-
default:
|
|
70
|
+
default: defprops.badge.inverted
|
|
70
71
|
},
|
|
71
72
|
// 是否绝对定位
|
|
72
73
|
absolute: {
|
|
73
74
|
type: Boolean,
|
|
74
|
-
default:
|
|
75
|
+
default: defprops.badge.absolute
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
<script>
|
|
11
11
|
import props from './props.js';
|
|
12
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
13
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
12
14
|
/**
|
|
13
15
|
* badge 徽标数
|
|
14
16
|
* @description 该组件一般用于图标右上角显示未读的消息数量,提示用户点击,有圆点和圆包含文字两种形式。
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
*/
|
|
33
35
|
export default {
|
|
34
36
|
name: 'u-badge',
|
|
35
|
-
mixins: [
|
|
37
|
+
mixins: [mpMixin, props, mixin],
|
|
36
38
|
computed: {
|
|
37
39
|
// 是否将badge中心与父组件右上角重合
|
|
38
40
|
boxStyle() {
|
|
@@ -7,155 +7,156 @@
|
|
|
7
7
|
* @lastTime : 2021-08-16 10:04:24
|
|
8
8
|
* @FilePath : /u-view2.0/uview-ui/components/u-button/props.js
|
|
9
9
|
*/
|
|
10
|
+
import defprops from '../../libs/config/props';
|
|
10
11
|
export default {
|
|
11
12
|
props: {
|
|
12
13
|
// 是否细边框
|
|
13
14
|
hairline: {
|
|
14
15
|
type: Boolean,
|
|
15
|
-
default:
|
|
16
|
+
default: defprops.button.hairline
|
|
16
17
|
},
|
|
17
18
|
// 按钮的预置样式,info,primary,error,warning,success
|
|
18
19
|
type: {
|
|
19
20
|
type: String,
|
|
20
|
-
default:
|
|
21
|
+
default: defprops.button.type
|
|
21
22
|
},
|
|
22
23
|
// 按钮尺寸,large,normal,small,mini
|
|
23
24
|
size: {
|
|
24
25
|
type: String,
|
|
25
|
-
default:
|
|
26
|
+
default: defprops.button.size
|
|
26
27
|
},
|
|
27
28
|
// 按钮形状,circle(两边为半圆),square(带圆角)
|
|
28
29
|
shape: {
|
|
29
30
|
type: String,
|
|
30
|
-
default:
|
|
31
|
+
default: defprops.button.shape
|
|
31
32
|
},
|
|
32
33
|
// 按钮是否镂空
|
|
33
34
|
plain: {
|
|
34
35
|
type: Boolean,
|
|
35
|
-
default:
|
|
36
|
+
default: defprops.button.plain
|
|
36
37
|
},
|
|
37
38
|
// 是否禁止状态
|
|
38
39
|
disabled: {
|
|
39
40
|
type: Boolean,
|
|
40
|
-
default:
|
|
41
|
+
default: defprops.button.disabled
|
|
41
42
|
},
|
|
42
43
|
// 是否加载中
|
|
43
44
|
loading: {
|
|
44
45
|
type: Boolean,
|
|
45
|
-
default:
|
|
46
|
+
default: defprops.button.loading
|
|
46
47
|
},
|
|
47
48
|
// 加载中提示文字
|
|
48
49
|
loadingText: {
|
|
49
50
|
type: [String, Number],
|
|
50
|
-
default:
|
|
51
|
+
default: defprops.button.loadingText
|
|
51
52
|
},
|
|
52
53
|
// 加载状态图标类型
|
|
53
54
|
loadingMode: {
|
|
54
55
|
type: String,
|
|
55
|
-
default:
|
|
56
|
+
default: defprops.button.loadingMode
|
|
56
57
|
},
|
|
57
58
|
// 加载图标大小
|
|
58
59
|
loadingSize: {
|
|
59
60
|
type: [String, Number],
|
|
60
|
-
default:
|
|
61
|
+
default: defprops.button.loadingSize
|
|
61
62
|
},
|
|
62
63
|
// 开放能力,具体请看uniapp稳定关于button组件部分说明
|
|
63
64
|
// https://uniapp.dcloud.io/component/button
|
|
64
65
|
openType: {
|
|
65
66
|
type: String,
|
|
66
|
-
default:
|
|
67
|
+
default: defprops.button.openType
|
|
67
68
|
},
|
|
68
69
|
// 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
|
|
69
70
|
// 取值为submit(提交表单),reset(重置表单)
|
|
70
71
|
formType: {
|
|
71
72
|
type: String,
|
|
72
|
-
default:
|
|
73
|
+
default: defprops.button.formType
|
|
73
74
|
},
|
|
74
75
|
// 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效
|
|
75
76
|
// 只微信小程序、QQ小程序有效
|
|
76
77
|
appParameter: {
|
|
77
78
|
type: String,
|
|
78
|
-
default:
|
|
79
|
+
default: defprops.button.appParameter
|
|
79
80
|
},
|
|
80
81
|
// 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效
|
|
81
82
|
hoverStopPropagation: {
|
|
82
83
|
type: Boolean,
|
|
83
|
-
default:
|
|
84
|
+
default: defprops.button.hoverStopPropagation
|
|
84
85
|
},
|
|
85
86
|
// 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效
|
|
86
87
|
lang: {
|
|
87
88
|
type: String,
|
|
88
|
-
default:
|
|
89
|
+
default: defprops.button.lang
|
|
89
90
|
},
|
|
90
91
|
// 会话来源,open-type="contact"时有效。只微信小程序有效
|
|
91
92
|
sessionFrom: {
|
|
92
93
|
type: String,
|
|
93
|
-
default:
|
|
94
|
+
default: defprops.button.sessionFrom
|
|
94
95
|
},
|
|
95
96
|
// 会话内消息卡片标题,open-type="contact"时有效
|
|
96
97
|
// 默认当前标题,只微信小程序有效
|
|
97
98
|
sendMessageTitle: {
|
|
98
99
|
type: String,
|
|
99
|
-
default:
|
|
100
|
+
default: defprops.button.sendMessageTitle
|
|
100
101
|
},
|
|
101
102
|
// 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效
|
|
102
103
|
// 默认当前分享路径,只微信小程序有效
|
|
103
104
|
sendMessagePath: {
|
|
104
105
|
type: String,
|
|
105
|
-
default:
|
|
106
|
+
default: defprops.button.sendMessagePath
|
|
106
107
|
},
|
|
107
108
|
// 会话内消息卡片图片,open-type="contact"时有效
|
|
108
109
|
// 默认当前页面截图,只微信小程序有效
|
|
109
110
|
sendMessageImg: {
|
|
110
111
|
type: String,
|
|
111
|
-
default:
|
|
112
|
+
default: defprops.button.sendMessageImg
|
|
112
113
|
},
|
|
113
114
|
// 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,
|
|
114
115
|
// 用户点击后可以快速发送小程序消息,open-type="contact"时有效
|
|
115
116
|
showMessageCard: {
|
|
116
117
|
type: Boolean,
|
|
117
|
-
default:
|
|
118
|
+
default: defprops.button.showMessageCard
|
|
118
119
|
},
|
|
119
120
|
// 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
|
|
120
121
|
dataName: {
|
|
121
122
|
type: String,
|
|
122
|
-
default:
|
|
123
|
+
default: defprops.button.dataName
|
|
123
124
|
},
|
|
124
125
|
// 节流,一定时间内只能触发一次
|
|
125
126
|
throttleTime: {
|
|
126
127
|
type: [String, Number],
|
|
127
|
-
default:
|
|
128
|
+
default: defprops.button.throttleTime
|
|
128
129
|
},
|
|
129
130
|
// 按住后多久出现点击态,单位毫秒
|
|
130
131
|
hoverStartTime: {
|
|
131
132
|
type: [String, Number],
|
|
132
|
-
default:
|
|
133
|
+
default: defprops.button.hoverStartTime
|
|
133
134
|
},
|
|
134
135
|
// 手指松开后点击态保留时间,单位毫秒
|
|
135
136
|
hoverStayTime: {
|
|
136
137
|
type: [String, Number],
|
|
137
|
-
default:
|
|
138
|
+
default: defprops.button.hoverStayTime
|
|
138
139
|
},
|
|
139
140
|
// 按钮文字,之所以通过props传入,是因为slot传入的话
|
|
140
141
|
// nvue中无法控制文字的样式
|
|
141
142
|
text: {
|
|
142
143
|
type: [String, Number],
|
|
143
|
-
default:
|
|
144
|
+
default: defprops.button.text
|
|
144
145
|
},
|
|
145
146
|
// 按钮图标
|
|
146
147
|
icon: {
|
|
147
148
|
type: String,
|
|
148
|
-
default:
|
|
149
|
+
default: defprops.button.icon
|
|
149
150
|
},
|
|
150
151
|
// 按钮图标
|
|
151
152
|
iconColor: {
|
|
152
153
|
type: String,
|
|
153
|
-
default:
|
|
154
|
+
default: defprops.button.icon
|
|
154
155
|
},
|
|
155
156
|
// 按钮颜色,支持传入linear-gradient渐变色
|
|
156
157
|
color: {
|
|
157
158
|
type: String,
|
|
158
|
-
default:
|
|
159
|
+
default: defprops.button.color
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
162
|
}
|
|
@@ -111,6 +111,8 @@
|
|
|
111
111
|
<script>
|
|
112
112
|
import button from "../../libs/mixin/button.js";
|
|
113
113
|
import openType from "../../libs/mixin/openType.js";
|
|
114
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
115
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
114
116
|
import props from "./props.js";
|
|
115
117
|
/**
|
|
116
118
|
* button 按钮
|
|
@@ -158,10 +160,10 @@ import props from "./props.js";
|
|
|
158
160
|
export default {
|
|
159
161
|
name: "u-button",
|
|
160
162
|
// #ifdef MP
|
|
161
|
-
mixins: [
|
|
163
|
+
mixins: [mpMixin, mixin, button, openType, props],
|
|
162
164
|
// #endif
|
|
163
165
|
// #ifndef MP
|
|
164
|
-
mixins: [
|
|
166
|
+
mixins: [mpMixin, mixin, props],
|
|
165
167
|
// #endif
|
|
166
168
|
data() {
|
|
167
169
|
return {};
|
|
@@ -1,139 +1,140 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
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: {
|
|
@@ -71,6 +71,8 @@ import util from './util.js'
|
|
|
71
71
|
// import dayjs from '../../libs/util/dayjs.js'
|
|
72
72
|
import dayjs from 'dayjs'
|
|
73
73
|
import Calendar from '../../libs/util/calendar.js'
|
|
74
|
+
import mpMixin from '../../libs/mixin/mpMixin.js'
|
|
75
|
+
import mixin from '../../libs/mixin/mixin.js'
|
|
74
76
|
/**
|
|
75
77
|
* Calendar 日历
|
|
76
78
|
* @description 此组件用于单个选择日期,范围选择日期等,日历被包裹在底部弹起的容器中.
|
|
@@ -111,7 +113,7 @@ import Calendar from '../../libs/util/calendar.js'
|
|
|
111
113
|
* */
|
|
112
114
|
export default {
|
|
113
115
|
name: 'u-calendar',
|
|
114
|
-
mixins: [
|
|
116
|
+
mixins: [mpMixin, mixin, props],
|
|
115
117
|
components: {
|
|
116
118
|
uHeader,
|
|
117
119
|
uMonth
|
|
@@ -68,7 +68,9 @@
|
|
|
68
68
|
</template>
|
|
69
69
|
|
|
70
70
|
<script>
|
|
71
|
-
import props from './props.js';
|
|
71
|
+
import props from './props.js';
|
|
72
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
73
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
72
74
|
/**
|
|
73
75
|
* keyboard 键盘组件
|
|
74
76
|
* @description 此为uView自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3种模式,都有可以打乱按键顺序的选项。
|
|
@@ -80,7 +82,7 @@
|
|
|
80
82
|
*/
|
|
81
83
|
export default {
|
|
82
84
|
name: "u-keyboard",
|
|
83
|
-
mixins: [
|
|
85
|
+
mixins: [mpMixin, mixin, props],
|
|
84
86
|
data() {
|
|
85
87
|
return {
|
|
86
88
|
// 车牌输入时,abc=true为输入车牌号码,bac=false为输入省份中文简称
|
|
@@ -1,74 +1,75 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
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: {
|
|
@@ -94,17 +95,17 @@ export default {
|
|
|
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
|
}
|
|
@@ -41,6 +41,8 @@
|
|
|
41
41
|
|
|
42
42
|
<script>
|
|
43
43
|
import props from './props.js';
|
|
44
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
45
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
44
46
|
/**
|
|
45
47
|
* cell 单元格
|
|
46
48
|
* @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。
|
|
@@ -76,7 +78,7 @@
|
|
|
76
78
|
|
|
77
79
|
}
|
|
78
80
|
},
|
|
79
|
-
mixins: [
|
|
81
|
+
mixins: [mpMixin, mixin, props],
|
|
80
82
|
computed: {
|
|
81
83
|
titleTextStyle() {
|
|
82
84
|
return uni.$u.addStyle(this.titleStyle)
|