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
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
10
|
import props from './props.js';
|
|
11
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
12
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
11
13
|
|
|
12
14
|
/**
|
|
13
15
|
* link 超链接
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
*/
|
|
27
29
|
export default {
|
|
28
30
|
name: "u-link",
|
|
29
|
-
mixins: [
|
|
31
|
+
mixins: [mpMixin, mixin, props],
|
|
30
32
|
computed: {
|
|
31
33
|
linkStyle() {
|
|
32
34
|
const style = {
|
|
@@ -1,74 +1,75 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 控制是否出现滚动条,仅nvue有效
|
|
4
5
|
showScrollbar: {
|
|
5
6
|
type: Boolean,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.list.showScrollbar
|
|
7
8
|
},
|
|
8
9
|
// 距底部多少时触发scrolltolower事件
|
|
9
10
|
lowerThreshold: {
|
|
10
11
|
type: [String, Number],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.list.lowerThreshold
|
|
12
13
|
},
|
|
13
14
|
// 距顶部多少时触发scrolltoupper事件,非nvue有效
|
|
14
15
|
upperThreshold: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.list.upperThreshold
|
|
17
18
|
},
|
|
18
19
|
// 设置竖向滚动条位置
|
|
19
20
|
scrollTop: {
|
|
20
21
|
type: [String, Number],
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.list.scrollTop
|
|
22
23
|
},
|
|
23
24
|
// 控制 onscroll 事件触发的频率,仅nvue有效
|
|
24
25
|
offsetAccuracy: {
|
|
25
26
|
type: [String, Number],
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.list.offsetAccuracy
|
|
27
28
|
},
|
|
28
29
|
// 启用 flexbox 布局。开启后,当前节点声明了display: flex就会成为flex container,并作用于其孩子节点,仅微信小程序有效
|
|
29
30
|
enableFlex: {
|
|
30
31
|
type: Boolean,
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.list.enableFlex
|
|
32
33
|
},
|
|
33
34
|
// 是否按分页模式显示List,默认值false
|
|
34
35
|
pagingEnabled: {
|
|
35
36
|
type: Boolean,
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.list.pagingEnabled
|
|
37
38
|
},
|
|
38
39
|
// 是否允许List滚动
|
|
39
40
|
scrollable: {
|
|
40
41
|
type: Boolean,
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.list.scrollable
|
|
42
43
|
},
|
|
43
44
|
// 值应为某子元素id(id不能以数字开头)
|
|
44
45
|
scrollIntoView: {
|
|
45
46
|
type: String,
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.list.scrollIntoView
|
|
47
48
|
},
|
|
48
49
|
// 在设置滚动条位置时使用动画过渡
|
|
49
50
|
scrollWithAnimation: {
|
|
50
51
|
type: Boolean,
|
|
51
|
-
default:
|
|
52
|
+
default: defprops.list.scrollWithAnimation
|
|
52
53
|
},
|
|
53
54
|
// iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只对微信小程序有效
|
|
54
55
|
enableBackToTop: {
|
|
55
56
|
type: Boolean,
|
|
56
|
-
default:
|
|
57
|
+
default: defprops.list.enableBackToTop
|
|
57
58
|
},
|
|
58
59
|
// 列表的高度
|
|
59
60
|
height: {
|
|
60
61
|
type: [String, Number],
|
|
61
|
-
default:
|
|
62
|
+
default: defprops.list.height
|
|
62
63
|
},
|
|
63
64
|
// 列表宽度
|
|
64
65
|
width: {
|
|
65
66
|
type: [String, Number],
|
|
66
|
-
default:
|
|
67
|
+
default: defprops.list.width
|
|
67
68
|
},
|
|
68
69
|
// 列表前后预渲染的屏数,1代表一个屏幕的高度,1.5代表1个半屏幕高度
|
|
69
70
|
preLoadScreen: {
|
|
70
71
|
type: [String, Number],
|
|
71
|
-
default:
|
|
72
|
+
default: defprops.list.preLoadScreen
|
|
72
73
|
}
|
|
73
74
|
// vue下,是否开启虚拟列表
|
|
74
75
|
|
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
|
|
39
39
|
<script>
|
|
40
40
|
import props from './props.js';
|
|
41
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
42
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
41
43
|
// #ifdef APP-NVUE
|
|
42
44
|
const dom = uni.requireNativePlugin('dom')
|
|
43
45
|
// #endif
|
|
@@ -65,7 +67,7 @@
|
|
|
65
67
|
*/
|
|
66
68
|
export default {
|
|
67
69
|
name: 'u-list',
|
|
68
|
-
mixins: [
|
|
70
|
+
mixins: [mpMixin, mixin, props],
|
|
69
71
|
watch: {
|
|
70
72
|
scrollIntoView(n) {
|
|
71
73
|
this.scrollIntoViewById(n)
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
<script>
|
|
19
19
|
import props from './props.js';
|
|
20
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
21
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
20
22
|
// #ifdef APP-NVUE
|
|
21
23
|
const dom = uni.requireNativePlugin('dom')
|
|
22
24
|
// #endif
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
*/
|
|
30
32
|
export default {
|
|
31
33
|
name: 'u-list-item',
|
|
32
|
-
mixins: [
|
|
34
|
+
mixins: [mpMixin, mixin, props],
|
|
33
35
|
data() {
|
|
34
36
|
return {
|
|
35
37
|
// 节点信息
|
|
@@ -1,59 +1,60 @@
|
|
|
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.loadingIcon.show
|
|
7
8
|
},
|
|
8
9
|
// 颜色
|
|
9
10
|
color: {
|
|
10
11
|
type: String,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.loadingIcon.color
|
|
12
13
|
},
|
|
13
14
|
// 提示文字颜色
|
|
14
15
|
textColor: {
|
|
15
16
|
type: String,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.loadingIcon.textColor
|
|
17
18
|
},
|
|
18
19
|
// 文字和图标是否垂直排列
|
|
19
20
|
vertical: {
|
|
20
21
|
type: Boolean,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.loadingIcon.vertical
|
|
22
23
|
},
|
|
23
24
|
// 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
|
|
24
25
|
mode: {
|
|
25
26
|
type: String,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.loadingIcon.mode
|
|
27
28
|
},
|
|
28
29
|
// 图标大小,单位默认px
|
|
29
30
|
size: {
|
|
30
31
|
type: [String, Number],
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.loadingIcon.size
|
|
32
33
|
},
|
|
33
34
|
// 文字大小
|
|
34
35
|
textSize: {
|
|
35
36
|
type: [String, Number],
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.loadingIcon.textSize
|
|
37
38
|
},
|
|
38
39
|
// 文字内容
|
|
39
40
|
text: {
|
|
40
41
|
type: [String, Number],
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.loadingIcon.text
|
|
42
43
|
},
|
|
43
44
|
// 动画模式
|
|
44
45
|
timingFunction: {
|
|
45
46
|
type: String,
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.loadingIcon.timingFunction
|
|
47
48
|
},
|
|
48
49
|
// 动画执行周期时间
|
|
49
50
|
duration: {
|
|
50
51
|
type: [String, Number],
|
|
51
|
-
default:
|
|
52
|
+
default: defprops.loadingIcon.duration
|
|
52
53
|
},
|
|
53
54
|
// mode=circle时的暗边颜色
|
|
54
55
|
inactiveColor: {
|
|
55
56
|
type: String,
|
|
56
|
-
default:
|
|
57
|
+
default: defprops.loadingIcon.inactiveColor
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
|
-
}
|
|
60
|
+
}
|
|
@@ -58,7 +58,9 @@
|
|
|
58
58
|
</template>
|
|
59
59
|
|
|
60
60
|
<script>
|
|
61
|
-
import props from './props.js';
|
|
61
|
+
import props from './props.js';
|
|
62
|
+
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
63
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
62
64
|
// #ifdef APP-NVUE
|
|
63
65
|
const animation = weex.requireModule('animation');
|
|
64
66
|
// #endif
|
|
@@ -82,7 +84,7 @@
|
|
|
82
84
|
*/
|
|
83
85
|
export default {
|
|
84
86
|
name: 'u-loading-icon',
|
|
85
|
-
mixins: [
|
|
87
|
+
mixins: [mpMixin, mixin, props],
|
|
86
88
|
data() {
|
|
87
89
|
return {
|
|
88
90
|
// Array.form可以通过一个伪数组对象创建指定长度的数组
|
|
@@ -1,49 +1,50 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 提示内容
|
|
4
5
|
loadingText: {
|
|
5
6
|
type: [String, Number],
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.loadingPage.loadingText
|
|
7
8
|
},
|
|
8
9
|
// 文字上方用于替换loading动画的图片
|
|
9
10
|
image: {
|
|
10
11
|
type: String,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.loadingPage.image
|
|
12
13
|
},
|
|
13
14
|
// 加载动画的模式,circle-圆形,spinner-花朵形,semicircle-半圆形
|
|
14
15
|
loadingMode: {
|
|
15
16
|
type: String,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.loadingPage.loadingMode
|
|
17
18
|
},
|
|
18
19
|
// 是否加载中
|
|
19
20
|
loading: {
|
|
20
21
|
type: Boolean,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.loadingPage.loading
|
|
22
23
|
},
|
|
23
24
|
// 背景色
|
|
24
25
|
bgColor: {
|
|
25
26
|
type: String,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.loadingPage.bgColor
|
|
27
28
|
},
|
|
28
29
|
// 文字颜色
|
|
29
30
|
color: {
|
|
30
31
|
type: String,
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.loadingPage.color
|
|
32
33
|
},
|
|
33
34
|
// 文字大小
|
|
34
35
|
fontSize: {
|
|
35
36
|
type: [String, Number],
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.loadingPage.fontSize
|
|
37
38
|
},
|
|
38
39
|
// 图标大小
|
|
39
40
|
iconSize: {
|
|
40
41
|
type: [String, Number],
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.loadingPage.fontSize
|
|
42
43
|
},
|
|
43
44
|
// 加载中图标的颜色,只能rgb或者十六进制颜色值
|
|
44
45
|
loadingColor: {
|
|
45
46
|
type: String,
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.loadingPage.loadingColor
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
}
|
|
@@ -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
|
/**
|
|
52
54
|
* loadingPage 加载动画
|
|
53
55
|
* @description 警此组件为一个小动画,目前用在uView的loadmore加载更多和switch开关等组件的正在加载状态场景。
|
|
@@ -66,7 +68,7 @@ import props from "./props.js";
|
|
|
66
68
|
*/
|
|
67
69
|
export default {
|
|
68
70
|
name: "u-loading-page",
|
|
69
|
-
mixins: [
|
|
71
|
+
mixins: [mpMixin, mixin, props],
|
|
70
72
|
data() {
|
|
71
73
|
return {};
|
|
72
74
|
},
|
|
@@ -1,94 +1,95 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 组件状态,loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
|
|
4
5
|
status: {
|
|
5
6
|
type: String,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.loadmore.status
|
|
7
8
|
},
|
|
8
9
|
// 组件背景色
|
|
9
10
|
bgColor: {
|
|
10
11
|
type: String,
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.loadmore.bgColor
|
|
12
13
|
},
|
|
13
14
|
// 是否显示加载中的图标
|
|
14
15
|
icon: {
|
|
15
16
|
type: Boolean,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.loadmore.icon
|
|
17
18
|
},
|
|
18
19
|
// 字体大小
|
|
19
20
|
fontSize: {
|
|
20
21
|
type: [String, Number],
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.loadmore.fontSize
|
|
22
23
|
},
|
|
23
24
|
// 图标大小
|
|
24
25
|
iconSize: {
|
|
25
26
|
type: [String, Number],
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.loadmore.iconSize
|
|
27
28
|
},
|
|
28
29
|
// 字体颜色
|
|
29
30
|
color: {
|
|
30
31
|
type: String,
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.loadmore.color
|
|
32
33
|
},
|
|
33
34
|
// 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆
|
|
34
35
|
loadingIcon: {
|
|
35
36
|
type: String,
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.loadmore.loadingIcon
|
|
37
38
|
},
|
|
38
39
|
// 加载前的提示语
|
|
39
40
|
loadmoreText: {
|
|
40
41
|
type: String,
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.loadmore.loadmoreText
|
|
42
43
|
},
|
|
43
44
|
// 加载中提示语
|
|
44
45
|
loadingText: {
|
|
45
46
|
type: String,
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.loadmore.loadingText
|
|
47
48
|
},
|
|
48
49
|
// 没有更多的提示语
|
|
49
50
|
nomoreText: {
|
|
50
51
|
type: String,
|
|
51
|
-
default:
|
|
52
|
+
default: defprops.loadmore.nomoreText
|
|
52
53
|
},
|
|
53
54
|
// 在“没有更多”状态下,是否显示粗点
|
|
54
55
|
isDot: {
|
|
55
56
|
type: Boolean,
|
|
56
|
-
default:
|
|
57
|
+
default: defprops.loadmore.isDot
|
|
57
58
|
},
|
|
58
59
|
// 加载中图标的颜色
|
|
59
60
|
iconColor: {
|
|
60
61
|
type: String,
|
|
61
|
-
default:
|
|
62
|
+
default: defprops.loadmore.iconColor
|
|
62
63
|
},
|
|
63
64
|
// 上边距
|
|
64
65
|
marginTop: {
|
|
65
66
|
type: [String, Number],
|
|
66
|
-
default:
|
|
67
|
+
default: defprops.loadmore.marginTop
|
|
67
68
|
},
|
|
68
69
|
// 下边距
|
|
69
70
|
marginBottom: {
|
|
70
71
|
type: [String, Number],
|
|
71
|
-
default:
|
|
72
|
+
default: defprops.loadmore.marginBottom
|
|
72
73
|
},
|
|
73
74
|
// 高度,单位px
|
|
74
75
|
height: {
|
|
75
76
|
type: [String, Number],
|
|
76
|
-
default:
|
|
77
|
+
default: defprops.loadmore.height
|
|
77
78
|
},
|
|
78
79
|
// 是否显示左边分割线
|
|
79
80
|
line: {
|
|
80
81
|
type: Boolean,
|
|
81
|
-
default:
|
|
82
|
+
default: defprops.loadmore.line
|
|
82
83
|
},
|
|
83
84
|
// 线条颜色
|
|
84
85
|
lineColor: {
|
|
85
86
|
type: String,
|
|
86
|
-
default:
|
|
87
|
+
default: defprops.loadmore.lineColor
|
|
87
88
|
},
|
|
88
89
|
// 是否虚线,true-虚线,false-实线
|
|
89
90
|
dashed: {
|
|
90
91
|
type: Boolean,
|
|
91
|
-
default:
|
|
92
|
+
default: defprops.loadmore.dashed
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
95
|
}
|
|
@@ -53,6 +53,8 @@
|
|
|
53
53
|
|
|
54
54
|
<script>
|
|
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
|
/**
|
|
58
60
|
* loadmore 加载更多
|
|
@@ -81,7 +83,7 @@
|
|
|
81
83
|
*/
|
|
82
84
|
export default {
|
|
83
85
|
name: "u-loadmore",
|
|
84
|
-
mixins: [
|
|
86
|
+
mixins: [mpMixin, mixin, props],
|
|
85
87
|
data() {
|
|
86
88
|
return {
|
|
87
89
|
// 粗点
|
|
@@ -1,84 +1,85 @@
|
|
|
1
|
+
import defprops from '../../libs/config/props';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 是否展示modal
|
|
4
5
|
show: {
|
|
5
6
|
type: Boolean,
|
|
6
|
-
default:
|
|
7
|
+
default: defprops.modal.show
|
|
7
8
|
},
|
|
8
9
|
// 标题
|
|
9
10
|
title: {
|
|
10
11
|
type: [String],
|
|
11
|
-
default:
|
|
12
|
+
default: defprops.modal.title
|
|
12
13
|
},
|
|
13
14
|
// 弹窗内容
|
|
14
15
|
content: {
|
|
15
16
|
type: String,
|
|
16
|
-
default:
|
|
17
|
+
default: defprops.modal.content
|
|
17
18
|
},
|
|
18
19
|
// 确认文案
|
|
19
20
|
confirmText: {
|
|
20
21
|
type: String,
|
|
21
|
-
default:
|
|
22
|
+
default: defprops.modal.confirmText
|
|
22
23
|
},
|
|
23
24
|
// 取消文案
|
|
24
25
|
cancelText: {
|
|
25
26
|
type: String,
|
|
26
|
-
default:
|
|
27
|
+
default: defprops.modal.cancelText
|
|
27
28
|
},
|
|
28
29
|
// 是否显示确认按钮
|
|
29
30
|
showConfirmButton: {
|
|
30
31
|
type: Boolean,
|
|
31
|
-
default:
|
|
32
|
+
default: defprops.modal.showConfirmButton
|
|
32
33
|
},
|
|
33
34
|
// 是否显示取消按钮
|
|
34
35
|
showCancelButton: {
|
|
35
36
|
type: Boolean,
|
|
36
|
-
default:
|
|
37
|
+
default: defprops.modal.showCancelButton
|
|
37
38
|
},
|
|
38
39
|
// 确认按钮颜色
|
|
39
40
|
confirmColor: {
|
|
40
41
|
type: String,
|
|
41
|
-
default:
|
|
42
|
+
default: defprops.modal.confirmColor
|
|
42
43
|
},
|
|
43
44
|
// 取消文字颜色
|
|
44
45
|
cancelColor: {
|
|
45
46
|
type: String,
|
|
46
|
-
default:
|
|
47
|
+
default: defprops.modal.cancelColor
|
|
47
48
|
},
|
|
48
49
|
// 对调确认和取消的位置
|
|
49
50
|
buttonReverse: {
|
|
50
51
|
type: Boolean,
|
|
51
|
-
default:
|
|
52
|
+
default: defprops.modal.buttonReverse
|
|
52
53
|
},
|
|
53
54
|
// 是否开启缩放效果
|
|
54
55
|
zoom: {
|
|
55
56
|
type: Boolean,
|
|
56
|
-
default:
|
|
57
|
+
default: defprops.modal.zoom
|
|
57
58
|
},
|
|
58
59
|
// 是否异步关闭,只对确定按钮有效
|
|
59
60
|
asyncClose: {
|
|
60
61
|
type: Boolean,
|
|
61
|
-
default:
|
|
62
|
+
default: defprops.modal.asyncClose
|
|
62
63
|
},
|
|
63
64
|
// 是否允许点击遮罩关闭modal
|
|
64
65
|
closeOnClickOverlay: {
|
|
65
66
|
type: Boolean,
|
|
66
|
-
default:
|
|
67
|
+
default: defprops.modal.closeOnClickOverlay
|
|
67
68
|
},
|
|
68
69
|
// 给一个负的margin-top,往上偏移,避免和键盘重合的情况
|
|
69
70
|
negativeTop: {
|
|
70
71
|
type: [String, Number],
|
|
71
|
-
default:
|
|
72
|
+
default: defprops.modal.negativeTop
|
|
72
73
|
},
|
|
73
74
|
// modal宽度,不支持百分比,可以数值,px,rpx单位
|
|
74
75
|
width: {
|
|
75
76
|
type: [String, Number],
|
|
76
|
-
default:
|
|
77
|
+
default: defprops.modal.width
|
|
77
78
|
},
|
|
78
79
|
// 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
|
|
79
80
|
confirmButtonShape: {
|
|
80
81
|
type: String,
|
|
81
|
-
default:
|
|
82
|
+
default: defprops.modal.confirmButtonShape
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
}
|
|
@@ -90,7 +90,9 @@
|
|
|
90
90
|
</template>
|
|
91
91
|
|
|
92
92
|
<script>
|
|
93
|
-
import props from './props.js';
|
|
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
|
* Modal 模态框
|
|
96
98
|
* @description 弹出模态框,常用于消息提示、消息确认、在当前页面内完成特定的交互操作。
|
|
@@ -118,7 +120,7 @@
|
|
|
118
120
|
*/
|
|
119
121
|
export default {
|
|
120
122
|
name: 'u-modal',
|
|
121
|
-
mixins: [
|
|
123
|
+
mixins: [mpMixin, mixin, props],
|
|
122
124
|
data() {
|
|
123
125
|
return {
|
|
124
126
|
loading: false
|