uview-plus 3.0.14 → 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 +8 -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 +12 -8
- 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 +12 -12
- 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 +4 -2
- 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 +5 -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 +7 -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 +5 -8
|
@@ -1,119 +1,120 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 输入框的内容
|
|
4
5
|
value: {
|
|
5
6
|
type: [String, Number],
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.textarea.value
|
|
7
8
|
},
|
|
8
9
|
// 输入框的内容
|
|
9
10
|
modelValue: {
|
|
10
11
|
type: [String, Number],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.textarea.value
|
|
12
13
|
},
|
|
13
14
|
// 输入框为空时占位符
|
|
14
15
|
placeholder: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.textarea.placeholder
|
|
17
18
|
},
|
|
18
19
|
// 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
|
|
19
20
|
placeholderClass: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.input.placeholderClass
|
|
22
23
|
},
|
|
23
24
|
// 指定placeholder的样式
|
|
24
25
|
placeholderStyle: {
|
|
25
26
|
type: [String, Object],
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.input.placeholderStyle
|
|
27
28
|
},
|
|
28
29
|
// 输入框高度
|
|
29
30
|
height: {
|
|
30
31
|
type: [String, Number],
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.textarea.height
|
|
32
33
|
},
|
|
33
34
|
// 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
|
|
34
35
|
confirmType: {
|
|
35
36
|
type: String,
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.textarea.confirmType
|
|
37
38
|
},
|
|
38
39
|
// 是否禁用
|
|
39
40
|
disabled: {
|
|
40
41
|
type: Boolean,
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.textarea.disabled
|
|
42
43
|
},
|
|
43
44
|
// 是否显示统计字数
|
|
44
45
|
count: {
|
|
45
46
|
type: Boolean,
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.textarea.count
|
|
47
48
|
},
|
|
48
49
|
// 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
|
|
49
50
|
focus: {
|
|
50
51
|
type: Boolean,
|
|
51
|
-
default:
|
|
52
|
+
default: defprops.textarea.focus
|
|
52
53
|
},
|
|
53
54
|
// 是否自动增加高度
|
|
54
55
|
autoHeight: {
|
|
55
56
|
type: Boolean,
|
|
56
|
-
default:
|
|
57
|
+
default: defprops.textarea.autoHeight
|
|
57
58
|
},
|
|
58
59
|
// 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
|
|
59
60
|
fixed: {
|
|
60
61
|
type: Boolean,
|
|
61
|
-
default:
|
|
62
|
+
default: defprops.textarea.fixed
|
|
62
63
|
},
|
|
63
64
|
// 指定光标与键盘的距离
|
|
64
65
|
cursorSpacing: {
|
|
65
66
|
type: Number,
|
|
66
|
-
default:
|
|
67
|
+
default: defprops.textarea.cursorSpacing
|
|
67
68
|
},
|
|
68
69
|
// 指定focus时的光标位置
|
|
69
70
|
cursor: {
|
|
70
71
|
type: [String, Number],
|
|
71
|
-
default:
|
|
72
|
+
default: defprops.textarea.cursor
|
|
72
73
|
},
|
|
73
74
|
// 是否显示键盘上方带有”完成“按钮那一栏,
|
|
74
75
|
showConfirmBar: {
|
|
75
76
|
type: Boolean,
|
|
76
|
-
default:
|
|
77
|
+
default: defprops.textarea.showConfirmBar
|
|
77
78
|
},
|
|
78
79
|
// 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
|
|
79
80
|
selectionStart: {
|
|
80
81
|
type: Number,
|
|
81
|
-
default:
|
|
82
|
+
default: defprops.textarea.selectionStart
|
|
82
83
|
},
|
|
83
84
|
// 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
|
|
84
85
|
selectionEnd: {
|
|
85
86
|
type: Number,
|
|
86
|
-
default:
|
|
87
|
+
default: defprops.textarea.selectionEnd
|
|
87
88
|
},
|
|
88
89
|
// 键盘弹起时,是否自动上推页面
|
|
89
90
|
adjustPosition: {
|
|
90
91
|
type: Boolean,
|
|
91
|
-
default:
|
|
92
|
+
default: defprops.textarea.adjustPosition
|
|
92
93
|
},
|
|
93
94
|
// 是否去掉 iOS 下的默认内边距,只微信小程序有效
|
|
94
95
|
disableDefaultPadding: {
|
|
95
96
|
type: Boolean,
|
|
96
|
-
default:
|
|
97
|
+
default: defprops.textarea.disableDefaultPadding
|
|
97
98
|
},
|
|
98
99
|
// focus时,点击页面的时候不收起键盘,只微信小程序有效
|
|
99
100
|
holdKeyboard: {
|
|
100
101
|
type: Boolean,
|
|
101
|
-
default:
|
|
102
|
+
default: defprops.textarea.holdKeyboard
|
|
102
103
|
},
|
|
103
104
|
// 最大输入长度,设置为 -1 的时候不限制最大长度
|
|
104
105
|
maxlength: {
|
|
105
106
|
type: [String, Number],
|
|
106
|
-
default:
|
|
107
|
+
default: defprops.textarea.maxlength
|
|
107
108
|
},
|
|
108
109
|
// 边框类型,surround-四周边框,bottom-底部边框
|
|
109
110
|
border: {
|
|
110
111
|
type: String,
|
|
111
|
-
default:
|
|
112
|
+
default: defprops.textarea.border
|
|
112
113
|
},
|
|
113
114
|
// 用于处理或者过滤输入框内容的方法
|
|
114
115
|
formatter: {
|
|
115
116
|
type: [Function, null],
|
|
116
|
-
default:
|
|
117
|
+
default: defprops.textarea.formatter
|
|
117
118
|
},
|
|
118
119
|
// 是否忽略组件内对文本合成系统事件的处理
|
|
119
120
|
ignoreCompositionEvent: {
|
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
|
|
43
43
|
<script>
|
|
44
44
|
import props from "./props.js";
|
|
45
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
46
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
45
47
|
/**
|
|
46
48
|
* Textarea 文本域
|
|
47
49
|
* @description 文本域此组件满足了可能出现的表单信息补充,编辑等实际逻辑的功能,内置了字数校验等
|
|
@@ -81,7 +83,7 @@ import props from "./props.js";
|
|
|
81
83
|
*/
|
|
82
84
|
export default {
|
|
83
85
|
name: "u-textarea",
|
|
84
|
-
mixins: [
|
|
86
|
+
mixins: [mpMixin, mixin, props],
|
|
85
87
|
data() {
|
|
86
88
|
return {
|
|
87
89
|
// 输入框的值
|
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<script>
|
|
42
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
43
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
42
44
|
/**
|
|
43
45
|
* toast 消息提示
|
|
44
46
|
* @description 此组件表现形式类似uni的uni.showToastAPI,但也有不同的地方。
|
|
@@ -63,7 +65,7 @@
|
|
|
63
65
|
*/
|
|
64
66
|
export default {
|
|
65
67
|
name: 'u-toast',
|
|
66
|
-
mixins: [
|
|
68
|
+
mixins: [mpMixin, mixin],
|
|
67
69
|
data() {
|
|
68
70
|
return {
|
|
69
71
|
isShow: false,
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 是否展示工具条
|
|
4
5
|
show: {
|
|
5
6
|
type: Boolean,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.toolbar.show
|
|
7
8
|
},
|
|
8
9
|
// 取消按钮的文字
|
|
9
10
|
cancelText: {
|
|
10
11
|
type: String,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.toolbar.cancelText
|
|
12
13
|
},
|
|
13
14
|
// 确认按钮的文字
|
|
14
15
|
confirmText: {
|
|
15
16
|
type: String,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.toolbar.confirmText
|
|
17
18
|
},
|
|
18
19
|
// 取消按钮的颜色
|
|
19
20
|
cancelColor: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.toolbar.cancelColor
|
|
22
23
|
},
|
|
23
24
|
// 确认按钮的颜色
|
|
24
25
|
confirmColor: {
|
|
25
26
|
type: String,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.toolbar.confirmColor
|
|
27
28
|
},
|
|
28
29
|
// 标题文字
|
|
29
30
|
title: {
|
|
30
31
|
type: String,
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.toolbar.title
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
}
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
|
|
38
38
|
<script>
|
|
39
39
|
import props from './props.js';
|
|
40
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
41
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
40
42
|
/**
|
|
41
43
|
* Toolbar 工具条
|
|
42
44
|
* @description
|
|
@@ -52,7 +54,7 @@
|
|
|
52
54
|
*/
|
|
53
55
|
export default {
|
|
54
56
|
name: 'u-toolbar',
|
|
55
|
-
mixins: [
|
|
57
|
+
mixins: [mpMixin, mixin, props],
|
|
56
58
|
methods: {
|
|
57
59
|
// 点击取消按钮
|
|
58
60
|
cancel() {
|
|
@@ -1,59 +1,60 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 需要显示的提示文字
|
|
4
5
|
text: {
|
|
5
6
|
type: [String, Number],
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.tooltip.text
|
|
7
8
|
},
|
|
8
9
|
// 点击复制按钮时,复制的文本,为空则使用text值
|
|
9
10
|
copyText: {
|
|
10
11
|
type: [String, Number],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.tooltip.copyText
|
|
12
13
|
},
|
|
13
14
|
// 文本大小
|
|
14
15
|
size: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.tooltip.size
|
|
17
18
|
},
|
|
18
19
|
// 字体颜色
|
|
19
20
|
color: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.tooltip.color
|
|
22
23
|
},
|
|
23
24
|
// 弹出提示框时,文本的背景色
|
|
24
25
|
bgColor: {
|
|
25
26
|
type: String,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.tooltip.bgColor
|
|
27
28
|
},
|
|
28
29
|
// 弹出提示的方向,top-上方,bottom-下方
|
|
29
30
|
direction: {
|
|
30
31
|
type: String,
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.tooltip.direction
|
|
32
33
|
},
|
|
33
34
|
// 弹出提示的z-index,nvue无效
|
|
34
35
|
zIndex: {
|
|
35
36
|
type: [String, Number],
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.tooltip.zIndex
|
|
37
38
|
},
|
|
38
39
|
// 是否显示复制按钮
|
|
39
40
|
showCopy: {
|
|
40
41
|
type: Boolean,
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.tooltip.showCopy
|
|
42
43
|
},
|
|
43
44
|
// 扩展的按钮组
|
|
44
45
|
buttons: {
|
|
45
46
|
type: Array,
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.tooltip.buttons
|
|
47
48
|
},
|
|
48
49
|
// 是否显示透明遮罩以防止触摸穿透
|
|
49
50
|
overlay: {
|
|
50
51
|
type: Boolean,
|
|
51
|
-
default:
|
|
52
|
+
default: defprops.tooltip.overlay
|
|
52
53
|
},
|
|
53
54
|
// 是否显示复制成功或者失败的toast
|
|
54
55
|
showToast: {
|
|
55
56
|
type: Boolean,
|
|
56
|
-
default:
|
|
57
|
+
default: defprops.tooltip.showToast
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
}
|
|
@@ -91,6 +91,8 @@
|
|
|
91
91
|
|
|
92
92
|
<script>
|
|
93
93
|
import props from './props.js';
|
|
94
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
95
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
94
96
|
// #ifdef APP-NVUE
|
|
95
97
|
const dom = uni.requireNativePlugin('dom')
|
|
96
98
|
// #endif
|
|
@@ -119,7 +121,7 @@
|
|
|
119
121
|
*/
|
|
120
122
|
export default {
|
|
121
123
|
name: 'u-tooltip',
|
|
122
|
-
mixins: [
|
|
124
|
+
mixins: [mpMixin, mixin, props],
|
|
123
125
|
data() {
|
|
124
126
|
return {
|
|
125
127
|
// 是否展示气泡
|
package/components/u-tr/props.js
CHANGED
package/components/u-tr/u-tr.vue
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
8
|
import props from './props.js';
|
|
9
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
10
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
9
11
|
/**
|
|
10
12
|
* Tr
|
|
11
13
|
* @description
|
|
@@ -16,7 +18,7 @@
|
|
|
16
18
|
*/
|
|
17
19
|
export default {
|
|
18
20
|
name: 'u-tr',
|
|
19
|
-
mixins: [
|
|
21
|
+
mixins: [mpMixin, mixin, props],
|
|
20
22
|
data() {
|
|
21
23
|
return {
|
|
22
24
|
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 是否展示组件
|
|
4
5
|
show: {
|
|
5
6
|
type: Boolean,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.transition.show
|
|
7
8
|
},
|
|
8
9
|
// 使用的动画模式
|
|
9
10
|
mode: {
|
|
10
11
|
type: String,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.transition.mode
|
|
12
13
|
},
|
|
13
14
|
// 动画的执行时间,单位ms
|
|
14
15
|
duration: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.transition.duration
|
|
17
18
|
},
|
|
18
19
|
// 使用的动画过渡函数
|
|
19
20
|
timingFunction: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.transition.timingFunction
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
<script>
|
|
16
16
|
import props from './props.js';
|
|
17
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
18
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
17
19
|
// 组件的methods方法,由于内容较长,写在外部文件中通过mixin引入
|
|
18
20
|
import transition from "./transition.js";
|
|
19
21
|
/**
|
|
@@ -61,7 +63,7 @@ export default {
|
|
|
61
63
|
}
|
|
62
64
|
},
|
|
63
65
|
// 将mixin挂在到组件中,uni.$u.mixin实际上为一个vue格式对象
|
|
64
|
-
mixins: [
|
|
66
|
+
mixins: [mpMixin, mixin, transition, props],
|
|
65
67
|
watch: {
|
|
66
68
|
show: {
|
|
67
69
|
handler(newVal) {
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 接受的文件类型, 可选值为all media image file video
|
|
4
5
|
accept: {
|
|
5
6
|
type: String,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.upload.accept
|
|
7
8
|
},
|
|
8
9
|
// 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
|
|
9
10
|
capture: {
|
|
10
11
|
type: [String, Array],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.upload.capture
|
|
12
13
|
},
|
|
13
14
|
// 当accept为video时生效,是否压缩视频,默认为true
|
|
14
15
|
compressed: {
|
|
15
16
|
type: Boolean,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.upload.compressed
|
|
17
18
|
},
|
|
18
19
|
// 当accept为video时生效,可选值为back或front
|
|
19
20
|
camera: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.upload.camera
|
|
22
23
|
},
|
|
23
24
|
// 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
|
|
24
25
|
maxDuration: {
|
|
25
26
|
type: Number,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.upload.maxDuration
|
|
27
28
|
},
|
|
28
29
|
// 上传区域的图标,只能内置图标
|
|
29
30
|
uploadIcon: {
|
|
30
31
|
type: String,
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.upload.uploadIcon
|
|
32
33
|
},
|
|
33
34
|
// 上传区域的图标的颜色,默认
|
|
34
35
|
uploadIconColor: {
|
|
35
36
|
type: String,
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.upload.uploadIconColor
|
|
37
38
|
},
|
|
38
39
|
// 是否开启文件读取前事件
|
|
39
40
|
useBeforeRead: {
|
|
40
41
|
type: Boolean,
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.upload.useBeforeRead
|
|
42
43
|
},
|
|
43
44
|
// 读取后的处理函数
|
|
44
45
|
afterRead: {
|
|
@@ -53,72 +54,72 @@ export default {
|
|
|
53
54
|
// 是否显示组件自带的图片预览功能
|
|
54
55
|
previewFullImage: {
|
|
55
56
|
type: Boolean,
|
|
56
|
-
default:
|
|
57
|
+
default: defprops.upload.previewFullImage
|
|
57
58
|
},
|
|
58
59
|
// 最大上传数量
|
|
59
60
|
maxCount: {
|
|
60
61
|
type: [String, Number],
|
|
61
|
-
default:
|
|
62
|
+
default: defprops.upload.maxCount
|
|
62
63
|
},
|
|
63
64
|
// 是否启用
|
|
64
65
|
disabled: {
|
|
65
66
|
type: Boolean,
|
|
66
|
-
default:
|
|
67
|
+
default: defprops.upload.disabled
|
|
67
68
|
},
|
|
68
69
|
// 预览上传的图片时的裁剪模式,和image组件mode属性一致
|
|
69
70
|
imageMode: {
|
|
70
71
|
type: String,
|
|
71
|
-
default:
|
|
72
|
+
default: defprops.upload.imageMode
|
|
72
73
|
},
|
|
73
74
|
// 标识符,可以在回调函数的第二项参数中获取
|
|
74
75
|
name: {
|
|
75
76
|
type: String,
|
|
76
|
-
default:
|
|
77
|
+
default: defprops.upload.name
|
|
77
78
|
},
|
|
78
79
|
// 所选的图片的尺寸, 可选值为original compressed
|
|
79
80
|
sizeType: {
|
|
80
81
|
type: Array,
|
|
81
|
-
default:
|
|
82
|
+
default: defprops.upload.sizeType
|
|
82
83
|
},
|
|
83
84
|
// 是否开启图片多选,部分安卓机型不支持
|
|
84
85
|
multiple: {
|
|
85
86
|
type: Boolean,
|
|
86
|
-
default:
|
|
87
|
+
default: defprops.upload.multiple
|
|
87
88
|
},
|
|
88
89
|
// 是否展示删除按钮
|
|
89
90
|
deletable: {
|
|
90
91
|
type: Boolean,
|
|
91
|
-
default:
|
|
92
|
+
default: defprops.upload.deletable
|
|
92
93
|
},
|
|
93
94
|
// 文件大小限制,单位为byte
|
|
94
95
|
maxSize: {
|
|
95
96
|
type: [String, Number],
|
|
96
|
-
default:
|
|
97
|
+
default: defprops.upload.maxSize
|
|
97
98
|
},
|
|
98
99
|
// 显示已上传的文件列表
|
|
99
100
|
fileList: {
|
|
100
101
|
type: Array,
|
|
101
|
-
default:
|
|
102
|
+
default: defprops.upload.fileList
|
|
102
103
|
},
|
|
103
104
|
// 上传区域的提示文字
|
|
104
105
|
uploadText: {
|
|
105
106
|
type: String,
|
|
106
|
-
default:
|
|
107
|
+
default: defprops.upload.uploadText
|
|
107
108
|
},
|
|
108
109
|
// 内部预览图片区域和选择图片按钮的区域宽度
|
|
109
110
|
width: {
|
|
110
111
|
type: [String, Number],
|
|
111
|
-
default:
|
|
112
|
+
default: defprops.upload.width
|
|
112
113
|
},
|
|
113
114
|
// 内部预览图片区域和选择图片按钮的区域高度
|
|
114
115
|
height: {
|
|
115
116
|
type: [String, Number],
|
|
116
|
-
default:
|
|
117
|
+
default: defprops.upload.height
|
|
117
118
|
},
|
|
118
119
|
// 是否在上传完成后展示预览图
|
|
119
120
|
previewImage: {
|
|
120
121
|
type: Boolean,
|
|
121
|
-
default:
|
|
122
|
+
default: defprops.upload.previewImage
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
125
|
}
|
|
@@ -128,8 +128,10 @@
|
|
|
128
128
|
import {
|
|
129
129
|
chooseFile
|
|
130
130
|
} from './utils';
|
|
131
|
-
import
|
|
131
|
+
import mixinUp from './mixin.js';
|
|
132
132
|
import props from './props.js';
|
|
133
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
134
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
133
135
|
|
|
134
136
|
/**
|
|
135
137
|
* upload 上传
|
|
@@ -166,7 +168,7 @@
|
|
|
166
168
|
*/
|
|
167
169
|
export default {
|
|
168
170
|
name: "u-upload",
|
|
169
|
-
mixins: [
|
|
171
|
+
mixins: [mpMixin, mixin, mixinUp, props],
|
|
170
172
|
data() {
|
|
171
173
|
return {
|
|
172
174
|
// #ifdef APP-NVUE
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "uview-plus",
|
|
3
3
|
"name": "uview-plus",
|
|
4
4
|
"displayName": "uview-plus3.0重磅发布,利剑出鞘,一统江湖",
|
|
5
|
-
"version": "3.0
|
|
5
|
+
"version": "3.1.0",
|
|
6
6
|
"description": "uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"uview",
|
|
@@ -17,12 +17,8 @@
|
|
|
17
17
|
"engines": {
|
|
18
18
|
"HBuilderX": "^3.1.0"
|
|
19
19
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"前端组件",
|
|
23
|
-
"通用组件"
|
|
24
|
-
],
|
|
25
|
-
"sale": {
|
|
20
|
+
"dcloudext": {
|
|
21
|
+
"sale": {
|
|
26
22
|
"regular": {
|
|
27
23
|
"price": "0.00"
|
|
28
24
|
},
|
|
@@ -38,7 +34,8 @@
|
|
|
38
34
|
"data": "无",
|
|
39
35
|
"permissions": "无"
|
|
40
36
|
},
|
|
41
|
-
|
|
37
|
+
"npmurl": "https://www.npmjs.com/package/uview-plus",
|
|
38
|
+
"type": "component-vue"
|
|
42
39
|
},
|
|
43
40
|
"uni_modules": {
|
|
44
41
|
"dependencies": [],
|