uview-plus 3.1.50 → 3.1.52
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/README.md +10 -10
- package/changelog.md +18 -1
- package/components/u-action-sheet/props.js +10 -11
- package/components/u-album/props.js +11 -12
- package/components/u-alert/props.js +8 -9
- package/components/u-avatar/props.js +14 -15
- package/components/u-avatar-group/props.js +9 -10
- package/components/u-back-top/props.js +10 -11
- package/components/u-back-top/u-back-top.vue +1 -1
- package/components/u-badge/props.js +14 -15
- package/components/u-badge/u-badge.vue +1 -1
- package/components/u-button/props.js +28 -29
- package/components/u-button/u-button.vue +6 -6
- package/components/u-button/vue.scss +8 -7
- package/components/u-calendar/month.vue +1 -1
- package/components/u-calendar/props.js +27 -28
- package/components/u-car-keyboard/props.js +0 -1
- package/components/u-car-keyboard/u-car-keyboard.vue +1 -1
- package/components/u-cell/props.js +17 -18
- package/components/u-cell/u-cell.vue +14 -4
- package/components/u-cell-group/props.js +2 -3
- package/components/u-cell-group/u-cell-group.vue +1 -1
- package/components/u-checkbox/props.js +13 -14
- package/components/u-checkbox/u-checkbox.vue +1 -1
- package/components/u-checkbox-group/props.js +16 -17
- package/components/u-circle-progress/props.js +1 -2
- package/components/u-code/props.js +6 -7
- package/components/u-code/u-code.vue +5 -0
- package/components/u-code-input/props.js +16 -17
- package/components/u-col/props.js +5 -6
- package/components/u-collapse/props.js +3 -4
- package/components/u-collapse-item/props.js +11 -12
- package/components/u-column-notice/props.js +10 -11
- package/components/u-copy/u-copy.vue +70 -0
- package/components/u-count-down/props.js +4 -5
- package/components/u-count-down/u-count-down.vue +6 -1
- package/components/u-count-to/props.js +11 -12
- package/components/u-datetime-picker/props.js +37 -25
- package/components/u-datetime-picker/u-datetime-picker.vue +58 -3
- package/components/u-divider/props.js +8 -9
- package/components/u-dropdown/props.js +0 -1
- package/components/u-dropdown-item/props.js +0 -1
- package/components/u-empty/props.js +11 -12
- package/components/u-form/props.js +8 -9
- package/components/u-form/u-form.vue +1 -1
- package/components/u-form-item/props.js +13 -9
- package/components/u-form-item/u-form-item.vue +1 -0
- package/components/u-gap/props.js +4 -5
- package/components/u-gap/u-gap.vue +5 -4
- package/components/u-grid/props.js +3 -4
- package/components/u-grid-item/props.js +2 -3
- package/components/u-grid-item/u-grid-item.vue +5 -0
- package/components/u-icon/props.js +17 -18
- package/components/u-icon/u-icon.vue +9 -6
- package/components/u-image/props.js +16 -17
- package/components/u-image/u-image.vue +1 -1
- package/components/u-index-anchor/props.js +5 -6
- package/components/u-index-anchor/u-index-anchor.vue +1 -1
- package/components/u-index-item/props.js +0 -1
- package/components/u-index-item/u-index-item.vue +1 -1
- package/components/u-index-list/props.js +5 -6
- package/components/u-index-list/u-index-list.vue +3 -2
- package/components/u-input/props.js +35 -36
- package/components/u-input/u-input.vue +10 -4
- package/components/u-keyboard/props.js +16 -17
- package/components/u-line/props.js +6 -7
- package/components/u-line-progress/props.js +5 -6
- package/components/u-link/props.js +7 -8
- package/components/u-list/props.js +14 -15
- package/components/u-list-item/props.js +1 -2
- package/components/u-loading-icon/props.js +11 -12
- package/components/u-loading-page/props.js +9 -10
- package/components/u-loadmore/props.js +18 -19
- package/components/u-modal/props.js +16 -17
- package/components/u-navbar/props.js +16 -17
- package/components/u-no-network/props.js +3 -4
- package/components/u-notice-bar/props.js +13 -14
- package/components/u-notify/props.js +9 -10
- package/components/u-notify/u-notify.vue +5 -0
- package/components/u-number-box/props.js +22 -23
- package/components/u-number-box/u-number-box.vue +21 -1
- package/components/u-number-keyboard/props.js +3 -4
- package/components/u-overlay/props.js +4 -5
- package/components/u-parse/props.js +8 -9
- package/components/u-parse/u-parse.vue +6 -1
- package/components/u-picker/props.js +16 -17
- package/components/u-picker-column/props.js +0 -1
- package/components/u-popup/props.js +15 -16
- package/components/u-qrcode/qrcode.js +1206 -0
- package/components/u-qrcode/u-qrcode.vue +199 -0
- package/components/u-radio/props.js +13 -14
- package/components/u-radio-group/props.js +17 -18
- package/components/u-rate/props.js +14 -15
- package/components/u-read-more/props.js +8 -9
- package/components/u-row/props.js +3 -4
- package/components/u-row-notice/props.js +7 -8
- package/components/u-row-notice/u-row-notice.vue +5 -0
- package/components/u-safe-bottom/props.js +0 -1
- package/components/u-scroll-list/props.js +6 -7
- package/components/u-search/props.js +24 -25
- package/components/u-skeleton/props.js +11 -12
- package/components/u-slider/props.js +11 -12
- package/components/u-status-bar/props.js +1 -2
- package/components/u-status-bar/u-status-bar.vue +1 -1
- package/components/u-steps/props.js +7 -8
- package/components/u-steps/u-steps.vue +1 -1
- package/components/u-steps-item/props.js +4 -5
- package/components/u-steps-item/u-steps-item.vue +1 -1
- package/components/u-sticky/props.js +6 -7
- package/components/u-sticky/u-sticky.vue +5 -0
- package/components/u-subsection/props.js +9 -10
- package/components/u-subsection/u-subsection.vue +2 -2
- package/components/u-swipe-action/props.js +1 -2
- package/components/u-swipe-action-item/nvue.js +5 -0
- package/components/u-swipe-action-item/props.js +6 -7
- package/components/u-swiper/props.js +24 -25
- package/components/u-swiper-indicator/props.js +5 -6
- package/components/u-switch/props.js +11 -12
- package/components/u-tabbar/props.js +8 -9
- package/components/u-tabbar-item/props.js +6 -7
- package/components/u-table/props.js +0 -1
- package/components/u-tabs/props.js +12 -13
- package/components/u-tabs-item/props.js +0 -1
- package/components/u-tag/props.js +15 -16
- package/components/u-td/props.js +0 -1
- package/components/u-text/props.js +21 -22
- package/components/u-textarea/props.js +23 -24
- package/components/u-toast/u-toast.vue +5 -0
- package/components/u-toolbar/props.js +6 -7
- package/components/u-tooltip/props.js +11 -12
- package/components/u-tooltip/u-tooltip.vue +0 -28
- package/components/u-tr/props.js +0 -1
- package/components/u-transition/props.js +4 -5
- package/components/u-transition/transition.js +8 -9
- package/components/u-transition/u-transition.vue +1 -1
- package/components/u-upload/props.js +22 -23
- package/components/u-upload/u-upload.vue +1 -1
- package/index.js +6 -6
- package/libs/config/props/actionSheet.js +1 -1
- package/libs/config/props/album.js +1 -1
- package/libs/config/props/avatarGroup.js +1 -1
- package/libs/config/props/backtop.js +2 -2
- package/libs/config/props/badge.js +1 -1
- package/libs/config/props/calendar.js +3 -3
- package/libs/config/props/checkboxGroup.js +1 -1
- package/libs/config/props/datetimePicker.js +1 -1
- package/libs/config/props/form.js +3 -3
- package/libs/config/props/formItem.js +1 -0
- package/libs/config/props/indexList.js +1 -1
- package/libs/config/props/noticeBar.js +1 -1
- package/libs/config/props/picker.js +2 -2
- package/libs/config/props/popup.js +1 -1
- package/libs/config/props/search.js +2 -2
- package/libs/config/props/slider.js +1 -1
- package/libs/config/props/swiper.js +1 -1
- package/libs/config/props/tabs.js +7 -7
- package/libs/config/props/text.js +2 -2
- package/libs/config/props/toast.js +1 -1
- package/libs/config/props/tooltip.js +1 -1
- package/libs/config/props/upload.js +3 -3
- package/libs/css/components.scss +11 -1
- package/libs/css/flex.scss +103 -101
- package/libs/function/colorGradient.js +8 -8
- package/libs/function/debounce.js +2 -2
- package/libs/function/digit.js +5 -5
- package/libs/function/index.js +29 -29
- package/libs/function/test.js +28 -28
- package/libs/function/throttle.js +2 -2
- package/package.json +4 -3
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// input的label提示语
|
|
5
4
|
label: {
|
|
6
5
|
type: String,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.formItem.label
|
|
8
7
|
},
|
|
9
8
|
// 绑定的值
|
|
10
9
|
prop: {
|
|
11
10
|
type: String,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.formItem.prop
|
|
12
|
+
},
|
|
13
|
+
// 绑定的规则
|
|
14
|
+
prop: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: () => uni.$u.props.formItem.rule
|
|
13
17
|
},
|
|
14
18
|
// 是否显示表单域的下划线边框
|
|
15
19
|
borderBottom: {
|
|
16
20
|
type: [String, Boolean],
|
|
17
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.formItem.borderBottom
|
|
18
22
|
},
|
|
19
23
|
// label的宽度,单位px
|
|
20
24
|
labelWidth: {
|
|
21
25
|
type: [String, Number],
|
|
22
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.formItem.labelWidth
|
|
23
27
|
},
|
|
24
28
|
// 右侧图标
|
|
25
29
|
rightIcon: {
|
|
26
30
|
type: String,
|
|
27
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.formItem.rightIcon
|
|
28
32
|
},
|
|
29
33
|
// 左侧图标
|
|
30
34
|
leftIcon: {
|
|
31
35
|
type: String,
|
|
32
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.formItem.leftIcon
|
|
33
37
|
},
|
|
34
38
|
// 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
|
|
35
39
|
required: {
|
|
36
40
|
type: Boolean,
|
|
37
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.formItem.required
|
|
38
42
|
},
|
|
39
43
|
leftIconStyle: {
|
|
40
44
|
type: [String, Object],
|
|
41
|
-
default:
|
|
45
|
+
default: () => uni.$u.props.formItem.leftIconStyle,
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
}
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
* @tutorial https://ijry.github.io/uview-plus/components/form.html
|
|
85
85
|
* @property {String} label input的label提示语
|
|
86
86
|
* @property {String} prop 绑定的值
|
|
87
|
+
* @property {String} rule 绑定的规则
|
|
87
88
|
* @property {String | Boolean} borderBottom 是否显示表单域的下划线边框
|
|
88
89
|
* @property {String | Number} labelWidth label的宽度,单位px
|
|
89
90
|
* @property {String} rightIcon 右侧图标
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 背景颜色(默认transparent)
|
|
5
4
|
bgColor: {
|
|
6
5
|
type: String,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.gap.bgColor
|
|
8
7
|
},
|
|
9
8
|
// 分割槽高度,单位px(默认30)
|
|
10
9
|
height: {
|
|
11
10
|
type: [String, Number],
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.gap.height
|
|
13
12
|
},
|
|
14
13
|
// 与上一个组件的距离
|
|
15
14
|
marginTop: {
|
|
16
15
|
type: [String, Number],
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.gap.marginTop
|
|
18
17
|
},
|
|
19
18
|
// 与下一个组件的距离
|
|
20
19
|
marginBottom: {
|
|
21
20
|
type: [String, Number],
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.gap.marginBottom
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import props from './props.js';
|
|
7
7
|
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
8
8
|
import mixin from '../../libs/mixin/mixin.js';
|
|
9
|
+
import { addStyle, addUnit, deepMerge } from '../../libs/function/index.js';
|
|
9
10
|
/**
|
|
10
11
|
* gap 间隔槽
|
|
11
12
|
* @description 该组件一般用于内容块之间的用一个灰色块隔开的场景,方便用户风格统一,减少工作量
|
|
@@ -25,11 +26,11 @@
|
|
|
25
26
|
gapStyle() {
|
|
26
27
|
const style = {
|
|
27
28
|
backgroundColor: this.bgColor,
|
|
28
|
-
height:
|
|
29
|
-
marginTop:
|
|
30
|
-
marginBottom:
|
|
29
|
+
height: addUnit(this.height),
|
|
30
|
+
marginTop: addUnit(this.marginTop),
|
|
31
|
+
marginBottom: addUnit(this.marginBottom),
|
|
31
32
|
}
|
|
32
|
-
return
|
|
33
|
+
return deepMerge(style, addStyle(this.customStyle))
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
36
|
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 分成几列
|
|
5
4
|
col: {
|
|
6
5
|
type: [String, Number],
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.grid.col
|
|
8
7
|
},
|
|
9
8
|
// 是否显示边框
|
|
10
9
|
border: {
|
|
11
10
|
type: Boolean,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.grid.border
|
|
13
12
|
},
|
|
14
13
|
// 宫格对齐方式,表现为数量少的时候,靠左,居中,还是靠右
|
|
15
14
|
align: {
|
|
16
15
|
type: String,
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.grid.align
|
|
18
17
|
}
|
|
19
18
|
}
|
|
20
19
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 宫格的name
|
|
5
4
|
name: {
|
|
6
5
|
type: [String, Number, null],
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.gridItem.name
|
|
8
7
|
},
|
|
9
8
|
// 背景颜色
|
|
10
9
|
bgColor: {
|
|
11
10
|
type: String,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.gridItem.bgColor
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
14
|
}
|
|
@@ -1,90 +1,89 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 图标类名
|
|
5
4
|
name: {
|
|
6
5
|
type: String,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.icon.name
|
|
8
7
|
},
|
|
9
8
|
// 图标颜色,可接受主题色
|
|
10
9
|
color: {
|
|
11
10
|
type: String,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.icon.color
|
|
13
12
|
},
|
|
14
13
|
// 字体大小,单位px
|
|
15
14
|
size: {
|
|
16
15
|
type: [String, Number],
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.icon.size
|
|
18
17
|
},
|
|
19
18
|
// 是否显示粗体
|
|
20
19
|
bold: {
|
|
21
20
|
type: Boolean,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.icon.bold
|
|
23
22
|
},
|
|
24
23
|
// 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
|
|
25
24
|
index: {
|
|
26
25
|
type: [String, Number],
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.icon.index
|
|
28
27
|
},
|
|
29
28
|
// 触摸图标时的类名
|
|
30
29
|
hoverClass: {
|
|
31
30
|
type: String,
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.icon.hoverClass
|
|
33
32
|
},
|
|
34
33
|
// 自定义扩展前缀,方便用户扩展自己的图标库
|
|
35
34
|
customPrefix: {
|
|
36
35
|
type: String,
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.icon.customPrefix
|
|
38
37
|
},
|
|
39
38
|
// 图标右边或者下面的文字
|
|
40
39
|
label: {
|
|
41
40
|
type: [String, Number],
|
|
42
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.icon.label
|
|
43
42
|
},
|
|
44
43
|
// label的位置,只能右边或者下边
|
|
45
44
|
labelPos: {
|
|
46
45
|
type: String,
|
|
47
|
-
default:
|
|
46
|
+
default: () => uni.$u.props.icon.labelPos
|
|
48
47
|
},
|
|
49
48
|
// label的大小
|
|
50
49
|
labelSize: {
|
|
51
50
|
type: [String, Number],
|
|
52
|
-
default:
|
|
51
|
+
default: () => uni.$u.props.icon.labelSize
|
|
53
52
|
},
|
|
54
53
|
// label的颜色
|
|
55
54
|
labelColor: {
|
|
56
55
|
type: String,
|
|
57
|
-
default:
|
|
56
|
+
default: () => uni.$u.props.icon.labelColor
|
|
58
57
|
},
|
|
59
58
|
// label与图标的距离
|
|
60
59
|
space: {
|
|
61
60
|
type: [String, Number],
|
|
62
|
-
default:
|
|
61
|
+
default: () => uni.$u.props.icon.space
|
|
63
62
|
},
|
|
64
63
|
// 图片的mode
|
|
65
64
|
imgMode: {
|
|
66
65
|
type: String,
|
|
67
|
-
default:
|
|
66
|
+
default: () => uni.$u.props.icon.imgMode
|
|
68
67
|
},
|
|
69
68
|
// 用于显示图片小图标时,图片的宽度
|
|
70
69
|
width: {
|
|
71
70
|
type: [String, Number],
|
|
72
|
-
default:
|
|
71
|
+
default: () => uni.$u.props.icon.width
|
|
73
72
|
},
|
|
74
73
|
// 用于显示图片小图标时,图片的高度
|
|
75
74
|
height: {
|
|
76
75
|
type: [String, Number],
|
|
77
|
-
default:
|
|
76
|
+
default: () => uni.$u.props.icon.height
|
|
78
77
|
},
|
|
79
78
|
// 用于解决某些情况下,让图标垂直居中的用途
|
|
80
79
|
top: {
|
|
81
80
|
type: [String, Number],
|
|
82
|
-
default:
|
|
81
|
+
default: () => uni.$u.props.icon.top
|
|
83
82
|
},
|
|
84
83
|
// 是否阻止事件传播
|
|
85
84
|
stop: {
|
|
86
85
|
type: Boolean,
|
|
87
|
-
default:
|
|
86
|
+
default: () => uni.$u.props.icon.stop
|
|
88
87
|
}
|
|
89
88
|
}
|
|
90
89
|
}
|
|
@@ -92,12 +92,13 @@
|
|
|
92
92
|
uClasses() {
|
|
93
93
|
let classes = []
|
|
94
94
|
classes.push(this.customPrefix + '-' + this.name)
|
|
95
|
-
//
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
// uView的自定义图标类名为u-iconfont
|
|
96
|
+
if (this.customPrefix == 'uicon') {
|
|
97
|
+
classes.push('u-iconfont')
|
|
98
|
+
} else {
|
|
99
|
+
// 不能缺少这一步,否则自定义图标会无效
|
|
100
|
+
classes.push(this.customPrefix)
|
|
101
|
+
}
|
|
101
102
|
// 主题色,通过类配置
|
|
102
103
|
if (this.color && uni.$u.config.type.includes(this.color)) classes.push('u-icon__icon--' + this.color)
|
|
103
104
|
// 阿里,头条,百度小程序通过数组绑定类名时,无法直接使用[a, b, c]的形式,否则无法识别
|
|
@@ -134,6 +135,8 @@
|
|
|
134
135
|
},
|
|
135
136
|
// 通过图标名,查找对应的图标
|
|
136
137
|
icon() {
|
|
138
|
+
// 使用自定义图标的时候页面上会把name属性也展示出来,所以在这里处理一下
|
|
139
|
+
if (this.customPrefix !== "uicon") return "";
|
|
137
140
|
// 如果内置的图标中找不到对应的图标,就直接返回name值,因为用户可能传入的是unicode代码
|
|
138
141
|
return icons['uicon-' + this.name] || this.name
|
|
139
142
|
}
|
|
@@ -1,85 +1,84 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 图片地址
|
|
5
4
|
src: {
|
|
6
5
|
type: String,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.image.src
|
|
8
7
|
},
|
|
9
8
|
// 裁剪模式
|
|
10
9
|
mode: {
|
|
11
10
|
type: String,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.image.mode
|
|
13
12
|
},
|
|
14
13
|
// 宽度,单位任意
|
|
15
14
|
width: {
|
|
16
15
|
type: [String, Number],
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.image.width
|
|
18
17
|
},
|
|
19
18
|
// 高度,单位任意
|
|
20
19
|
height: {
|
|
21
20
|
type: [String, Number],
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.image.height
|
|
23
22
|
},
|
|
24
23
|
// 图片形状,circle-圆形,square-方形
|
|
25
24
|
shape: {
|
|
26
25
|
type: String,
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.image.shape
|
|
28
27
|
},
|
|
29
28
|
// 圆角,单位任意
|
|
30
29
|
radius: {
|
|
31
30
|
type: [String, Number],
|
|
32
|
-
default:
|
|
31
|
+
default: () => uni.$u.props.image.radius
|
|
33
32
|
},
|
|
34
33
|
// 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
|
|
35
34
|
lazyLoad: {
|
|
36
35
|
type: Boolean,
|
|
37
|
-
default:
|
|
36
|
+
default: () => uni.$u.props.image.lazyLoad
|
|
38
37
|
},
|
|
39
38
|
// 开启长按图片显示识别微信小程序码菜单
|
|
40
39
|
showMenuByLongpress: {
|
|
41
40
|
type: Boolean,
|
|
42
|
-
default:
|
|
41
|
+
default: () => uni.$u.props.image.showMenuByLongpress
|
|
43
42
|
},
|
|
44
43
|
// 加载中的图标,或者小图片
|
|
45
44
|
loadingIcon: {
|
|
46
45
|
type: String,
|
|
47
|
-
default:
|
|
46
|
+
default: () => uni.$u.props.image.loadingIcon
|
|
48
47
|
},
|
|
49
48
|
// 加载失败的图标,或者小图片
|
|
50
49
|
errorIcon: {
|
|
51
50
|
type: String,
|
|
52
|
-
default:
|
|
51
|
+
default: () => uni.$u.props.image.errorIcon
|
|
53
52
|
},
|
|
54
53
|
// 是否显示加载中的图标或者自定义的slot
|
|
55
54
|
showLoading: {
|
|
56
55
|
type: Boolean,
|
|
57
|
-
default:
|
|
56
|
+
default: () => uni.$u.props.image.showLoading
|
|
58
57
|
},
|
|
59
58
|
// 是否显示加载错误的图标或者自定义的slot
|
|
60
59
|
showError: {
|
|
61
60
|
type: Boolean,
|
|
62
|
-
default:
|
|
61
|
+
default: () => uni.$u.props.image.showError
|
|
63
62
|
},
|
|
64
63
|
// 是否需要淡入效果
|
|
65
64
|
fade: {
|
|
66
65
|
type: Boolean,
|
|
67
|
-
default:
|
|
66
|
+
default: () => uni.$u.props.image.fade
|
|
68
67
|
},
|
|
69
68
|
// 只支持网络资源,只对微信小程序有效
|
|
70
69
|
webp: {
|
|
71
70
|
type: Boolean,
|
|
72
|
-
default:
|
|
71
|
+
default: () => uni.$u.props.image.webp
|
|
73
72
|
},
|
|
74
73
|
// 过渡时间,单位ms
|
|
75
74
|
duration: {
|
|
76
75
|
type: [String, Number],
|
|
77
|
-
default:
|
|
76
|
+
default: () => uni.$u.props.image.duration
|
|
78
77
|
},
|
|
79
78
|
// 背景颜色,用于深色页面加载图片时,为了和背景色融合
|
|
80
79
|
bgColor: {
|
|
81
80
|
type: String,
|
|
82
|
-
default:
|
|
81
|
+
default: () => uni.$u.props.image.bgColor
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
}
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
/**
|
|
71
71
|
* Image 图片
|
|
72
72
|
* @description 此组件为uni-app的image组件的加强版,在继承了原有功能外,还支持淡入动画、加载中、加载失败提示、圆角值和形状等。
|
|
73
|
-
* @tutorial https://
|
|
73
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/image.html
|
|
74
74
|
* @property {String} src 图片地址
|
|
75
75
|
* @property {String} mode 裁剪模式,见官网说明 (默认 'aspectFill' )
|
|
76
76
|
* @property {String | Number} width 宽度,单位任意,如果为数值,则为px单位 (默认 '300' )
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 列表锚点文本内容
|
|
5
4
|
text: {
|
|
6
5
|
type: [String, Number],
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.indexAnchor.text
|
|
8
7
|
},
|
|
9
8
|
// 列表锚点文字颜色
|
|
10
9
|
color: {
|
|
11
10
|
type: String,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.indexAnchor.color
|
|
13
12
|
},
|
|
14
13
|
// 列表锚点文字大小,单位默认px
|
|
15
14
|
size: {
|
|
16
15
|
type: [String, Number],
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.indexAnchor.size
|
|
18
17
|
},
|
|
19
18
|
// 列表锚点背景颜色
|
|
20
19
|
bgColor: {
|
|
21
20
|
type: String,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.indexAnchor.bgColor
|
|
23
22
|
},
|
|
24
23
|
// 列表锚点高度,单位默认px
|
|
25
24
|
height: {
|
|
26
25
|
type: [String, Number],
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.indexAnchor.height
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
29
|
}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
/**
|
|
34
34
|
* IndexAnchor 列表锚点
|
|
35
35
|
* @description
|
|
36
|
-
* @tutorial https://
|
|
36
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/indexList.html
|
|
37
37
|
* @property {String | Number} text 列表锚点文本内容
|
|
38
38
|
* @property {String} color 列表锚点文字颜色 ( 默认 '#606266' )
|
|
39
39
|
* @property {String | Number} size 列表锚点文字大小,单位默认px ( 默认 14 )
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import defprops from '../../libs/config/props';
|
|
2
1
|
export default {
|
|
3
2
|
props: {
|
|
4
3
|
// 右边锚点非激活的颜色
|
|
5
4
|
inactiveColor: {
|
|
6
5
|
type: String,
|
|
7
|
-
default:
|
|
6
|
+
default: () => uni.$u.props.indexList.inactiveColor
|
|
8
7
|
},
|
|
9
8
|
// 右边锚点激活的颜色
|
|
10
9
|
activeColor: {
|
|
11
10
|
type: String,
|
|
12
|
-
default:
|
|
11
|
+
default: () => uni.$u.props.indexList.activeColor
|
|
13
12
|
},
|
|
14
13
|
// 索引字符列表,数组形式
|
|
15
14
|
indexList: {
|
|
16
15
|
type: Array,
|
|
17
|
-
default:
|
|
16
|
+
default: () => uni.$u.props.indexList.indexList
|
|
18
17
|
},
|
|
19
18
|
// 是否开启锚点自动吸顶
|
|
20
19
|
sticky: {
|
|
21
20
|
type: Boolean,
|
|
22
|
-
default:
|
|
21
|
+
default: () => uni.$u.props.indexList.sticky
|
|
23
22
|
},
|
|
24
23
|
// 自定义导航栏的高度
|
|
25
24
|
customNavHeight: {
|
|
26
25
|
type: [String, Number],
|
|
27
|
-
default:
|
|
26
|
+
default: () => uni.$u.props.indexList.customNavHeight
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
29
|
}
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
/**
|
|
111
111
|
* IndexList 索引列表
|
|
112
112
|
* @description 通过折叠面板收纳内容区域
|
|
113
|
-
* @tutorial https://
|
|
113
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/indexList.html
|
|
114
114
|
* @property {String} inactiveColor 右边锚点非激活的颜色 ( 默认 '#606266' )
|
|
115
115
|
* @property {String} activeColor 右边锚点激活的颜色 ( 默认 '#5677fc' )
|
|
116
116
|
* @property {Array} indexList 索引字符列表,数组形式
|
|
@@ -310,7 +310,8 @@
|
|
|
310
310
|
// #endif
|
|
311
311
|
// #ifdef MP-WEIXIN
|
|
312
312
|
// 微信小程序下,scroll-view的scroll-into-view属性无法对slot中的内容的id生效,只能通过设置scrollTop的形式去移动滚动条
|
|
313
|
-
|
|
313
|
+
const customNavHeight = this.customNavHeight
|
|
314
|
+
this.scrollTop = this.children[currentIndex].top - uni.$u.getPx(customNavHeight)
|
|
314
315
|
// #endif
|
|
315
316
|
// #ifdef APP-NVUE
|
|
316
317
|
// 在nvue中,由于cell和header为同级元素,所以实际是需要对header(anchor)进行偏移
|