uview-plus 3.1.50 → 3.1.52
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 +18 -1
- package/components/u-action-sheet/props.js +10 -11
- package/components/u-album/props.js +11 -12
- package/components/u-alert/props.js +8 -9
- package/components/u-avatar/props.js +14 -15
- package/components/u-avatar-group/props.js +9 -10
- package/components/u-back-top/props.js +10 -11
- package/components/u-back-top/u-back-top.vue +1 -1
- package/components/u-badge/props.js +14 -15
- package/components/u-badge/u-badge.vue +1 -1
- package/components/u-button/props.js +28 -29
- package/components/u-button/u-button.vue +6 -6
- package/components/u-button/vue.scss +8 -7
- package/components/u-calendar/month.vue +1 -1
- package/components/u-calendar/props.js +27 -28
- package/components/u-car-keyboard/props.js +0 -1
- package/components/u-car-keyboard/u-car-keyboard.vue +1 -1
- package/components/u-cell/props.js +17 -18
- package/components/u-cell/u-cell.vue +14 -4
- package/components/u-cell-group/props.js +2 -3
- package/components/u-cell-group/u-cell-group.vue +1 -1
- package/components/u-checkbox/props.js +13 -14
- package/components/u-checkbox/u-checkbox.vue +1 -1
- package/components/u-checkbox-group/props.js +16 -17
- package/components/u-circle-progress/props.js +1 -2
- package/components/u-code/props.js +6 -7
- package/components/u-code/u-code.vue +5 -0
- package/components/u-code-input/props.js +16 -17
- package/components/u-col/props.js +5 -6
- package/components/u-collapse/props.js +3 -4
- package/components/u-collapse-item/props.js +11 -12
- package/components/u-column-notice/props.js +10 -11
- package/components/u-copy/u-copy.vue +70 -0
- package/components/u-count-down/props.js +4 -5
- package/components/u-count-down/u-count-down.vue +6 -1
- package/components/u-count-to/props.js +11 -12
- package/components/u-datetime-picker/props.js +37 -25
- package/components/u-datetime-picker/u-datetime-picker.vue +58 -3
- package/components/u-divider/props.js +8 -9
- package/components/u-dropdown/props.js +0 -1
- package/components/u-dropdown-item/props.js +0 -1
- package/components/u-empty/props.js +11 -12
- package/components/u-form/props.js +8 -9
- package/components/u-form/u-form.vue +1 -1
- package/components/u-form-item/props.js +13 -9
- package/components/u-form-item/u-form-item.vue +1 -0
- package/components/u-gap/props.js +4 -5
- package/components/u-gap/u-gap.vue +5 -4
- package/components/u-grid/props.js +3 -4
- package/components/u-grid-item/props.js +2 -3
- package/components/u-grid-item/u-grid-item.vue +5 -0
- package/components/u-icon/props.js +17 -18
- package/components/u-icon/u-icon.vue +9 -6
- package/components/u-image/props.js +16 -17
- package/components/u-image/u-image.vue +1 -1
- package/components/u-index-anchor/props.js +5 -6
- package/components/u-index-anchor/u-index-anchor.vue +1 -1
- package/components/u-index-item/props.js +0 -1
- package/components/u-index-item/u-index-item.vue +1 -1
- package/components/u-index-list/props.js +5 -6
- package/components/u-index-list/u-index-list.vue +3 -2
- package/components/u-input/props.js +35 -36
- package/components/u-input/u-input.vue +10 -4
- package/components/u-keyboard/props.js +16 -17
- package/components/u-line/props.js +6 -7
- package/components/u-line-progress/props.js +5 -6
- package/components/u-link/props.js +7 -8
- package/components/u-list/props.js +14 -15
- package/components/u-list-item/props.js +1 -2
- package/components/u-loading-icon/props.js +11 -12
- package/components/u-loading-page/props.js +9 -10
- package/components/u-loadmore/props.js +18 -19
- package/components/u-modal/props.js +16 -17
- package/components/u-navbar/props.js +16 -17
- package/components/u-no-network/props.js +3 -4
- package/components/u-notice-bar/props.js +13 -14
- package/components/u-notify/props.js +9 -10
- package/components/u-notify/u-notify.vue +5 -0
- package/components/u-number-box/props.js +22 -23
- package/components/u-number-box/u-number-box.vue +21 -1
- package/components/u-number-keyboard/props.js +3 -4
- package/components/u-overlay/props.js +4 -5
- package/components/u-parse/props.js +8 -9
- package/components/u-parse/u-parse.vue +6 -1
- package/components/u-picker/props.js +16 -17
- package/components/u-picker-column/props.js +0 -1
- package/components/u-popup/props.js +15 -16
- package/components/u-qrcode/qrcode.js +1206 -0
- package/components/u-qrcode/u-qrcode.vue +199 -0
- package/components/u-radio/props.js +13 -14
- package/components/u-radio-group/props.js +17 -18
- package/components/u-rate/props.js +14 -15
- package/components/u-read-more/props.js +8 -9
- package/components/u-row/props.js +3 -4
- package/components/u-row-notice/props.js +7 -8
- package/components/u-row-notice/u-row-notice.vue +5 -0
- package/components/u-safe-bottom/props.js +0 -1
- package/components/u-scroll-list/props.js +6 -7
- package/components/u-search/props.js +24 -25
- package/components/u-skeleton/props.js +11 -12
- package/components/u-slider/props.js +11 -12
- package/components/u-status-bar/props.js +1 -2
- package/components/u-status-bar/u-status-bar.vue +1 -1
- package/components/u-steps/props.js +7 -8
- package/components/u-steps/u-steps.vue +1 -1
- package/components/u-steps-item/props.js +4 -5
- package/components/u-steps-item/u-steps-item.vue +1 -1
- package/components/u-sticky/props.js +6 -7
- package/components/u-sticky/u-sticky.vue +5 -0
- package/components/u-subsection/props.js +9 -10
- package/components/u-subsection/u-subsection.vue +2 -2
- package/components/u-swipe-action/props.js +1 -2
- package/components/u-swipe-action-item/nvue.js +5 -0
- package/components/u-swipe-action-item/props.js +6 -7
- package/components/u-swiper/props.js +24 -25
- package/components/u-swiper-indicator/props.js +5 -6
- package/components/u-switch/props.js +11 -12
- package/components/u-tabbar/props.js +8 -9
- package/components/u-tabbar-item/props.js +6 -7
- package/components/u-table/props.js +0 -1
- package/components/u-tabs/props.js +12 -13
- package/components/u-tabs-item/props.js +0 -1
- package/components/u-tag/props.js +15 -16
- package/components/u-td/props.js +0 -1
- package/components/u-text/props.js +21 -22
- package/components/u-textarea/props.js +23 -24
- package/components/u-toast/u-toast.vue +5 -0
- package/components/u-toolbar/props.js +6 -7
- package/components/u-tooltip/props.js +11 -12
- package/components/u-tooltip/u-tooltip.vue +0 -28
- package/components/u-tr/props.js +0 -1
- package/components/u-transition/props.js +4 -5
- package/components/u-transition/transition.js +8 -9
- package/components/u-transition/u-transition.vue +1 -1
- package/components/u-upload/props.js +22 -23
- package/components/u-upload/u-upload.vue +1 -1
- package/index.js +6 -6
- 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 +1 -0
- 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 +11 -1
- package/libs/css/flex.scss +103 -101
- package/libs/function/colorGradient.js +8 -8
- package/libs/function/debounce.js +2 -2
- package/libs/function/digit.js +5 -5
- package/libs/function/index.js +29 -29
- package/libs/function/test.js +28 -28
- package/libs/function/throttle.js +2 -2
- package/package.json +4 -3
|
@@ -1,111 +1,110 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 主题颜色
|
|
5
4
|
type: {
|
|
6
5
|
type: String,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.text.type
|
|
8
7
|
},
|
|
9
8
|
// 是否显示
|
|
10
9
|
show: {
|
|
11
10
|
type: Boolean,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.text.show
|
|
13
12
|
},
|
|
14
13
|
// 显示的值
|
|
15
14
|
text: {
|
|
16
15
|
type: [String, Number],
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.text.text
|
|
18
17
|
},
|
|
19
18
|
// 前置图标
|
|
20
19
|
prefixIcon: {
|
|
21
20
|
type: String,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.text.prefixIcon
|
|
23
22
|
},
|
|
24
23
|
// 后置图标
|
|
25
24
|
suffixIcon: {
|
|
26
25
|
type: String,
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.text.suffixIcon
|
|
28
27
|
},
|
|
29
28
|
// 文本处理的匹配模式
|
|
30
29
|
// text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
|
|
31
30
|
mode: {
|
|
32
31
|
type: String,
|
|
33
|
-
default:
|
|
32
|
+
default: () => uni.$u.props.text.mode
|
|
34
33
|
},
|
|
35
34
|
// mode=link下,配置的链接
|
|
36
35
|
href: {
|
|
37
36
|
type: String,
|
|
38
|
-
default:
|
|
37
|
+
default: () => uni.$u.props.text.href
|
|
39
38
|
},
|
|
40
39
|
// 格式化规则
|
|
41
40
|
format: {
|
|
42
41
|
type: [String, Function],
|
|
43
|
-
default:
|
|
42
|
+
default: () => uni.$u.props.text.format
|
|
44
43
|
},
|
|
45
44
|
// mode=phone时,点击文本是否拨打电话
|
|
46
45
|
call: {
|
|
47
46
|
type: Boolean,
|
|
48
|
-
default:
|
|
47
|
+
default: () => uni.$u.props.text.call
|
|
49
48
|
},
|
|
50
49
|
// 小程序的打开方式
|
|
51
50
|
openType: {
|
|
52
51
|
type: String,
|
|
53
|
-
default:
|
|
52
|
+
default: () => uni.$u.props.text.openType
|
|
54
53
|
},
|
|
55
54
|
// 是否粗体,默认normal
|
|
56
55
|
bold: {
|
|
57
56
|
type: Boolean,
|
|
58
|
-
default:
|
|
57
|
+
default: () => uni.$u.props.text.bold
|
|
59
58
|
},
|
|
60
59
|
// 是否块状
|
|
61
60
|
block: {
|
|
62
61
|
type: Boolean,
|
|
63
|
-
default:
|
|
62
|
+
default: () => uni.$u.props.text.block
|
|
64
63
|
},
|
|
65
64
|
// 文本显示的行数,如果设置,超出此行数,将会显示省略号
|
|
66
65
|
lines: {
|
|
67
66
|
type: [String, Number],
|
|
68
|
-
default:
|
|
67
|
+
default: () => uni.$u.props.text.lines
|
|
69
68
|
},
|
|
70
69
|
// 文本颜色
|
|
71
70
|
color: {
|
|
72
71
|
type: String,
|
|
73
|
-
default:
|
|
72
|
+
default: () => uni.$u.props.text.color
|
|
74
73
|
},
|
|
75
74
|
// 字体大小
|
|
76
75
|
size: {
|
|
77
76
|
type: [String, Number],
|
|
78
|
-
default:
|
|
77
|
+
default: () => uni.$u.props.text.size
|
|
79
78
|
},
|
|
80
79
|
// 图标的样式
|
|
81
80
|
iconStyle: {
|
|
82
81
|
type: [Object, String],
|
|
83
|
-
default:
|
|
82
|
+
default: () => uni.$u.props.text.iconStyle
|
|
84
83
|
},
|
|
85
84
|
// 文字装饰,下划线,中划线等,可选值 none|underline|line-through
|
|
86
85
|
decoration: {
|
|
87
86
|
tepe: String,
|
|
88
|
-
default:
|
|
87
|
+
default: () => uni.$u.props.text.decoration
|
|
89
88
|
},
|
|
90
89
|
// 外边距,对象、字符串,数值形式均可
|
|
91
90
|
margin: {
|
|
92
91
|
type: [Object, String, Number],
|
|
93
|
-
default:
|
|
92
|
+
default: () => uni.$u.props.text.margin
|
|
94
93
|
},
|
|
95
94
|
// 文本行高
|
|
96
95
|
lineHeight: {
|
|
97
96
|
type: [String, Number],
|
|
98
|
-
default:
|
|
97
|
+
default: () => uni.$u.props.text.lineHeight
|
|
99
98
|
},
|
|
100
99
|
// 文本对齐方式,可选值left|center|right
|
|
101
100
|
align: {
|
|
102
101
|
type: String,
|
|
103
|
-
default:
|
|
102
|
+
default: () => uni.$u.props.text.align
|
|
104
103
|
},
|
|
105
104
|
// 文字换行,可选值break-word|normal|anywhere
|
|
106
105
|
wordWrap: {
|
|
107
106
|
type: String,
|
|
108
|
-
default:
|
|
107
|
+
default: () => uni.$u.props.text.wordWrap
|
|
109
108
|
}
|
|
110
109
|
}
|
|
111
110
|
}
|
|
@@ -1,120 +1,119 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 输入框的内容
|
|
5
4
|
value: {
|
|
6
5
|
type: [String, Number],
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.textarea.value
|
|
8
7
|
},
|
|
9
8
|
// 输入框的内容
|
|
10
9
|
modelValue: {
|
|
11
10
|
type: [String, Number],
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.textarea.value
|
|
13
12
|
},
|
|
14
13
|
// 输入框为空时占位符
|
|
15
14
|
placeholder: {
|
|
16
15
|
type: [String, Number],
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.textarea.placeholder
|
|
18
17
|
},
|
|
19
18
|
// 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
|
|
20
19
|
placeholderClass: {
|
|
21
20
|
type: String,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.input.placeholderClass
|
|
23
22
|
},
|
|
24
23
|
// 指定placeholder的样式
|
|
25
24
|
placeholderStyle: {
|
|
26
25
|
type: [String, Object],
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.input.placeholderStyle
|
|
28
27
|
},
|
|
29
28
|
// 输入框高度
|
|
30
29
|
height: {
|
|
31
30
|
type: [String, Number],
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.textarea.height
|
|
33
32
|
},
|
|
34
33
|
// 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
|
|
35
34
|
confirmType: {
|
|
36
35
|
type: String,
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.textarea.confirmType
|
|
38
37
|
},
|
|
39
38
|
// 是否禁用
|
|
40
39
|
disabled: {
|
|
41
40
|
type: Boolean,
|
|
42
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.textarea.disabled
|
|
43
42
|
},
|
|
44
43
|
// 是否显示统计字数
|
|
45
44
|
count: {
|
|
46
45
|
type: Boolean,
|
|
47
|
-
default:
|
|
46
|
+
default: () => uni.$u.props.textarea.count
|
|
48
47
|
},
|
|
49
48
|
// 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
|
|
50
49
|
focus: {
|
|
51
50
|
type: Boolean,
|
|
52
|
-
default:
|
|
51
|
+
default: () => uni.$u.props.textarea.focus
|
|
53
52
|
},
|
|
54
53
|
// 是否自动增加高度
|
|
55
54
|
autoHeight: {
|
|
56
55
|
type: Boolean,
|
|
57
|
-
default:
|
|
56
|
+
default: () => uni.$u.props.textarea.autoHeight
|
|
58
57
|
},
|
|
59
58
|
// 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
|
|
60
59
|
fixed: {
|
|
61
60
|
type: Boolean,
|
|
62
|
-
default:
|
|
61
|
+
default: () => uni.$u.props.textarea.fixed
|
|
63
62
|
},
|
|
64
63
|
// 指定光标与键盘的距离
|
|
65
64
|
cursorSpacing: {
|
|
66
65
|
type: Number,
|
|
67
|
-
default:
|
|
66
|
+
default: () => uni.$u.props.textarea.cursorSpacing
|
|
68
67
|
},
|
|
69
68
|
// 指定focus时的光标位置
|
|
70
69
|
cursor: {
|
|
71
70
|
type: [String, Number],
|
|
72
|
-
default:
|
|
71
|
+
default: () => uni.$u.props.textarea.cursor
|
|
73
72
|
},
|
|
74
73
|
// 是否显示键盘上方带有”完成“按钮那一栏,
|
|
75
74
|
showConfirmBar: {
|
|
76
75
|
type: Boolean,
|
|
77
|
-
default:
|
|
76
|
+
default: () => uni.$u.props.textarea.showConfirmBar
|
|
78
77
|
},
|
|
79
78
|
// 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
|
|
80
79
|
selectionStart: {
|
|
81
80
|
type: Number,
|
|
82
|
-
default:
|
|
81
|
+
default: () => uni.$u.props.textarea.selectionStart
|
|
83
82
|
},
|
|
84
83
|
// 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
|
|
85
84
|
selectionEnd: {
|
|
86
85
|
type: Number,
|
|
87
|
-
default:
|
|
86
|
+
default: () => uni.$u.props.textarea.selectionEnd
|
|
88
87
|
},
|
|
89
88
|
// 键盘弹起时,是否自动上推页面
|
|
90
89
|
adjustPosition: {
|
|
91
90
|
type: Boolean,
|
|
92
|
-
default:
|
|
91
|
+
default: () => uni.$u.props.textarea.adjustPosition
|
|
93
92
|
},
|
|
94
93
|
// 是否去掉 iOS 下的默认内边距,只微信小程序有效
|
|
95
94
|
disableDefaultPadding: {
|
|
96
95
|
type: Boolean,
|
|
97
|
-
default:
|
|
96
|
+
default: () => uni.$u.props.textarea.disableDefaultPadding
|
|
98
97
|
},
|
|
99
98
|
// focus时,点击页面的时候不收起键盘,只微信小程序有效
|
|
100
99
|
holdKeyboard: {
|
|
101
100
|
type: Boolean,
|
|
102
|
-
default:
|
|
101
|
+
default: () => uni.$u.props.textarea.holdKeyboard
|
|
103
102
|
},
|
|
104
103
|
// 最大输入长度,设置为 -1 的时候不限制最大长度
|
|
105
104
|
maxlength: {
|
|
106
105
|
type: [String, Number],
|
|
107
|
-
default:
|
|
106
|
+
default: () => uni.$u.props.textarea.maxlength
|
|
108
107
|
},
|
|
109
108
|
// 边框类型,surround-四周边框,bottom-底部边框
|
|
110
109
|
border: {
|
|
111
110
|
type: String,
|
|
112
|
-
default:
|
|
111
|
+
default: () => uni.$u.props.textarea.border
|
|
113
112
|
},
|
|
114
113
|
// 用于处理或者过滤输入框内容的方法
|
|
115
114
|
formatter: {
|
|
116
115
|
type: [Function, null],
|
|
117
|
-
default:
|
|
116
|
+
default: () => uni.$u.props.textarea.formatter
|
|
118
117
|
},
|
|
119
118
|
// 是否忽略组件内对文本合成系统事件的处理
|
|
120
119
|
ignoreCompositionEvent: {
|
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 是否展示工具条
|
|
5
4
|
show: {
|
|
6
5
|
type: Boolean,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.toolbar.show
|
|
8
7
|
},
|
|
9
8
|
// 取消按钮的文字
|
|
10
9
|
cancelText: {
|
|
11
10
|
type: String,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.toolbar.cancelText
|
|
13
12
|
},
|
|
14
13
|
// 确认按钮的文字
|
|
15
14
|
confirmText: {
|
|
16
15
|
type: String,
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.toolbar.confirmText
|
|
18
17
|
},
|
|
19
18
|
// 取消按钮的颜色
|
|
20
19
|
cancelColor: {
|
|
21
20
|
type: String,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.toolbar.cancelColor
|
|
23
22
|
},
|
|
24
23
|
// 确认按钮的颜色
|
|
25
24
|
confirmColor: {
|
|
26
25
|
type: String,
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.toolbar.confirmColor
|
|
28
27
|
},
|
|
29
28
|
// 标题文字
|
|
30
29
|
title: {
|
|
31
30
|
type: String,
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.toolbar.title
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
}
|
|
@@ -1,60 +1,59 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 需要显示的提示文字
|
|
5
4
|
text: {
|
|
6
5
|
type: [String, Number],
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.tooltip.text
|
|
8
7
|
},
|
|
9
8
|
// 点击复制按钮时,复制的文本,为空则使用text值
|
|
10
9
|
copyText: {
|
|
11
10
|
type: [String, Number],
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.tooltip.copyText
|
|
13
12
|
},
|
|
14
13
|
// 文本大小
|
|
15
14
|
size: {
|
|
16
15
|
type: [String, Number],
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.tooltip.size
|
|
18
17
|
},
|
|
19
18
|
// 字体颜色
|
|
20
19
|
color: {
|
|
21
20
|
type: String,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.tooltip.color
|
|
23
22
|
},
|
|
24
23
|
// 弹出提示框时,文本的背景色
|
|
25
24
|
bgColor: {
|
|
26
25
|
type: String,
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.tooltip.bgColor
|
|
28
27
|
},
|
|
29
28
|
// 弹出提示的方向,top-上方,bottom-下方
|
|
30
29
|
direction: {
|
|
31
30
|
type: String,
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.tooltip.direction
|
|
33
32
|
},
|
|
34
33
|
// 弹出提示的z-index,nvue无效
|
|
35
34
|
zIndex: {
|
|
36
35
|
type: [String, Number],
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.tooltip.zIndex
|
|
38
37
|
},
|
|
39
38
|
// 是否显示复制按钮
|
|
40
39
|
showCopy: {
|
|
41
40
|
type: Boolean,
|
|
42
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.tooltip.showCopy
|
|
43
42
|
},
|
|
44
43
|
// 扩展的按钮组
|
|
45
44
|
buttons: {
|
|
46
45
|
type: Array,
|
|
47
|
-
default:
|
|
46
|
+
default: () => uni.$u.props.tooltip.buttons
|
|
48
47
|
},
|
|
49
48
|
// 是否显示透明遮罩以防止触摸穿透
|
|
50
49
|
overlay: {
|
|
51
50
|
type: Boolean,
|
|
52
|
-
default:
|
|
51
|
+
default: () => uni.$u.props.tooltip.overlay
|
|
53
52
|
},
|
|
54
53
|
// 是否显示复制成功或者失败的toast
|
|
55
54
|
showToast: {
|
|
56
55
|
type: Boolean,
|
|
57
|
-
default:
|
|
56
|
+
default: () => uni.$u.props.tooltip.showToast
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
}
|
|
@@ -96,10 +96,6 @@
|
|
|
96
96
|
// #ifdef APP-NVUE
|
|
97
97
|
const dom = uni.requireNativePlugin('dom')
|
|
98
98
|
// #endif
|
|
99
|
-
// #ifdef H5
|
|
100
|
-
// import ClipboardJS from "./clipboard.min.js"
|
|
101
|
-
import ClipboardJS from "clipboard"
|
|
102
|
-
// #endif
|
|
103
99
|
/**
|
|
104
100
|
* Tooltip
|
|
105
101
|
* @description
|
|
@@ -260,7 +256,6 @@
|
|
|
260
256
|
// 关闭组件
|
|
261
257
|
this.showTooltip = false
|
|
262
258
|
this.$emit('click', 0)
|
|
263
|
-
// #ifndef H5
|
|
264
259
|
uni.setClipboardData({
|
|
265
260
|
// 优先使用copyText字段,如果没有,则默认使用text字段当做复制的内容
|
|
266
261
|
data: this.copyText || this.text,
|
|
@@ -274,29 +269,6 @@
|
|
|
274
269
|
this.showTooltip = false
|
|
275
270
|
}
|
|
276
271
|
})
|
|
277
|
-
// #endif
|
|
278
|
-
|
|
279
|
-
// #ifdef H5
|
|
280
|
-
let event = window.event || e || {}
|
|
281
|
-
let clipboard = new ClipboardJS('', {
|
|
282
|
-
text: () => this.copyText || this.text
|
|
283
|
-
})
|
|
284
|
-
clipboard.on('success', (e) => {
|
|
285
|
-
this.showToast && uni.$u.toast('复制成功')
|
|
286
|
-
clipboard.off('success')
|
|
287
|
-
clipboard.off('error')
|
|
288
|
-
// 在单页应用中,需要销毁DOM的监听
|
|
289
|
-
clipboard.destroy()
|
|
290
|
-
})
|
|
291
|
-
clipboard.on('error', (e) => {
|
|
292
|
-
this.showToast && uni.$u.toast('复制失败')
|
|
293
|
-
clipboard.off('success')
|
|
294
|
-
clipboard.off('error')
|
|
295
|
-
// 在单页应用中,需要销毁DOM的监听
|
|
296
|
-
clipboard.destroy()
|
|
297
|
-
})
|
|
298
|
-
clipboard.onClick(event)
|
|
299
|
-
// #endif
|
|
300
272
|
}
|
|
301
273
|
}
|
|
302
274
|
}
|
package/components/u-tr/props.js
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 是否展示组件
|
|
5
4
|
show: {
|
|
6
5
|
type: Boolean,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.transition.show
|
|
8
7
|
},
|
|
9
8
|
// 使用的动画模式
|
|
10
9
|
mode: {
|
|
11
10
|
type: String,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.transition.mode
|
|
13
12
|
},
|
|
14
13
|
// 动画的执行时间,单位ms
|
|
15
14
|
duration: {
|
|
16
15
|
type: [String, Number],
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.transition.duration
|
|
18
17
|
},
|
|
19
18
|
// 使用的动画过渡函数
|
|
20
19
|
timingFunction: {
|
|
21
20
|
type: String,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.transition.timingFunction
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// 定义一个一定时间后自动成功的promise,让调用nextTick方法处,进入下一个then方法
|
|
2
2
|
const waitTick = () => new Promise(resolve => setTimeout(resolve, 1000 / 50))
|
|
3
3
|
// nvue动画模块实现细节抽离在外部文件
|
|
4
|
-
// #ifdef APP-NVUE
|
|
5
|
-
import animationMap from './nvue-ani-map.js'
|
|
4
|
+
// #ifdef APP-NVUE
|
|
5
|
+
import animationMap from './nvue-ani-map.js'
|
|
6
6
|
// #endif
|
|
7
7
|
|
|
8
8
|
// #ifndef APP-NVUE
|
|
@@ -20,8 +20,8 @@ const getClassNames = (name) => ({
|
|
|
20
20
|
// https://weex.apache.org/zh/docs/modules/animation.html#transition
|
|
21
21
|
const animation = uni.requireNativePlugin('animation')
|
|
22
22
|
const getStyle = (name) => animationMap[name]
|
|
23
|
-
// #endif
|
|
24
|
-
|
|
23
|
+
// #endif
|
|
24
|
+
|
|
25
25
|
import { nextTick } from 'vue'
|
|
26
26
|
|
|
27
27
|
export default {
|
|
@@ -41,11 +41,10 @@ export default {
|
|
|
41
41
|
this.inited = true
|
|
42
42
|
this.display = true
|
|
43
43
|
this.classes = classNames.enter
|
|
44
|
-
await nextTick();
|
|
44
|
+
await nextTick();
|
|
45
45
|
{
|
|
46
|
-
|
|
46
|
+
// https://github.com/umicro/uView2.0/issues/545
|
|
47
47
|
await uni.$u.sleep(20)
|
|
48
|
-
// #endif
|
|
49
48
|
// 标识动画尚未结束
|
|
50
49
|
this.$emit('enter')
|
|
51
50
|
this.transitionEnded = false
|
|
@@ -66,7 +65,7 @@ export default {
|
|
|
66
65
|
// 获得类名
|
|
67
66
|
this.classes = classNames.leave
|
|
68
67
|
|
|
69
|
-
await nextTick();
|
|
68
|
+
await nextTick();
|
|
70
69
|
{
|
|
71
70
|
// 动画正在离场的状态
|
|
72
71
|
this.transitionEnded = false
|
|
@@ -94,7 +93,7 @@ export default {
|
|
|
94
93
|
opacity: 0
|
|
95
94
|
}
|
|
96
95
|
// 等待弹窗内容渲染完成
|
|
97
|
-
await nextTick();
|
|
96
|
+
await nextTick();
|
|
98
97
|
{
|
|
99
98
|
// 合并样式
|
|
100
99
|
this.viewStyle = currentStyle.enter
|