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,54 +1,55 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 最小可选值
|
|
4
5
|
min: {
|
|
5
6
|
type: [Number, String],
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.slider.min
|
|
7
8
|
},
|
|
8
9
|
// 最大可选值
|
|
9
10
|
max: {
|
|
10
11
|
type: [Number, String],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.slider.max
|
|
12
13
|
},
|
|
13
14
|
// 步长,取值必须大于 0,并且可被(max - min)整除
|
|
14
15
|
step: {
|
|
15
16
|
type: [Number, String],
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.slider.step
|
|
17
18
|
},
|
|
18
19
|
// 当前取值
|
|
19
20
|
value: {
|
|
20
21
|
type: [Number, String],
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.slider.value
|
|
22
23
|
},
|
|
23
24
|
// 滑块右侧已选择部分的背景色
|
|
24
25
|
activeColor: {
|
|
25
26
|
type: String,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.slider.activeColor
|
|
27
28
|
},
|
|
28
29
|
// 滑块左侧未选择部分的背景色
|
|
29
30
|
inactiveColor: {
|
|
30
31
|
type: String,
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.slider.inactiveColor
|
|
32
33
|
},
|
|
33
34
|
// 滑块的大小,取值范围为 12 - 28
|
|
34
35
|
blockSize: {
|
|
35
36
|
type: [Number, String],
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.slider.blockSize
|
|
37
38
|
},
|
|
38
39
|
// 滑块的颜色
|
|
39
40
|
blockColor: {
|
|
40
41
|
type: String,
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.slider.blockColor
|
|
42
43
|
},
|
|
43
44
|
// 禁用状态
|
|
44
45
|
disabled: {
|
|
45
46
|
type: Boolean,
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.slider.disabled
|
|
47
48
|
},
|
|
48
49
|
// 是否显示当前的选择值
|
|
49
50
|
showValue: {
|
|
50
51
|
type: Boolean,
|
|
51
|
-
default:
|
|
52
|
+
default: defprops.slider.showValue
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
:inactiveColor="inactiveColor"
|
|
13
13
|
:blockSize="$u.getPx(blockSize)"
|
|
14
14
|
:blockColor="blockColor"
|
|
15
|
-
:showValue="showValue"
|
|
15
|
+
:showValue="showValue"
|
|
16
16
|
:disabled="disabled"
|
|
17
17
|
@changing="changingHandler"
|
|
18
18
|
@change="changeHandler"
|
|
@@ -21,10 +21,12 @@
|
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script>
|
|
24
|
-
import props from './props.js'
|
|
24
|
+
import props from './props.js';
|
|
25
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
26
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
25
27
|
export default {
|
|
26
28
|
name: 'u--slider',
|
|
27
|
-
mixins: [
|
|
29
|
+
mixins: [mpMixin, mixin, props],
|
|
28
30
|
methods: {
|
|
29
31
|
// 拖动过程中触发
|
|
30
32
|
changingHandler(e) {
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
<script>
|
|
11
11
|
import props from './props.js';
|
|
12
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
13
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
12
14
|
/**
|
|
13
15
|
* StatbusBar 状态栏占位
|
|
14
16
|
* @description 本组件主要用于状态填充,比如在自定导航栏的时候,它会自动适配一个恰当的状态栏高度。
|
|
@@ -19,7 +21,7 @@
|
|
|
19
21
|
*/
|
|
20
22
|
export default {
|
|
21
23
|
name: 'u-status-bar',
|
|
22
|
-
mixins: [
|
|
24
|
+
mixins: [mpMixin, mixin, props],
|
|
23
25
|
data() {
|
|
24
26
|
return {
|
|
25
27
|
}
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 排列方向
|
|
4
5
|
direction: {
|
|
5
6
|
type: String,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.steps.direction
|
|
7
8
|
},
|
|
8
9
|
// 设置第几个步骤
|
|
9
10
|
current: {
|
|
10
11
|
type: [String, Number],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.steps.current
|
|
12
13
|
},
|
|
13
14
|
// 激活状态颜色
|
|
14
15
|
activeColor: {
|
|
15
16
|
type: String,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.steps.activeColor
|
|
17
18
|
},
|
|
18
19
|
// 未激活状态颜色
|
|
19
20
|
inactiveColor: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.steps.inactiveColor
|
|
22
23
|
},
|
|
23
24
|
// 激活状态的图标
|
|
24
25
|
activeIcon: {
|
|
25
26
|
type: String,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.steps.activeIcon
|
|
27
28
|
},
|
|
28
29
|
// 未激活状态图标
|
|
29
30
|
inactiveIcon: {
|
|
30
31
|
type: String,
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.steps.inactiveIcon
|
|
32
33
|
},
|
|
33
34
|
// 是否显示点类型
|
|
34
35
|
dot: {
|
|
35
36
|
type: Boolean,
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.steps.dot
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
}
|
|
40
|
+
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
<script>
|
|
11
11
|
import props from './props.js';
|
|
12
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
13
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
12
14
|
/**
|
|
13
15
|
* Steps 步骤条
|
|
14
16
|
* @description 该组件一般用于完成一个任务要分几个步骤,标识目前处于第几步的场景。
|
|
@@ -24,7 +26,7 @@
|
|
|
24
26
|
*/
|
|
25
27
|
export default {
|
|
26
28
|
name: 'u-steps',
|
|
27
|
-
mixins: [
|
|
29
|
+
mixins: [mpMixin, mixin, props],
|
|
28
30
|
data() {
|
|
29
31
|
return {
|
|
30
32
|
}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 标题
|
|
4
5
|
title: {
|
|
5
6
|
type: [String, Number],
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.stepsItem.title
|
|
7
8
|
},
|
|
8
9
|
// 描述文本
|
|
9
10
|
desc: {
|
|
10
11
|
type: [String, Number],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.stepsItem.desc
|
|
12
13
|
},
|
|
13
14
|
// 图标大小
|
|
14
15
|
iconSize: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.stepsItem.iconSize
|
|
17
18
|
},
|
|
18
19
|
// 当前步骤是否处于失败状态
|
|
19
20
|
error: {
|
|
20
21
|
type: Boolean,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.stepsItem.error
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -48,6 +48,8 @@
|
|
|
48
48
|
|
|
49
49
|
<script>
|
|
50
50
|
import props from './props.js';
|
|
51
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
52
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
51
53
|
// #ifdef APP-NVUE
|
|
52
54
|
const dom = uni.requireNativePlugin('dom')
|
|
53
55
|
// #endif
|
|
@@ -63,7 +65,7 @@
|
|
|
63
65
|
*/
|
|
64
66
|
export default {
|
|
65
67
|
name: 'u-steps-item',
|
|
66
|
-
mixins: [
|
|
68
|
+
mixins: [mpMixin, mixin, props],
|
|
67
69
|
data() {
|
|
68
70
|
return {
|
|
69
71
|
index: 0,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
|
|
4
5
|
offsetTop: {
|
|
5
6
|
type: [String, Number],
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.sticky.offsetTop
|
|
7
8
|
},
|
|
8
9
|
// 自定义导航栏的高度
|
|
9
10
|
customNavHeight: {
|
|
@@ -13,28 +14,28 @@ export default {
|
|
|
13
14
|
default: 44,
|
|
14
15
|
// #endif
|
|
15
16
|
// #ifndef H5
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.sticky.customNavHeight
|
|
17
18
|
// #endif
|
|
18
19
|
},
|
|
19
20
|
// 是否开启吸顶功能
|
|
20
21
|
disabled: {
|
|
21
22
|
type: Boolean,
|
|
22
|
-
default:
|
|
23
|
+
default: defprops.sticky.disabled
|
|
23
24
|
},
|
|
24
25
|
// 吸顶区域的背景颜色
|
|
25
26
|
bgColor: {
|
|
26
27
|
type: String,
|
|
27
|
-
default:
|
|
28
|
+
default: defprops.sticky.bgColor
|
|
28
29
|
},
|
|
29
30
|
// z-index值
|
|
30
31
|
zIndex: {
|
|
31
32
|
type: [String, Number],
|
|
32
|
-
default:
|
|
33
|
+
default: defprops.sticky.zIndex
|
|
33
34
|
},
|
|
34
35
|
// 列表中的索引值
|
|
35
36
|
index: {
|
|
36
37
|
type: [String, Number],
|
|
37
|
-
default:
|
|
38
|
+
default: defprops.sticky.index
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
}
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script>
|
|
17
|
-
import props from './props.js'
|
|
17
|
+
import props from './props.js';
|
|
18
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
19
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
18
20
|
/**
|
|
19
21
|
* sticky 吸顶
|
|
20
22
|
* @description 该组件与CSS中position: sticky属性实现的效果一致,当组件达到预设的到顶部距离时, 就会固定在指定位置,组件位置大于预设的顶部距离时,会重新按照正常的布局排列。
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
*/
|
|
33
35
|
export default {
|
|
34
36
|
name: 'u-sticky',
|
|
35
|
-
mixins: [
|
|
37
|
+
mixins: [mpMixin, mixin, props],
|
|
36
38
|
data() {
|
|
37
39
|
return {
|
|
38
40
|
cssSticky: false, // 是否使用css的sticky实现
|
|
@@ -1,49 +1,50 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// tab的数据
|
|
4
5
|
list: {
|
|
5
6
|
type: Array,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.subsection.list
|
|
7
8
|
},
|
|
8
9
|
// 当前活动的tab的index
|
|
9
10
|
current: {
|
|
10
11
|
type: [String, Number],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.subsection.current
|
|
12
13
|
},
|
|
13
14
|
// 激活的颜色
|
|
14
15
|
activeColor: {
|
|
15
16
|
type: String,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.subsection.activeColor
|
|
17
18
|
},
|
|
18
19
|
// 未激活的颜色
|
|
19
20
|
inactiveColor: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.subsection.inactiveColor
|
|
22
23
|
},
|
|
23
24
|
// 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
|
|
24
25
|
mode: {
|
|
25
26
|
type: String,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.subsection.mode
|
|
27
28
|
},
|
|
28
29
|
// 字体大小
|
|
29
30
|
fontSize: {
|
|
30
31
|
type: [String, Number],
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.subsection.fontSize
|
|
32
33
|
},
|
|
33
34
|
// 激活tab的字体是否加粗
|
|
34
35
|
bold: {
|
|
35
36
|
type: Boolean,
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.subsection.bold
|
|
37
38
|
},
|
|
38
39
|
// mode = button时,组件背景颜色
|
|
39
40
|
bgColor: {
|
|
40
41
|
type: String,
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.subsection.bgColor
|
|
42
43
|
},
|
|
43
44
|
// 从list元素对象中读取的键名
|
|
44
45
|
keyName: {
|
|
45
46
|
type: String,
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.subsection.keyName
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
}
|
|
@@ -53,6 +53,8 @@ const dom = uni.requireNativePlugin("dom");
|
|
|
53
53
|
const animation = uni.requireNativePlugin("animation");
|
|
54
54
|
// #endif
|
|
55
55
|
import props from "./props.js";
|
|
56
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
57
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
56
58
|
/**
|
|
57
59
|
* Subsection 分段器
|
|
58
60
|
* @description 该分段器一般用于用户从几个选项中选择某一个的场景
|
|
@@ -73,7 +75,7 @@ import props from "./props.js";
|
|
|
73
75
|
*/
|
|
74
76
|
export default {
|
|
75
77
|
name: "u-subsection",
|
|
76
|
-
mixins: [
|
|
78
|
+
mixins: [mpMixin, mixin, props],
|
|
77
79
|
data() {
|
|
78
80
|
return {
|
|
79
81
|
// 组件尺寸
|
|
@@ -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
|
* SwipeAction 滑动单元格
|
|
11
13
|
* @description 该组件一般用于左滑唤出操作菜单的场景,用的最多的是左滑删除操作
|
|
@@ -16,7 +18,7 @@
|
|
|
16
18
|
*/
|
|
17
19
|
export default {
|
|
18
20
|
name: 'u-swipe-action',
|
|
19
|
-
mixins: [
|
|
21
|
+
mixins: [mpMixin, mixin, props],
|
|
20
22
|
data() {
|
|
21
23
|
return {}
|
|
22
24
|
},
|
|
@@ -1,29 +1,30 @@
|
|
|
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.swipeActionItem.show
|
|
7
8
|
},
|
|
8
9
|
// 标识符,如果是v-for,可用index索引值
|
|
9
10
|
name: {
|
|
10
11
|
type: [String, Number],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.swipeActionItem.name
|
|
12
13
|
},
|
|
13
14
|
// 是否禁用
|
|
14
15
|
disabled: {
|
|
15
16
|
type: Boolean,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.swipeActionItem.disabled
|
|
17
18
|
},
|
|
18
19
|
// 是否自动关闭其他swipe按钮组
|
|
19
20
|
autoClose: {
|
|
20
21
|
type: Boolean,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.swipeActionItem.autoClose
|
|
22
23
|
},
|
|
23
24
|
// 滑动距离阈值,只有大于此值,才被认为是要打开菜单
|
|
24
25
|
threshold: {
|
|
25
26
|
type: Number,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.swipeActionItem.threshold
|
|
27
28
|
},
|
|
28
29
|
// 右侧按钮内容
|
|
29
30
|
options: {
|
|
@@ -35,7 +36,7 @@ export default {
|
|
|
35
36
|
// 动画过渡时间,单位ms
|
|
36
37
|
duration: {
|
|
37
38
|
type: [String, Number],
|
|
38
|
-
default:
|
|
39
|
+
default: defprops.swipeActionItem.duration
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
}
|
|
@@ -48,6 +48,8 @@
|
|
|
48
48
|
<script>
|
|
49
49
|
import touch from '../../libs/mixin/touch.js'
|
|
50
50
|
import props from './props.js';
|
|
51
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
52
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
51
53
|
// #ifdef APP-NVUE
|
|
52
54
|
import nvue from './nvue.js';
|
|
53
55
|
// #endif
|
|
@@ -72,13 +74,13 @@
|
|
|
72
74
|
export default {
|
|
73
75
|
name: 'u-swipe-action-item',
|
|
74
76
|
// #ifndef APP-NVUE
|
|
75
|
-
mixins: [
|
|
77
|
+
mixins: [mpMixin, mixin, props, touch],
|
|
76
78
|
// #endif
|
|
77
79
|
// #ifdef APP-NVUE
|
|
78
|
-
mixins: [
|
|
80
|
+
mixins: [mpMixin, mixin, props, nvue, touch],
|
|
79
81
|
// #endif
|
|
80
82
|
// #ifdef APP-VUE || MP-WEIXIN || H5 || MP-QQ
|
|
81
|
-
mixins: [
|
|
83
|
+
mixins: [mpMixin, mixin, props, touch, wxs],
|
|
82
84
|
// #endif
|
|
83
85
|
data() {
|
|
84
86
|
return {
|
|
@@ -1,125 +1,126 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名
|
|
4
5
|
list: {
|
|
5
6
|
type: Array,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.swiper.list
|
|
7
8
|
},
|
|
8
9
|
// 是否显示面板指示器
|
|
9
10
|
indicator: {
|
|
10
11
|
type: Boolean,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.swiper.indicator
|
|
12
13
|
},
|
|
13
14
|
// 指示器非激活颜色
|
|
14
15
|
indicatorActiveColor: {
|
|
15
16
|
type: String,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.swiper.indicatorActiveColor
|
|
17
18
|
},
|
|
18
19
|
// 指示器的激活颜色
|
|
19
20
|
indicatorInactiveColor: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.swiper.indicatorInactiveColor
|
|
22
23
|
},
|
|
23
24
|
// 指示器样式,可通过bottom,left,right进行定位
|
|
24
25
|
indicatorStyle: {
|
|
25
26
|
type: [String, Object],
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.swiper.indicatorStyle
|
|
27
28
|
},
|
|
28
29
|
// 指示器模式,line-线型,dot-点型
|
|
29
30
|
indicatorMode: {
|
|
30
31
|
type: String,
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.swiper.indicatorMode
|
|
32
33
|
},
|
|
33
34
|
// 是否自动切换
|
|
34
35
|
autoplay: {
|
|
35
36
|
type: Boolean,
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.swiper.autoplay
|
|
37
38
|
},
|
|
38
39
|
// 当前所在滑块的 index
|
|
39
40
|
current: {
|
|
40
41
|
type: [String, Number],
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.swiper.current
|
|
42
43
|
},
|
|
43
44
|
// 当前所在滑块的 item-id ,不能与 current 被同时指定
|
|
44
45
|
currentItemId: {
|
|
45
46
|
type: String,
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.swiper.currentItemId
|
|
47
48
|
},
|
|
48
49
|
// 滑块自动切换时间间隔
|
|
49
50
|
interval: {
|
|
50
51
|
type: [String, Number],
|
|
51
|
-
default:
|
|
52
|
+
default: defprops.swiper.interval
|
|
52
53
|
},
|
|
53
54
|
// 滑块切换过程所需时间
|
|
54
55
|
duration: {
|
|
55
56
|
type: [String, Number],
|
|
56
|
-
default:
|
|
57
|
+
default: defprops.swiper.duration
|
|
57
58
|
},
|
|
58
59
|
// 播放到末尾后是否重新回到开头
|
|
59
60
|
circular: {
|
|
60
61
|
type: Boolean,
|
|
61
|
-
default:
|
|
62
|
+
default: defprops.swiper.circular
|
|
62
63
|
},
|
|
63
64
|
// 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持
|
|
64
65
|
previousMargin: {
|
|
65
66
|
type: [String, Number],
|
|
66
|
-
default:
|
|
67
|
+
default: defprops.swiper.previousMargin
|
|
67
68
|
},
|
|
68
69
|
// 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持
|
|
69
70
|
nextMargin: {
|
|
70
71
|
type: [String, Number],
|
|
71
|
-
default:
|
|
72
|
+
default: defprops.swiper.nextMargin
|
|
72
73
|
},
|
|
73
74
|
// 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持
|
|
74
75
|
acceleration: {
|
|
75
76
|
type: Boolean,
|
|
76
|
-
default:
|
|
77
|
+
default: defprops.swiper.acceleration
|
|
77
78
|
},
|
|
78
79
|
// 同时显示的滑块数量,nvue、支付宝小程序不支持
|
|
79
80
|
displayMultipleItems: {
|
|
80
81
|
type: Number,
|
|
81
|
-
default:
|
|
82
|
+
default: defprops.swiper.displayMultipleItems
|
|
82
83
|
},
|
|
83
84
|
// 指定swiper切换缓动动画类型,有效值:default、linear、easeInCubic、easeOutCubic、easeInOutCubic
|
|
84
85
|
// 只对微信小程序有效
|
|
85
86
|
easingFunction: {
|
|
86
87
|
type: String,
|
|
87
|
-
default:
|
|
88
|
+
default: defprops.swiper.easingFunction
|
|
88
89
|
},
|
|
89
90
|
// list数组中指定对象的目标属性名
|
|
90
91
|
keyName: {
|
|
91
92
|
type: String,
|
|
92
|
-
default:
|
|
93
|
+
default: defprops.swiper.keyName
|
|
93
94
|
},
|
|
94
95
|
// 图片的裁剪模式
|
|
95
96
|
imgMode: {
|
|
96
97
|
type: String,
|
|
97
|
-
default:
|
|
98
|
+
default: defprops.swiper.imgMode
|
|
98
99
|
},
|
|
99
100
|
// 组件高度
|
|
100
101
|
height: {
|
|
101
102
|
type: [String, Number],
|
|
102
|
-
default:
|
|
103
|
+
default: defprops.swiper.height
|
|
103
104
|
},
|
|
104
105
|
// 背景颜色
|
|
105
106
|
bgColor: {
|
|
106
107
|
type: String,
|
|
107
|
-
default:
|
|
108
|
+
default: defprops.swiper.bgColor
|
|
108
109
|
},
|
|
109
110
|
// 组件圆角,数值或带单位的字符串
|
|
110
111
|
radius: {
|
|
111
112
|
type: [String, Number],
|
|
112
|
-
default:
|
|
113
|
+
default: defprops.swiper.radius
|
|
113
114
|
},
|
|
114
115
|
// 是否加载中
|
|
115
116
|
loading: {
|
|
116
117
|
type: Boolean,
|
|
117
|
-
default:
|
|
118
|
+
default: defprops.swiper.loading
|
|
118
119
|
},
|
|
119
120
|
// 是否显示标题,要求数组对象中有title属性
|
|
120
121
|
showTitle: {
|
|
121
122
|
type: Boolean,
|
|
122
|
-
default:
|
|
123
|
+
default: defprops.swiper.showTitle
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
126
|
}
|
|
@@ -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
|
/**
|
|
95
97
|
* Swiper 轮播图
|
|
96
98
|
* @description 该组件一般用于导航轮播,广告展示等场景,可开箱即用,
|
|
@@ -125,7 +127,7 @@
|
|
|
125
127
|
*/
|
|
126
128
|
export default {
|
|
127
129
|
name: 'u-swiper',
|
|
128
|
-
mixins: [
|
|
130
|
+
mixins: [mpMixin, mixin, props],
|
|
129
131
|
data() {
|
|
130
132
|
return {
|
|
131
133
|
currentIndex: 0
|