uview-plus 3.0.17 → 3.1.3
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 +5 -2
- package/components/u-calendar/props.js +28 -27
- package/components/u-calendar/u-calendar.vue +3 -1
- package/components/u-calendar/util.js +1 -0
- 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 +20 -18
- 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/{nvue.ani-map.js → nvue-ani-map.js} +0 -0
- package/components/u-transition/props.js +5 -4
- package/components/u-transition/transition.js +3 -1
- 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/index.js +1 -0
- package/libs/config/config.js +2 -2
- package/package.json +1 -1
|
@@ -1,110 +1,111 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 主题颜色
|
|
4
5
|
type: {
|
|
5
6
|
type: String,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.text.type
|
|
7
8
|
},
|
|
8
9
|
// 是否显示
|
|
9
10
|
show: {
|
|
10
11
|
type: Boolean,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.text.show
|
|
12
13
|
},
|
|
13
14
|
// 显示的值
|
|
14
15
|
text: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.text.text
|
|
17
18
|
},
|
|
18
19
|
// 前置图标
|
|
19
20
|
prefixIcon: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.text.prefixIcon
|
|
22
23
|
},
|
|
23
24
|
// 后置图标
|
|
24
25
|
suffixIcon: {
|
|
25
26
|
type: String,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.text.suffixIcon
|
|
27
28
|
},
|
|
28
29
|
// 文本处理的匹配模式
|
|
29
30
|
// text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
|
|
30
31
|
mode: {
|
|
31
32
|
type: String,
|
|
32
|
-
default:
|
|
33
|
+
default: defprops.text.mode
|
|
33
34
|
},
|
|
34
35
|
// mode=link下,配置的链接
|
|
35
36
|
href: {
|
|
36
37
|
type: String,
|
|
37
|
-
default:
|
|
38
|
+
default: defprops.text.href
|
|
38
39
|
},
|
|
39
40
|
// 格式化规则
|
|
40
41
|
format: {
|
|
41
42
|
type: [String, Function],
|
|
42
|
-
default:
|
|
43
|
+
default: defprops.text.format
|
|
43
44
|
},
|
|
44
45
|
// mode=phone时,点击文本是否拨打电话
|
|
45
46
|
call: {
|
|
46
47
|
type: Boolean,
|
|
47
|
-
default:
|
|
48
|
+
default: defprops.text.call
|
|
48
49
|
},
|
|
49
50
|
// 小程序的打开方式
|
|
50
51
|
openType: {
|
|
51
52
|
type: String,
|
|
52
|
-
default:
|
|
53
|
+
default: defprops.text.openType
|
|
53
54
|
},
|
|
54
55
|
// 是否粗体,默认normal
|
|
55
56
|
bold: {
|
|
56
57
|
type: Boolean,
|
|
57
|
-
default:
|
|
58
|
+
default: defprops.text.bold
|
|
58
59
|
},
|
|
59
60
|
// 是否块状
|
|
60
61
|
block: {
|
|
61
62
|
type: Boolean,
|
|
62
|
-
default:
|
|
63
|
+
default: defprops.text.block
|
|
63
64
|
},
|
|
64
65
|
// 文本显示的行数,如果设置,超出此行数,将会显示省略号
|
|
65
66
|
lines: {
|
|
66
67
|
type: [String, Number],
|
|
67
|
-
default:
|
|
68
|
+
default: defprops.text.lines
|
|
68
69
|
},
|
|
69
70
|
// 文本颜色
|
|
70
71
|
color: {
|
|
71
72
|
type: String,
|
|
72
|
-
default:
|
|
73
|
+
default: defprops.text.color
|
|
73
74
|
},
|
|
74
75
|
// 字体大小
|
|
75
76
|
size: {
|
|
76
77
|
type: [String, Number],
|
|
77
|
-
default:
|
|
78
|
+
default: defprops.text.size
|
|
78
79
|
},
|
|
79
80
|
// 图标的样式
|
|
80
81
|
iconStyle: {
|
|
81
82
|
type: [Object, String],
|
|
82
|
-
default:
|
|
83
|
+
default: defprops.text.iconStyle
|
|
83
84
|
},
|
|
84
85
|
// 文字装饰,下划线,中划线等,可选值 none|underline|line-through
|
|
85
86
|
decoration: {
|
|
86
87
|
tepe: String,
|
|
87
|
-
default:
|
|
88
|
+
default: defprops.text.decoration
|
|
88
89
|
},
|
|
89
90
|
// 外边距,对象、字符串,数值形式均可
|
|
90
91
|
margin: {
|
|
91
92
|
type: [Object, String, Number],
|
|
92
|
-
default:
|
|
93
|
+
default: defprops.text.margin
|
|
93
94
|
},
|
|
94
95
|
// 文本行高
|
|
95
96
|
lineHeight: {
|
|
96
97
|
type: [String, Number],
|
|
97
|
-
default:
|
|
98
|
+
default: defprops.text.lineHeight
|
|
98
99
|
},
|
|
99
100
|
// 文本对齐方式,可选值left|center|right
|
|
100
101
|
align: {
|
|
101
102
|
type: String,
|
|
102
|
-
default:
|
|
103
|
+
default: defprops.text.align
|
|
103
104
|
},
|
|
104
105
|
// 文字换行,可选值break-word|normal|anywhere
|
|
105
106
|
wordWrap: {
|
|
106
107
|
type: String,
|
|
107
|
-
default:
|
|
108
|
+
default: defprops.text.wordWrap
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
}
|
|
@@ -71,6 +71,8 @@
|
|
|
71
71
|
|
|
72
72
|
<script>
|
|
73
73
|
import value from './value.js'
|
|
74
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
75
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
74
76
|
import button from '../../libs/mixin/button.js'
|
|
75
77
|
import openType from '../../libs/mixin/openType.js'
|
|
76
78
|
import props from './props.js'
|
|
@@ -105,10 +107,10 @@ import props from './props.js'
|
|
|
105
107
|
export default {
|
|
106
108
|
name: 'u--text',
|
|
107
109
|
// #ifdef MP
|
|
108
|
-
mixins: [
|
|
110
|
+
mixins: [mpMixin, mixin, value, button, openType, props],
|
|
109
111
|
// #endif
|
|
110
112
|
// #ifndef MP
|
|
111
|
-
mixins: [
|
|
113
|
+
mixins: [mpMixin, mixin, value, props],
|
|
112
114
|
// #endif
|
|
113
115
|
computed: {
|
|
114
116
|
valueStyle() {
|
|
@@ -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
|
|
|
File without changes
|
|
@@ -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
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// 定义一个一定时间后自动成功的promise,让调用nextTick方法处,进入下一个then方法
|
|
2
2
|
const nextTick = () => new Promise(resolve => setTimeout(resolve, 1000 / 50))
|
|
3
3
|
// nvue动画模块实现细节抽离在外部文件
|
|
4
|
-
|
|
4
|
+
// #ifdef APP-NVUE
|
|
5
|
+
import animationMap from './nvue-ani-map.js'
|
|
6
|
+
// #endif
|
|
5
7
|
|
|
6
8
|
// #ifndef APP-NVUE
|
|
7
9
|
// 定义类名,通过给元素动态切换类名,赋予元素一定的css动画样式
|
|
@@ -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) {
|