uview-plus 3.0.14 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +8 -0
- package/components/u--form/u--form.vue +4 -2
- package/components/u--image/u--image.vue +4 -2
- package/components/u--input/u--input.vue +5 -3
- package/components/u--text/u--text.vue +4 -2
- package/components/u--textarea/u--textarea.vue +4 -2
- package/components/u-action-sheet/props.js +11 -10
- package/components/u-action-sheet/u-action-sheet.vue +3 -1
- package/components/u-album/props.js +12 -11
- package/components/u-album/u-album.vue +4 -2
- package/components/u-alert/props.js +9 -8
- package/components/u-alert/u-alert.vue +3 -1
- package/components/u-avatar/props.js +15 -14
- package/components/u-avatar/u-avatar.vue +3 -1
- package/components/u-avatar-group/props.js +10 -9
- package/components/u-avatar-group/u-avatar-group.vue +3 -1
- package/components/u-back-top/props.js +11 -10
- package/components/u-back-top/u-back-top.vue +2 -0
- package/components/u-badge/props.js +15 -14
- package/components/u-badge/u-badge.vue +3 -1
- package/components/u-button/props.js +29 -28
- package/components/u-button/u-button.vue +4 -2
- package/components/u-calendar/month.vue +1 -1
- package/components/u-calendar/props.js +28 -27
- package/components/u-calendar/u-calendar.vue +3 -1
- package/components/u-car-keyboard/props.js +1 -0
- package/components/u-car-keyboard/u-car-keyboard.vue +4 -2
- package/components/u-cell/props.js +18 -17
- package/components/u-cell/u-cell.vue +12 -8
- package/components/u-cell-group/props.js +3 -2
- package/components/u-cell-group/u-cell-group.vue +3 -1
- package/components/u-checkbox/props.js +14 -13
- package/components/u-checkbox/u-checkbox.vue +3 -1
- package/components/u-checkbox-group/props.js +16 -15
- package/components/u-checkbox-group/u-checkbox-group.vue +3 -1
- package/components/u-circle-progress/props.js +2 -1
- package/components/u-circle-progress/u-circle-progress.vue +3 -1
- package/components/u-code/props.js +7 -6
- package/components/u-code/u-code.vue +3 -1
- package/components/u-code-input/props.js +16 -15
- package/components/u-code-input/u-code-input.vue +3 -1
- package/components/u-col/props.js +6 -5
- package/components/u-col/u-col.vue +3 -1
- package/components/u-collapse/props.js +4 -3
- package/components/u-collapse/u-collapse.vue +12 -12
- package/components/u-collapse-item/props.js +12 -11
- package/components/u-collapse-item/u-collapse-item.vue +15 -13
- package/components/u-column-notice/props.js +11 -10
- package/components/u-column-notice/u-column-notice.vue +3 -1
- package/components/u-count-down/props.js +5 -4
- package/components/u-count-down/u-count-down.vue +5 -3
- package/components/u-count-to/props.js +12 -11
- package/components/u-count-to/u-count-to.vue +3 -1
- package/components/u-datetime-picker/props.js +24 -23
- package/components/u-datetime-picker/u-datetime-picker.vue +3 -1
- package/components/u-divider/props.js +9 -8
- package/components/u-divider/u-divider.vue +3 -1
- package/components/u-dropdown/props.js +5 -4
- package/components/u-dropdown/u-dropdown.vue +4 -2
- package/components/u-dropdown-item/props.js +2 -1
- package/components/u-dropdown-item/u-dropdown-item.vue +4 -2
- package/components/u-empty/props.js +12 -11
- package/components/u-empty/u-empty.vue +3 -2
- package/components/u-form/props.js +9 -8
- package/components/u-form/u-form.vue +13 -11
- package/components/u-form-item/props.js +9 -8
- package/components/u-form-item/u-form-item.vue +3 -1
- package/components/u-gap/props.js +5 -4
- package/components/u-gap/u-gap.vue +3 -1
- package/components/u-grid/props.js +4 -3
- package/components/u-grid/u-grid.vue +3 -1
- package/components/u-grid-item/props.js +3 -2
- package/components/u-grid-item/u-grid-item.vue +3 -1
- package/components/u-icon/props.js +18 -17
- package/components/u-icon/u-icon.vue +4 -2
- package/components/u-image/props.js +18 -17
- package/components/u-image/u-image.vue +4 -2
- package/components/u-index-anchor/props.js +6 -5
- package/components/u-index-anchor/u-index-anchor.vue +3 -1
- package/components/u-index-item/props.js +1 -0
- package/components/u-index-item/u-index-item.vue +3 -1
- package/components/u-index-list/props.js +6 -5
- package/components/u-index-list/u-index-list.vue +3 -1
- package/components/u-input/props.js +36 -35
- package/components/u-input/u-input.vue +3 -1
- package/components/u-keyboard/props.js +17 -16
- package/components/u-keyboard/u-keyboard.vue +3 -1
- package/components/u-line/props.js +7 -6
- package/components/u-line/u-line.vue +3 -1
- package/components/u-line-progress/props.js +6 -5
- package/components/u-line-progress/u-line-progress.vue +3 -1
- package/components/u-link/props.js +8 -7
- package/components/u-link/u-link.vue +3 -1
- package/components/u-list/props.js +15 -14
- package/components/u-list/u-list.vue +3 -1
- package/components/u-list-item/props.js +2 -1
- package/components/u-list-item/u-list-item.vue +3 -1
- package/components/u-loading-icon/props.js +13 -12
- package/components/u-loading-icon/u-loading-icon.vue +4 -2
- package/components/u-loading-page/props.js +10 -9
- package/components/u-loading-page/u-loading-page.vue +3 -1
- package/components/u-loadmore/props.js +19 -18
- package/components/u-loadmore/u-loadmore.vue +3 -1
- package/components/u-modal/props.js +17 -16
- package/components/u-modal/u-modal.vue +4 -2
- package/components/u-navbar/props.js +34 -33
- package/components/u-navbar/u-navbar.vue +3 -1
- package/components/u-no-network/props.js +4 -3
- package/components/u-no-network/u-no-network.vue +3 -1
- package/components/u-notice-bar/props.js +14 -13
- package/components/u-notice-bar/u-notice-bar.vue +3 -1
- package/components/u-notify/props.js +10 -9
- package/components/u-notify/u-notify.vue +3 -1
- package/components/u-number-box/props.js +23 -22
- package/components/u-number-box/u-number-box.vue +3 -1
- package/components/u-number-keyboard/props.js +4 -3
- package/components/u-number-keyboard/u-number-keyboard.vue +3 -1
- package/components/u-overlay/props.js +5 -4
- package/components/u-overlay/u-overlay.vue +3 -1
- package/components/u-parse/props.js +9 -8
- package/components/u-picker/props.js +16 -15
- package/components/u-picker/u-picker.vue +3 -1
- package/components/u-picker-column/props.js +1 -0
- package/components/u-picker-column/u-picker-column.vue +3 -1
- package/components/u-popup/props.js +16 -15
- package/components/u-popup/u-popup.vue +4 -2
- package/components/u-radio/props.js +13 -12
- package/components/u-radio/u-radio.vue +3 -1
- package/components/u-radio-group/props.js +18 -17
- package/components/u-radio-group/u-radio-group.vue +3 -1
- package/components/u-rate/props.js +15 -14
- package/components/u-rate/u-rate.vue +3 -1
- package/components/u-read-more/props.js +9 -8
- package/components/u-read-more/u-read-more.vue +3 -1
- package/components/u-row/props.js +4 -3
- package/components/u-row/u-row.vue +3 -1
- package/components/u-row-notice/props.js +8 -7
- package/components/u-row-notice/u-row-notice.vue +3 -1
- package/components/u-safe-bottom/props.js +1 -0
- package/components/u-safe-bottom/u-safe-bottom.vue +4 -2
- package/components/u-scroll-list/props.js +7 -6
- package/components/u-scroll-list/u-scroll-list.vue +5 -1
- package/components/u-search/props.js +25 -24
- package/components/u-search/u-search.vue +3 -1
- package/components/u-skeleton/props.js +12 -11
- package/components/u-skeleton/u-skeleton.vue +3 -1
- package/components/u-slider/props.js +11 -10
- package/components/u-slider/u-slider.vue +5 -3
- package/components/u-status-bar/props.js +2 -1
- package/components/u-status-bar/u-status-bar.vue +3 -1
- package/components/u-steps/props.js +9 -8
- package/components/u-steps/u-steps.vue +3 -1
- package/components/u-steps-item/props.js +5 -4
- package/components/u-steps-item/u-steps-item.vue +3 -1
- package/components/u-sticky/props.js +7 -6
- package/components/u-sticky/u-sticky.vue +4 -2
- package/components/u-subsection/props.js +10 -9
- package/components/u-subsection/u-subsection.vue +3 -1
- package/components/u-swipe-action/props.js +2 -1
- package/components/u-swipe-action/u-swipe-action.vue +3 -1
- package/components/u-swipe-action-item/props.js +7 -6
- package/components/u-swipe-action-item/u-swipe-action-item.vue +7 -3
- package/components/u-swiper/props.js +25 -24
- package/components/u-swiper/u-swiper.vue +3 -1
- package/components/u-swiper-indicator/props.js +6 -5
- package/components/u-swiper-indicator/u-swiper-indicator.vue +3 -1
- package/components/u-switch/props.js +12 -11
- package/components/u-switch/u-switch.vue +3 -1
- package/components/u-tabbar/props.js +9 -8
- package/components/u-tabbar/u-tabbar.vue +3 -1
- package/components/u-tabbar-item/props.js +7 -6
- package/components/u-tabbar-item/u-tabbar-item.vue +3 -1
- package/components/u-table/props.js +1 -0
- package/components/u-table/u-table.vue +3 -1
- package/components/u-tabs/props.js +13 -12
- package/components/u-tabs/u-tabs.vue +3 -1
- package/components/u-tabs-item/props.js +1 -0
- package/components/u-tabs-item/u-tabs-item.vue +3 -1
- package/components/u-tag/props.js +16 -15
- package/components/u-tag/u-tag.vue +5 -3
- package/components/u-td/props.js +1 -0
- package/components/u-td/u-td.vue +3 -1
- package/components/u-text/props.js +22 -21
- package/components/u-text/u-text.vue +4 -2
- package/components/u-textarea/props.js +24 -23
- package/components/u-textarea/u-textarea.vue +3 -1
- package/components/u-toast/u-toast.vue +3 -1
- package/components/u-toolbar/props.js +7 -6
- package/components/u-toolbar/u-toolbar.vue +3 -1
- package/components/u-tooltip/props.js +12 -11
- package/components/u-tooltip/u-tooltip.vue +3 -1
- package/components/u-tr/props.js +1 -0
- package/components/u-tr/u-tr.vue +3 -1
- package/components/u-transition/props.js +5 -4
- package/components/u-transition/u-transition.vue +3 -1
- package/components/u-upload/props.js +23 -22
- package/components/u-upload/u-upload.vue +4 -2
- package/package.json +5 -8
|
@@ -1,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
|
|
@@ -71,12 +73,14 @@
|
|
|
71
73
|
*/
|
|
72
74
|
export default {
|
|
73
75
|
name: 'u-swipe-action-item',
|
|
74
|
-
|
|
76
|
+
// #ifndef APP-NVUE
|
|
77
|
+
mixins: [mpMixin, mixin, props, touch],
|
|
78
|
+
// #endif
|
|
75
79
|
// #ifdef APP-NVUE
|
|
76
|
-
mixins: [
|
|
80
|
+
mixins: [mpMixin, mixin, props, nvue, touch],
|
|
77
81
|
// #endif
|
|
78
82
|
// #ifdef APP-VUE || MP-WEIXIN || H5 || MP-QQ
|
|
79
|
-
mixins: [
|
|
83
|
+
mixins: [mpMixin, mixin, props, touch, wxs],
|
|
80
84
|
// #endif
|
|
81
85
|
data() {
|
|
82
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
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 轮播的长度
|
|
4
5
|
length: {
|
|
5
6
|
type: [String, Number],
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.swiperIndicator.length
|
|
7
8
|
},
|
|
8
9
|
// 当前处于活动状态的轮播的索引
|
|
9
10
|
current: {
|
|
10
11
|
type: [String, Number],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.swiperIndicator.current
|
|
12
13
|
},
|
|
13
14
|
// 指示器非激活颜色
|
|
14
15
|
indicatorActiveColor: {
|
|
15
16
|
type: String,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.swiperIndicator.indicatorActiveColor
|
|
17
18
|
},
|
|
18
19
|
// 指示器的激活颜色
|
|
19
20
|
indicatorInactiveColor: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.swiperIndicator.indicatorInactiveColor
|
|
22
23
|
},
|
|
23
24
|
// 指示器模式,line-线型,dot-点型
|
|
24
25
|
indicatorMode: {
|
|
25
26
|
type: String,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.swiperIndicator.indicatorMode
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
}
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
|
|
34
34
|
<script>
|
|
35
35
|
import props from './props.js';
|
|
36
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
37
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
36
38
|
/**
|
|
37
39
|
* SwiperIndicator 轮播图指示器
|
|
38
40
|
* @description 该组件一般用于导航轮播,广告展示等场景,可开箱即用,
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
*/
|
|
47
49
|
export default {
|
|
48
50
|
name: 'u-swiper-indicator',
|
|
49
|
-
mixins: [
|
|
51
|
+
mixins: [mpMixin, mixin, props],
|
|
50
52
|
data() {
|
|
51
53
|
return {
|
|
52
54
|
lineWidth: 22
|
|
@@ -1,62 +1,63 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 是否为加载中状态
|
|
4
5
|
loading: {
|
|
5
6
|
type: Boolean,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.switch.loading
|
|
7
8
|
},
|
|
8
9
|
// 是否为禁用装填
|
|
9
10
|
disabled: {
|
|
10
11
|
type: Boolean,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.switch.disabled
|
|
12
13
|
},
|
|
13
14
|
// 开关尺寸,单位px
|
|
14
15
|
size: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.switch.size
|
|
17
18
|
},
|
|
18
19
|
// 打开时的背景颜色
|
|
19
20
|
activeColor: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.switch.activeColor
|
|
22
23
|
},
|
|
23
24
|
// 关闭时的背景颜色
|
|
24
25
|
inactiveColor: {
|
|
25
26
|
type: String,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.switch.inactiveColor
|
|
27
28
|
},
|
|
28
29
|
// 通过v-model双向绑定的值
|
|
29
30
|
// #ifdef VUE3
|
|
30
31
|
modelValue: {
|
|
31
32
|
type: [Boolean, String, Number],
|
|
32
|
-
default:
|
|
33
|
+
default: defprops.switch.value
|
|
33
34
|
},
|
|
34
35
|
// #endif
|
|
35
36
|
// #ifdef VUE2
|
|
36
37
|
value: {
|
|
37
38
|
type: [Boolean, String, Number],
|
|
38
|
-
default:
|
|
39
|
+
default: defprops.switch.value
|
|
39
40
|
},
|
|
40
41
|
// #endif
|
|
41
42
|
// switch打开时的值
|
|
42
43
|
activeValue: {
|
|
43
44
|
type: [String, Number, Boolean],
|
|
44
|
-
default:
|
|
45
|
+
default: defprops.switch.activeValue
|
|
45
46
|
},
|
|
46
47
|
// switch关闭时的值
|
|
47
48
|
inactiveValue: {
|
|
48
49
|
type: [String, Number, Boolean],
|
|
49
|
-
default:
|
|
50
|
+
default: defprops.switch.inactiveValue
|
|
50
51
|
},
|
|
51
52
|
// 是否开启异步变更,开启后需要手动控制输入值
|
|
52
53
|
asyncChange: {
|
|
53
54
|
type: Boolean,
|
|
54
|
-
default:
|
|
55
|
+
default: defprops.switch.asyncChange
|
|
55
56
|
},
|
|
56
57
|
// 圆点与外边框的距离
|
|
57
58
|
space: {
|
|
58
59
|
type: [String, Number],
|
|
59
|
-
default:
|
|
60
|
+
default: defprops.switch.space
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
}
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
|
|
30
30
|
<script>
|
|
31
31
|
import props from './props.js';
|
|
32
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
33
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
32
34
|
/**
|
|
33
35
|
* switch 开关选择器
|
|
34
36
|
* @description 选择开关一般用于只有两个选择,且只能选其一的场景。
|
|
@@ -50,7 +52,7 @@
|
|
|
50
52
|
*/
|
|
51
53
|
export default {
|
|
52
54
|
name: "u-switch",
|
|
53
|
-
mixins: [
|
|
55
|
+
mixins: [mpMixin, mixin,props],
|
|
54
56
|
watch: {
|
|
55
57
|
// #ifdef VUE3
|
|
56
58
|
modelValue: {
|