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,19 +1,20 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 当前展开面板的name,非手风琴模式:[<string | number>],手风琴模式:string | number
|
|
4
5
|
value: {
|
|
5
6
|
type: [String, Number, Array, null],
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.collapse.value
|
|
7
8
|
},
|
|
8
9
|
// 是否手风琴模式
|
|
9
10
|
accordion: {
|
|
10
11
|
type: Boolean,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.collapse.accordion
|
|
12
13
|
},
|
|
13
14
|
// 是否显示外边框
|
|
14
15
|
border: {
|
|
15
16
|
type: Boolean,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.collapse.border
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
}
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
<script>
|
|
9
9
|
import props from './props.js';
|
|
10
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
11
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
10
12
|
/**
|
|
11
13
|
* collapse 折叠面板
|
|
12
14
|
* @description 通过折叠面板收纳内容区域
|
|
@@ -19,7 +21,7 @@
|
|
|
19
21
|
*/
|
|
20
22
|
export default {
|
|
21
23
|
name: "u-collapse",
|
|
22
|
-
mixins: [
|
|
24
|
+
mixins: [mpMixin, mixin,props],
|
|
23
25
|
watch: {
|
|
24
26
|
needInit() {
|
|
25
27
|
this.init()
|
|
@@ -1,59 +1,60 @@
|
|
|
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.collapseItem.title
|
|
7
8
|
},
|
|
8
9
|
// 标题右侧内容
|
|
9
10
|
value: {
|
|
10
11
|
type: String,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.collapseItem.value
|
|
12
13
|
},
|
|
13
14
|
// 标题下方的描述信息
|
|
14
15
|
label: {
|
|
15
16
|
type: String,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.collapseItem.label
|
|
17
18
|
},
|
|
18
19
|
// 是否禁用折叠面板
|
|
19
20
|
disabled: {
|
|
20
21
|
type: Boolean,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.collapseItem.disabled
|
|
22
23
|
},
|
|
23
24
|
// 是否展示右侧箭头并开启点击反馈
|
|
24
25
|
isLink: {
|
|
25
26
|
type: Boolean,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.collapseItem.isLink
|
|
27
28
|
},
|
|
28
29
|
// 是否开启点击反馈
|
|
29
30
|
clickable: {
|
|
30
31
|
type: Boolean,
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.collapseItem.clickable
|
|
32
33
|
},
|
|
33
34
|
// 是否显示内边框
|
|
34
35
|
border: {
|
|
35
36
|
type: Boolean,
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.collapseItem.border
|
|
37
38
|
},
|
|
38
39
|
// 标题的对齐方式
|
|
39
40
|
align: {
|
|
40
41
|
type: String,
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.collapseItem.align
|
|
42
43
|
},
|
|
43
44
|
// 唯一标识符
|
|
44
45
|
name: {
|
|
45
46
|
type: [String, Number],
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.collapseItem.name
|
|
47
48
|
},
|
|
48
49
|
// 标题左侧图片,可为绝对路径的图片或内置图标
|
|
49
50
|
icon: {
|
|
50
51
|
type: String,
|
|
51
|
-
default:
|
|
52
|
+
default: defprops.collapseItem.icon
|
|
52
53
|
},
|
|
53
54
|
// 面板展开收起的过渡时间,单位ms
|
|
54
55
|
duration: {
|
|
55
56
|
type: Number,
|
|
56
|
-
default:
|
|
57
|
+
default: defprops.collapseItem.duration
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
}
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
>
|
|
15
15
|
<!-- #ifndef MP-WEIXIN -->
|
|
16
16
|
<!-- 微信小程序不支持,因为微信中不支持 <slot name="title" slot="title" />的写法 -->
|
|
17
|
-
<template #title>
|
|
18
|
-
<slot name="title"></slot>
|
|
19
|
-
</template>
|
|
20
|
-
<template #icon>
|
|
21
|
-
<slot name="icon"></slot>
|
|
22
|
-
</template>
|
|
23
|
-
<template #value>
|
|
24
|
-
<slot name="value"></slot>
|
|
25
|
-
</template>
|
|
26
|
-
<template #right-icon>
|
|
27
|
-
<slot name="right-icon"></slot>
|
|
17
|
+
<template #title>
|
|
18
|
+
<slot name="title"></slot>
|
|
19
|
+
</template>
|
|
20
|
+
<template #icon>
|
|
21
|
+
<slot name="icon"></slot>
|
|
22
|
+
</template>
|
|
23
|
+
<template #value>
|
|
24
|
+
<slot name="value"></slot>
|
|
25
|
+
</template>
|
|
26
|
+
<template #right-icon>
|
|
27
|
+
<slot name="right-icon"></slot>
|
|
28
28
|
</template>
|
|
29
29
|
<!-- #endif -->
|
|
30
30
|
</u-cell>
|
|
@@ -44,7 +44,10 @@
|
|
|
44
44
|
</template>
|
|
45
45
|
|
|
46
46
|
<script>
|
|
47
|
-
import props from './props.js';
|
|
47
|
+
import props from './props.js';
|
|
48
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
49
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
50
|
+
import { nextTick } from 'vue'
|
|
48
51
|
// #ifdef APP-NVUE
|
|
49
52
|
const animation = uni.requireNativePlugin('animation')
|
|
50
53
|
const dom = uni.requireNativePlugin('dom')
|
|
@@ -68,7 +71,7 @@
|
|
|
68
71
|
*/
|
|
69
72
|
export default {
|
|
70
73
|
name: "u-collapse-item",
|
|
71
|
-
mixins: [
|
|
74
|
+
mixins: [mpMixin, mixin, props],
|
|
72
75
|
data() {
|
|
73
76
|
return {
|
|
74
77
|
elId: uni.$u.guid(),
|
|
@@ -102,7 +105,7 @@
|
|
|
102
105
|
},
|
|
103
106
|
methods: {
|
|
104
107
|
// 异步获取内容,或者动态修改了内容时,需要重新初始化
|
|
105
|
-
init() {
|
|
108
|
+
async init() {
|
|
106
109
|
// 初始化数据
|
|
107
110
|
this.updateParentData()
|
|
108
111
|
if (!this.parent) {
|
|
@@ -125,10 +128,9 @@
|
|
|
125
128
|
}
|
|
126
129
|
this.expanded = (value || []).some(item => item == this.name)
|
|
127
130
|
}
|
|
128
|
-
// 设置组件的展开或收起状态
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
})
|
|
131
|
+
// 设置组件的展开或收起状态
|
|
132
|
+
await nextTick()
|
|
133
|
+
this.setContentAnimate()
|
|
132
134
|
},
|
|
133
135
|
updateParentData() {
|
|
134
136
|
// 此方法在mixin中
|
|
@@ -1,55 +1,56 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 显示的内容,字符串
|
|
4
5
|
text: {
|
|
5
6
|
type: [Array],
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.columnNotice.text
|
|
7
8
|
},
|
|
8
9
|
// 是否显示左侧的音量图标
|
|
9
10
|
icon: {
|
|
10
11
|
type: String,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.columnNotice.icon
|
|
12
13
|
},
|
|
13
14
|
// 通告模式,link-显示右箭头,closable-显示右侧关闭图标
|
|
14
15
|
mode: {
|
|
15
16
|
type: String,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.columnNotice.mode
|
|
17
18
|
},
|
|
18
19
|
// 文字颜色,各图标也会使用文字颜色
|
|
19
20
|
color: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.columnNotice.color
|
|
22
23
|
},
|
|
23
24
|
// 背景颜色
|
|
24
25
|
bgColor: {
|
|
25
26
|
type: String,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.columnNotice.bgColor
|
|
27
28
|
},
|
|
28
29
|
// 字体大小,单位px
|
|
29
30
|
fontSize: {
|
|
30
31
|
type: [String, Number],
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.columnNotice.fontSize
|
|
32
33
|
},
|
|
33
34
|
// 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度
|
|
34
35
|
speed: {
|
|
35
36
|
type: [String, Number],
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.columnNotice.speed
|
|
37
38
|
},
|
|
38
39
|
// direction = row时,是否使用步进形式滚动
|
|
39
40
|
step: {
|
|
40
41
|
type: Boolean,
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.columnNotice.step
|
|
42
43
|
},
|
|
43
44
|
// 滚动一个周期的时间长,单位ms
|
|
44
45
|
duration: {
|
|
45
46
|
type: [String, Number],
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.columnNotice.duration
|
|
47
48
|
},
|
|
48
49
|
// 是否禁止用手滑动切换
|
|
49
50
|
// 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序
|
|
50
51
|
disableTouch: {
|
|
51
52
|
type: Boolean,
|
|
52
|
-
default:
|
|
53
|
+
default: defprops.columnNotice.disableTouch
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
}
|
|
@@ -58,6 +58,8 @@
|
|
|
58
58
|
|
|
59
59
|
<script>
|
|
60
60
|
import props from './props.js';
|
|
61
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
62
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
61
63
|
/**
|
|
62
64
|
* ColumnNotice 滚动通知中的垂直滚动 内部组件
|
|
63
65
|
* @description 该组件用于滚动通告场景,是其中的垂直滚动方式
|
|
@@ -75,7 +77,7 @@
|
|
|
75
77
|
* @example
|
|
76
78
|
*/
|
|
77
79
|
export default {
|
|
78
|
-
mixins: [
|
|
80
|
+
mixins: [mpMixin, mixin, props],
|
|
79
81
|
watch: {
|
|
80
82
|
text: {
|
|
81
83
|
immediate: true,
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 倒计时时长,单位ms
|
|
4
5
|
time: {
|
|
5
6
|
type: [String, Number],
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.countDown.time
|
|
7
8
|
},
|
|
8
9
|
// 时间格式,DD-日,HH-时,mm-分,ss-秒,SSS-毫秒
|
|
9
10
|
format: {
|
|
10
11
|
type: String,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.countDown.format
|
|
12
13
|
},
|
|
13
14
|
// 是否自动开始倒计时
|
|
14
15
|
autoStart: {
|
|
15
16
|
type: Boolean,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.countDown.autoStart
|
|
17
18
|
},
|
|
18
19
|
// 是否展示毫秒倒计时
|
|
19
20
|
millisecond: {
|
|
20
21
|
type: Boolean,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.countDown.millisecond
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
|
-
import props from './props.js';
|
|
10
|
+
import props from './props.js';
|
|
11
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
12
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
11
13
|
import {
|
|
12
14
|
isSameSecond,
|
|
13
15
|
parseFormat,
|
|
@@ -30,7 +32,7 @@
|
|
|
30
32
|
*/
|
|
31
33
|
export default {
|
|
32
34
|
name: 'u-count-down',
|
|
33
|
-
mixins: [
|
|
35
|
+
mixins: [mpMixin, mixin, props],
|
|
34
36
|
data() {
|
|
35
37
|
return {
|
|
36
38
|
timer: null,
|
|
@@ -160,4 +162,4 @@
|
|
|
160
162
|
line-height: $u-count-down-text-line-height;
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
|
-
</style>
|
|
165
|
+
</style>
|
|
@@ -1,59 +1,60 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 开始的数值,默认从0增长到某一个数
|
|
4
5
|
startVal: {
|
|
5
6
|
type: [String, Number],
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.countTo.startVal
|
|
7
8
|
},
|
|
8
9
|
// 要滚动的目标数值,必须
|
|
9
10
|
endVal: {
|
|
10
11
|
type: [String, Number],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.countTo.endVal
|
|
12
13
|
},
|
|
13
14
|
// 滚动到目标数值的动画持续时间,单位为毫秒(ms)
|
|
14
15
|
duration: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.countTo.duration
|
|
17
18
|
},
|
|
18
19
|
// 设置数值后是否自动开始滚动
|
|
19
20
|
autoplay: {
|
|
20
21
|
type: Boolean,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.countTo.autoplay
|
|
22
23
|
},
|
|
23
24
|
// 要显示的小数位数
|
|
24
25
|
decimals: {
|
|
25
26
|
type: [String, Number],
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.countTo.decimals
|
|
27
28
|
},
|
|
28
29
|
// 是否在即将到达目标数值的时候,使用缓慢滚动的效果
|
|
29
30
|
useEasing: {
|
|
30
31
|
type: Boolean,
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.countTo.useEasing
|
|
32
33
|
},
|
|
33
34
|
// 十进制分割
|
|
34
35
|
decimal: {
|
|
35
36
|
type: [String, Number],
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.countTo.decimal
|
|
37
38
|
},
|
|
38
39
|
// 字体颜色
|
|
39
40
|
color: {
|
|
40
41
|
type: String,
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.countTo.color
|
|
42
43
|
},
|
|
43
44
|
// 字体大小
|
|
44
45
|
fontSize: {
|
|
45
46
|
type: [String, Number],
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.countTo.fontSize
|
|
47
48
|
},
|
|
48
49
|
// 是否加粗字体
|
|
49
50
|
bold: {
|
|
50
51
|
type: Boolean,
|
|
51
|
-
default:
|
|
52
|
+
default: defprops.countTo.bold
|
|
52
53
|
},
|
|
53
54
|
// 千位分隔符,类似金额的分割(¥23,321.05中的",")
|
|
54
55
|
separator: {
|
|
55
56
|
type: String,
|
|
56
|
-
default:
|
|
57
|
+
default: defprops.countTo.separator
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
}
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
<script>
|
|
13
13
|
import props from './props.js';
|
|
14
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
15
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
14
16
|
/**
|
|
15
17
|
* countTo 数字滚动
|
|
16
18
|
* @description 该组件一般用于需要滚动数字到某一个值的场景,目标要求是一个递增的值。
|
|
@@ -45,7 +47,7 @@ export default {
|
|
|
45
47
|
lastTime: 0 // 上一次的时间
|
|
46
48
|
};
|
|
47
49
|
},
|
|
48
|
-
mixins: [
|
|
50
|
+
mixins: [mpMixin, mixin,props],
|
|
49
51
|
computed: {
|
|
50
52
|
countDown() {
|
|
51
53
|
return this.startVal > this.endVal;
|
|
@@ -1,125 +1,126 @@
|
|
|
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.datetimePicker.show
|
|
7
8
|
},
|
|
8
9
|
// 是否展示顶部的操作栏
|
|
9
10
|
showToolbar: {
|
|
10
11
|
type: Boolean,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.datetimePicker.showToolbar
|
|
12
13
|
},
|
|
13
14
|
// #ifdef VUE2
|
|
14
15
|
// 绑定值
|
|
15
16
|
value: {
|
|
16
17
|
type: [String, Number],
|
|
17
|
-
default:
|
|
18
|
+
default: defprops.datetimePicker.value
|
|
18
19
|
},
|
|
19
20
|
// #endif
|
|
20
21
|
// #ifdef VUE3
|
|
21
22
|
// 绑定值
|
|
22
23
|
modelValue: {
|
|
23
24
|
type: [String, Number],
|
|
24
|
-
default:
|
|
25
|
+
default: defprops.datetimePicker.value
|
|
25
26
|
},
|
|
26
27
|
// #endif
|
|
27
28
|
// 顶部标题
|
|
28
29
|
title: {
|
|
29
30
|
type: String,
|
|
30
|
-
default:
|
|
31
|
+
default: defprops.datetimePicker.title
|
|
31
32
|
},
|
|
32
33
|
// 展示格式,mode=date为日期选择,mode=time为时间选择,mode=year-month为年月选择,mode=datetime为日期时间选择
|
|
33
34
|
mode: {
|
|
34
35
|
type: String,
|
|
35
|
-
default:
|
|
36
|
+
default: defprops.datetimePicker.mode
|
|
36
37
|
},
|
|
37
38
|
// 可选的最大时间
|
|
38
39
|
maxDate: {
|
|
39
40
|
type: Number,
|
|
40
41
|
// 最大默认值为后10年
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.datetimePicker.maxDate
|
|
42
43
|
},
|
|
43
44
|
// 可选的最小时间
|
|
44
45
|
minDate: {
|
|
45
46
|
type: Number,
|
|
46
47
|
// 最小默认值为前10年
|
|
47
|
-
default:
|
|
48
|
+
default: defprops.datetimePicker.minDate
|
|
48
49
|
},
|
|
49
50
|
// 可选的最小小时,仅mode=time有效
|
|
50
51
|
minHour: {
|
|
51
52
|
type: Number,
|
|
52
|
-
default:
|
|
53
|
+
default: defprops.datetimePicker.minHour
|
|
53
54
|
},
|
|
54
55
|
// 可选的最大小时,仅mode=time有效
|
|
55
56
|
maxHour: {
|
|
56
57
|
type: Number,
|
|
57
|
-
default:
|
|
58
|
+
default: defprops.datetimePicker.maxHour
|
|
58
59
|
},
|
|
59
60
|
// 可选的最小分钟,仅mode=time有效
|
|
60
61
|
minMinute: {
|
|
61
62
|
type: Number,
|
|
62
|
-
default:
|
|
63
|
+
default: defprops.datetimePicker.minMinute
|
|
63
64
|
},
|
|
64
65
|
// 可选的最大分钟,仅mode=time有效
|
|
65
66
|
maxMinute: {
|
|
66
67
|
type: Number,
|
|
67
|
-
default:
|
|
68
|
+
default: defprops.datetimePicker.maxMinute
|
|
68
69
|
},
|
|
69
70
|
// 选项过滤函数
|
|
70
71
|
filter: {
|
|
71
72
|
type: [Function, null],
|
|
72
|
-
default:
|
|
73
|
+
default: defprops.datetimePicker.filter
|
|
73
74
|
},
|
|
74
75
|
// 选项格式化函数
|
|
75
76
|
formatter: {
|
|
76
77
|
type: [Function, null],
|
|
77
|
-
default:
|
|
78
|
+
default: defprops.datetimePicker.formatter
|
|
78
79
|
},
|
|
79
80
|
// 是否显示加载中状态
|
|
80
81
|
loading: {
|
|
81
82
|
type: Boolean,
|
|
82
|
-
default:
|
|
83
|
+
default: defprops.datetimePicker.loading
|
|
83
84
|
},
|
|
84
85
|
// 各列中,单个选项的高度
|
|
85
86
|
itemHeight: {
|
|
86
87
|
type: [String, Number],
|
|
87
|
-
default:
|
|
88
|
+
default: defprops.datetimePicker.itemHeight
|
|
88
89
|
},
|
|
89
90
|
// 取消按钮的文字
|
|
90
91
|
cancelText: {
|
|
91
92
|
type: String,
|
|
92
|
-
default:
|
|
93
|
+
default: defprops.datetimePicker.cancelText
|
|
93
94
|
},
|
|
94
95
|
// 确认按钮的文字
|
|
95
96
|
confirmText: {
|
|
96
97
|
type: String,
|
|
97
|
-
default:
|
|
98
|
+
default: defprops.datetimePicker.confirmText
|
|
98
99
|
},
|
|
99
100
|
// 取消按钮的颜色
|
|
100
101
|
cancelColor: {
|
|
101
102
|
type: String,
|
|
102
|
-
default:
|
|
103
|
+
default: defprops.datetimePicker.cancelColor
|
|
103
104
|
},
|
|
104
105
|
// 确认按钮的颜色
|
|
105
106
|
confirmColor: {
|
|
106
107
|
type: String,
|
|
107
|
-
default:
|
|
108
|
+
default: defprops.datetimePicker.confirmColor
|
|
108
109
|
},
|
|
109
110
|
// 每列中可见选项的数量
|
|
110
111
|
visibleItemCount: {
|
|
111
112
|
type: [String, Number],
|
|
112
|
-
default:
|
|
113
|
+
default: defprops.datetimePicker.visibleItemCount
|
|
113
114
|
},
|
|
114
115
|
// 是否允许点击遮罩关闭选择器
|
|
115
116
|
closeOnClickOverlay: {
|
|
116
117
|
type: Boolean,
|
|
117
|
-
default:
|
|
118
|
+
default: defprops.datetimePicker.closeOnClickOverlay
|
|
118
119
|
},
|
|
119
120
|
// 各列的默认索引
|
|
120
121
|
defaultIndex: {
|
|
121
122
|
type: Array,
|
|
122
|
-
default:
|
|
123
|
+
default: defprops.datetimePicker.defaultIndex
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
126
|
}
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
return result
|
|
32
32
|
}
|
|
33
33
|
import props from './props.js';
|
|
34
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
35
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
34
36
|
// import dayjs from '../../libs/util/dayjs.js';
|
|
35
37
|
import dayjs from 'dayjs'
|
|
36
38
|
|
|
@@ -68,7 +70,7 @@
|
|
|
68
70
|
*/
|
|
69
71
|
export default {
|
|
70
72
|
name: 'datetime-picker',
|
|
71
|
-
mixins: [
|
|
73
|
+
mixins: [mpMixin, mixin, props],
|
|
72
74
|
data() {
|
|
73
75
|
return {
|
|
74
76
|
columns: [],
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 是否虚线
|
|
4
5
|
dashed: {
|
|
5
6
|
type: Boolean,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.divider.dashed
|
|
7
8
|
},
|
|
8
9
|
// 是否细线
|
|
9
10
|
hairline: {
|
|
10
11
|
type: Boolean,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.divider.hairline
|
|
12
13
|
},
|
|
13
14
|
// 是否以点替代文字,优先于text字段起作用
|
|
14
15
|
dot: {
|
|
15
16
|
type: Boolean,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.divider.dot
|
|
17
18
|
},
|
|
18
19
|
// 内容文本的位置,left-左边,center-中间,right-右边
|
|
19
20
|
textPosition: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.divider.textPosition
|
|
22
23
|
},
|
|
23
24
|
// 文本内容
|
|
24
25
|
text: {
|
|
25
26
|
type: [String, Number],
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.divider.text
|
|
27
28
|
},
|
|
28
29
|
// 文本大小
|
|
29
30
|
textSize: {
|
|
30
31
|
type: [String, Number],
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.divider.textSize
|
|
32
33
|
},
|
|
33
34
|
// 文本颜色
|
|
34
35
|
textColor: {
|
|
35
36
|
type: String,
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.divider.textColor
|
|
37
38
|
},
|
|
38
39
|
// 线条颜色
|
|
39
40
|
lineColor: {
|
|
40
41
|
type: String,
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.divider.lineColor
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
|
|
31
31
|
<script>
|
|
32
32
|
import props from './props.js';
|
|
33
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
34
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
33
35
|
/**
|
|
34
36
|
* divider 分割线
|
|
35
37
|
* @description 区隔内容的分割线,一般用于页面底部"没有更多"的提示。
|
|
@@ -49,7 +51,7 @@
|
|
|
49
51
|
*/
|
|
50
52
|
export default {
|
|
51
53
|
name:'u-divider',
|
|
52
|
-
mixins: [
|
|
54
|
+
mixins: [mpMixin, mixin, props],
|
|
53
55
|
computed: {
|
|
54
56
|
textStyle() {
|
|
55
57
|
const style = {}
|