fusions-ui 1.2.3 → 1.2.6
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/components/fu-avatar/fu-avatar.vue +4 -2
- package/components/fu-avatar/props.js +52 -15
- package/components/fu-avatar-group/fu-avatar-group.vue +3 -2
- package/components/fu-avatar-group/props.js +31 -9
- package/components/fu-badge/fu-badge.vue +8 -14
- package/components/fu-badge/props.js +56 -16
- package/components/fu-banner-arc/fu-banner-arc.vue +4 -5
- package/components/fu-banner-arc/props.js +15 -4
- package/components/fu-button/fu-button.vue +18 -19
- package/components/fu-button/props.js +108 -35
- package/components/fu-cell/fu-cell.vue +9 -8
- package/components/fu-cell-group/fu-cell-group.vue +2 -1
- package/components/fu-cell-group/props.js +7 -2
- package/components/fu-checkbox/fu-checkbox.vue +5 -4
- package/components/fu-checkbox/props.js +51 -14
- package/components/fu-code-input/fu-code-input.vue +10 -6
- package/components/fu-code-input/props.js +66 -17
- package/components/fu-code-verify/fu-code-verify.vue +9 -5
- package/components/fu-code-verify/props.js +64 -17
- package/components/fu-collapse/fu-collapse.vue +10 -3
- package/components/fu-collapse/props.js +9 -3
- package/components/fu-collapse-item/fu-collapse-item.vue +45 -31
- package/components/fu-collapse-item/props.js +49 -16
- package/components/fu-countdown/fu-countdown.vue +2 -1
- package/components/fu-countdown/props.js +15 -4
- package/components/fu-datetime-picker/fu-datetime-picker.vue +6 -5
- package/components/fu-datetime-picker/props.js +91 -25
- package/components/fu-form/fu-form.vue +2 -1
- package/components/fu-form/props.js +34 -6
- package/components/fu-form-item/fu-form-item.vue +46 -56
- package/components/fu-form-item/props.js +34 -7
- package/components/fu-grid/fu-grid.vue +16 -17
- package/components/fu-grid/props.js +20 -5
- package/components/fu-grid-item/fu-grid-item.vue +31 -35
- package/components/fu-grid-item/props.js +11 -3
- package/components/fu-icon/fu-icon.vue +107 -0
- package/components/fu-icon/icon.css +584 -0
- package/components/{fu-icons/icons.js → fu-icon/icon.js} +1031 -1031
- package/components/{fu-icons/fuicons.ttf → fu-icon/icon.ttf} +0 -0
- package/components/fu-icon/props.js +55 -0
- package/components/fu-image/fu-image.vue +15 -10
- package/components/fu-image/props.js +69 -18
- package/components/fu-index-anchor/fu-index-anchor.vue +6 -5
- package/components/fu-index-anchor/props.js +20 -6
- package/components/fu-index-item/fu-index-item.vue +4 -4
- package/components/fu-index-list/fu-index-list.vue +9 -9
- package/components/fu-index-list/props.js +19 -6
- package/components/fu-input/fu-input.vue +54 -68
- package/components/fu-input/props.js +145 -53
- package/components/fu-keyboard/fu-keyboard.vue +19 -9
- package/components/fu-keyboard/keyboard-car.vue +33 -22
- package/components/fu-keyboard/keyboard-number.vue +17 -9
- package/components/fu-keyboard/props.js +66 -17
- package/components/fu-line/fu-line.vue +17 -13
- package/components/fu-line/props.js +30 -5
- package/components/fu-link/fu-link.vue +14 -8
- package/components/fu-link/props.js +22 -7
- package/components/fu-loading/fu-loading.vue +32 -27
- package/components/fu-loading/props.js +28 -8
- package/components/fu-loading-more/fu-loading-more.vue +19 -23
- package/components/fu-loading-more/props.js +27 -13
- package/components/fu-modal/fu-modal.vue +11 -6
- package/components/fu-modal/props.js +61 -17
- package/components/{fu-nav-bar/fu-nav-bar.vue → fu-navbar/fu-navbar.vue} +37 -44
- package/components/fu-notice-bar/fu-notice-bar.vue +10 -8
- package/components/fu-notice-bar/notice-column.vue +187 -122
- package/components/fu-notice-bar/notice-row.vue +85 -28
- package/components/fu-notice-bar/props.js +83 -22
- package/components/fu-number-box/fu-number-box.vue +26 -28
- package/components/fu-number-box/props.js +37 -11
- package/components/fu-parse/fu-parse.vue +0 -1
- package/components/fu-picker/fu-picker.vue +22 -17
- package/components/fu-picker/props.js +70 -19
- package/components/fu-popup/fu-popup.vue +39 -44
- package/components/fu-popup/props.js +34 -9
- package/components/fu-progress/fu-progress.vue +3 -2
- package/components/fu-progress/props.js +36 -9
- package/components/fu-rate/fu-rate.vue +40 -32
- package/components/fu-rate/props.js +47 -13
- package/components/fu-read-more/fu-read-more.vue +19 -14
- package/components/fu-read-more/props.js +68 -46
- package/components/fu-ribbon/fu-ribbon.vue +8 -7
- package/components/fu-ribbon/props.js +15 -4
- package/components/fu-scroll-list/fu-scroll-list.vue +18 -34
- package/components/fu-scroll-list/props.js +19 -10
- package/components/fu-search/fu-search.vue +13 -18
- package/components/fu-search/props.js +69 -17
- package/components/fu-section/fu-section.vue +19 -22
- package/components/fu-section/props.js +30 -4
- package/components/fu-sign-board/fu-sign-board.vue +18 -3
- package/components/fu-sign-board/props.js +15 -5
- package/components/fu-skeleton/fu-skeleton.vue +8 -12
- package/components/fu-skeleton/props.js +15 -4
- package/components/fu-steps/fu-steps.vue +3 -2
- package/components/fu-steps/props.js +23 -7
- package/components/fu-steps-item/fu-steps-item.vue +3 -3
- package/components/fu-steps-item/props.js +15 -5
- package/components/fu-sticky/fu-sticky.vue +3 -3
- package/components/fu-sticky/props.js +21 -7
- package/components/fu-subsection/fu-subsection.vue +29 -22
- package/components/fu-subsection/props.js +40 -10
- package/components/fu-swipe-action-item/bindingx.js +1 -1
- package/components/fu-swipe-action-item/fu-swipe-action-item.vue +134 -123
- package/components/fu-swipe-action-item/mpwxs.js +1 -1
- package/components/fu-swipe-action-item/props.js +22 -6
- package/components/fu-swiper/fu-swiper.vue +26 -24
- package/components/fu-swiper/props.js +80 -24
- package/components/fu-switch/fu-switch.vue +20 -12
- package/components/fu-switch/props.js +48 -13
- package/components/fu-tabs/fu-tabs.vue +36 -33
- package/components/fu-tabs/props.js +46 -13
- package/components/fu-tag/fu-tag.vue +24 -21
- package/components/fu-tag/props.js +63 -17
- package/components/fu-text/fu-text.vue +72 -33
- package/components/fu-text/props.js +85 -27
- package/components/fu-text/value.js +6 -6
- package/components/fu-textarea/fu-textarea.vue +13 -17
- package/components/fu-textarea/props.js +103 -30
- package/components/fu-timeaxis/fu-timeaxis.vue +1 -1
- package/components/fu-timeaxis-item/fu-timeaxis-item.vue +8 -4
- package/components/fu-transition/fu-transition.vue +48 -49
- package/components/fu-transition/props.js +21 -0
- package/components/fu-upload/fu-upload.vue +3 -1
- package/components/fu-upload/props.js +67 -19
- package/components/fu-upload/upload-file.vue +31 -18
- package/components/fu-upload/upload-image.vue +37 -19
- package/components/fu-vtabs/fu-vtabs.vue +6 -4
- package/components/fu-vtabs/props.js +50 -15
- package/components/fu-waterfall/fu-waterfall.vue +11 -9
- package/components/fu-waterfall/props.js +37 -15
- package/index.js +17 -24
- package/index.scss +9 -7
- package/libs/config/config.js +16 -9
- package/libs/function/applyEven.js +9 -9
- package/libs/function/check.js +81 -89
- package/libs/function/{index.js → common.js} +5 -5
- package/libs/function/message.js +0 -27
- package/libs/mixin/mixin.js +26 -21
- package/libs/{utils/min.router.config.js → route/min.route.config.js} +7 -7
- package/libs/{utils/router.config.js → route/route.config.js} +10 -11
- package/libs/{css/main.scss → style/common.scss} +50 -87
- package/libs/style/style.h5.scss +8 -0
- package/libs/style/style.mp.scss +15 -0
- package/package.json +1 -1
- package/components/fu-calendar/calendar-item.vue +0 -214
- package/components/fu-calendar/calendar.js +0 -546
- package/components/fu-calendar/fu-calendar.vue +0 -536
- package/components/fu-calendar/i18n/en.json +0 -12
- package/components/fu-calendar/i18n/index.js +0 -8
- package/components/fu-calendar/i18n/zh-Hans.json +0 -12
- package/components/fu-calendar/i18n/zh-Hant.json +0 -12
- package/components/fu-calendar/util.js +0 -360
- package/components/fu-date-picker/calendar-item.vue +0 -177
- package/components/fu-date-picker/calendar.vue +0 -917
- package/components/fu-date-picker/fu-date-picker.vue +0 -1069
- package/components/fu-date-picker/i18n/en.json +0 -22
- package/components/fu-date-picker/i18n/index.js +0 -8
- package/components/fu-date-picker/i18n/zh-Hans.json +0 -22
- package/components/fu-date-picker/i18n/zh-Hant.json +0 -22
- package/components/fu-date-picker/props.js +0 -68
- package/components/fu-date-picker/time-picker.vue +0 -924
- package/components/fu-date-picker/util.js +0 -419
- package/components/fu-icons/fu-icons.vue +0 -102
- package/components/fu-icons/fuicons.css +0 -585
- package/components/fu-landscape/fu-landscape.vue +0 -167
- package/components/fu-landscape/props.js +0 -64
- package/components/fu-tabbar/fu-tabbar.vue +0 -333
- package/components/fu-tabbar/props.js +0 -78
- package/libs/css/style.h5.scss +0 -35
- package/libs/css/style.mp.scss +0 -50
- package/libs/utils/util.js +0 -58
- /package/components/{fu-nav-bar → fu-navbar}/props.js +0 -0
- /package/components/{fu-nav-bar → fu-navbar}/status-bar.vue +0 -0
- /package/{components/fu-datetime-picker → libs/function}/dayjs.js +0 -0
- /package/libs/{css → style}/color.scss +0 -0
- /package/libs/{css/component.scss → style/components.scss} +0 -0
|
Binary file
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
/**
|
|
4
|
+
* @description 图标名称
|
|
5
|
+
*/
|
|
6
|
+
name: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: ''
|
|
9
|
+
},
|
|
10
|
+
/**
|
|
11
|
+
* @description 图标颜色
|
|
12
|
+
* @default '#333333'
|
|
13
|
+
*/
|
|
14
|
+
color: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: '#333333'
|
|
17
|
+
},
|
|
18
|
+
/**
|
|
19
|
+
* @description 图标大小
|
|
20
|
+
* @default 16
|
|
21
|
+
*/
|
|
22
|
+
size: {
|
|
23
|
+
type: [Number, String],
|
|
24
|
+
default: 16
|
|
25
|
+
},
|
|
26
|
+
/**
|
|
27
|
+
* @description 自定义图标
|
|
28
|
+
*/
|
|
29
|
+
fontFamily: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ''
|
|
32
|
+
},
|
|
33
|
+
/**
|
|
34
|
+
* @description 图片模式,当name为图片地址时生效
|
|
35
|
+
*/
|
|
36
|
+
imgMode: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: 'aspectFill'
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* @description 显示图片小图标时,图片的宽度
|
|
42
|
+
*/
|
|
43
|
+
width: {
|
|
44
|
+
type: [String, Number],
|
|
45
|
+
default: () => ''
|
|
46
|
+
},
|
|
47
|
+
/**
|
|
48
|
+
* @description 显示图片小图标时,图片的高度
|
|
49
|
+
*/
|
|
50
|
+
height: {
|
|
51
|
+
type: [String, Number],
|
|
52
|
+
default: () => ''
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<fu-transition mode="fade" :show="show" :duration="fade? duration : 0" :
|
|
3
|
-
<view class="fu-image" :class="[`fu-image--${elId}`]" :style="[wrapStyle, backgroundStyle]" @tap="
|
|
2
|
+
<fu-transition mode="fade" :show="show" :duration="fade? duration : 0" :customStyle="wrapStyle" v-if="show">
|
|
3
|
+
<view class="fu-image" :class="[`fu-image--${elId}`]" :style="[wrapStyle, backgroundStyle]" @tap="handleClick">
|
|
4
4
|
<image
|
|
5
5
|
class="fu-image__image"
|
|
6
6
|
:src="src"
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
<view v-if="showLoading && loading" class="fu-image__loading"
|
|
16
16
|
:style="{borderRadius: shape == 'circle' ? '50%' : $fu.addUnit(this.radius), backgroundColor: this.bgColor}">
|
|
17
17
|
<slot name="loading">
|
|
18
|
-
<fu-
|
|
18
|
+
<fu-icon :name="loadingIcon" size="20" color="#999999"></fu-icon>
|
|
19
19
|
</slot>
|
|
20
20
|
</view>
|
|
21
21
|
<view v-if="showError && isError && !loading" class="fu-image__error"
|
|
22
22
|
:style="{borderRadius: shape == 'circle' ? '10000px' : $fu.addUnit(this.radius)}">
|
|
23
23
|
<slot name="error">
|
|
24
|
-
<fu-
|
|
24
|
+
<fu-icon :name="errorIcon" size="20" color="#999999"></fu-icon>
|
|
25
25
|
</slot>
|
|
26
26
|
</view>
|
|
27
27
|
<view class="fu-image__inner" :style="[wrapStyle]" v-if="dim"></view>
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
* @value top right 裁剪 不缩放图片,只显示图片的右上边区域
|
|
53
53
|
* @value bottom left 裁剪 不缩放图片,只显示图片的左下边区域
|
|
54
54
|
* @value bottom right 裁剪 不缩放图片,只显示图片的右下边区域
|
|
55
|
-
* @property {String,Number} width
|
|
56
|
-
* @property {String,Number} height
|
|
55
|
+
* @property {String,Number} width 设置宽度,单位任意,如果为数值,则为px单位 (默认 '100%' )
|
|
56
|
+
* @property {String,Number} height 设置高度,单位任意,如果为数值,则为px单位 (默认 'auto' )
|
|
57
57
|
* @property {String} shape = [circle|square] 图片形状,circle-圆形,square-方形 (默认 'square' )
|
|
58
58
|
* @property {String,Number} radius 圆角值,单位任意,如果为数值,则为px单位 (默认 0 )
|
|
59
59
|
* @property {Boolean} lazyLoad = [true|false] 是否懒加载,仅微信小程序、App、百度小程序、字节跳动小程序有效 (默认 true )
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
* @property {String} bgColor 背景颜色,用于深色页面加载图片时,为了和背景色融合
|
|
70
70
|
* @property {String,Number} dim 定义图片模糊 默认0
|
|
71
71
|
* @property {Object,String} customStyle 定义需要用到的外部样式
|
|
72
|
+
*
|
|
72
73
|
* @event {Function} click 点击图片时触发
|
|
73
74
|
* @event {Function} error 图片加载失败时触发
|
|
74
75
|
* @event {Function} load 图片加载成功时触发
|
|
@@ -76,11 +77,12 @@
|
|
|
76
77
|
*/
|
|
77
78
|
export default {
|
|
78
79
|
name: 'FuImage',
|
|
79
|
-
emits: ['click', 'load', 'error'],
|
|
80
80
|
mixins: [mpMixin, mixin, props],
|
|
81
|
+
emits: ['click', 'load', 'error'],
|
|
81
82
|
data() {
|
|
82
83
|
const elId = this.$fu.uuid()
|
|
83
84
|
return {
|
|
85
|
+
elId,
|
|
84
86
|
// 图片是否加载错误,如果是,则显示错误占位图
|
|
85
87
|
isError: false,
|
|
86
88
|
// 初始化组件时,默认为加载中状态
|
|
@@ -95,7 +97,6 @@
|
|
|
95
97
|
show: false,
|
|
96
98
|
// 是否开启图片出现在可视范围进行加载(另一种懒加载)
|
|
97
99
|
observeShow: !this.observeLazyLoad,
|
|
98
|
-
elId,
|
|
99
100
|
// 因为props的值无法修改,故需要一个中间值
|
|
100
101
|
imgWidth: this.width,
|
|
101
102
|
// 因为props的值无法修改,故需要一个中间值
|
|
@@ -139,16 +140,18 @@
|
|
|
139
140
|
})
|
|
140
141
|
},
|
|
141
142
|
methods: {
|
|
142
|
-
//
|
|
143
|
-
|
|
143
|
+
// 点击图片触发
|
|
144
|
+
handleClick(e) {
|
|
144
145
|
this.$emit('click', e)
|
|
145
146
|
},
|
|
147
|
+
|
|
146
148
|
// 图片加载失败
|
|
147
149
|
onErrorHandler(err) {
|
|
148
150
|
this.loading = false
|
|
149
151
|
this.isError = true
|
|
150
152
|
this.$emit('error', err)
|
|
151
153
|
},
|
|
154
|
+
|
|
152
155
|
// 图片加载完成,标记loading结束
|
|
153
156
|
onLoadHandler() {
|
|
154
157
|
this.loading = false
|
|
@@ -156,6 +159,7 @@
|
|
|
156
159
|
this.$emit('load')
|
|
157
160
|
this.removeBgColor()
|
|
158
161
|
},
|
|
162
|
+
|
|
159
163
|
// 移除图片的背景色
|
|
160
164
|
removeBgColor() {
|
|
161
165
|
// 淡入动画过渡完成后,将背景设置为透明色,否则png图片会看到灰色的背景
|
|
@@ -163,6 +167,7 @@
|
|
|
163
167
|
backgroundColor: 'transparent'
|
|
164
168
|
};
|
|
165
169
|
},
|
|
170
|
+
|
|
166
171
|
// 观察图片是否在可见视口
|
|
167
172
|
observerFn(){
|
|
168
173
|
// 在需要用到懒加载的页面,在触发底部的时候触发tOnLazyLoadReachBottom事件,保证所有图片进行加载
|
|
@@ -1,91 +1,142 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
props: {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @description 图片地址
|
|
5
|
+
*/
|
|
4
6
|
src: {
|
|
5
7
|
type: String,
|
|
6
8
|
default: ''
|
|
7
9
|
},
|
|
8
|
-
|
|
10
|
+
/**
|
|
11
|
+
* @description 裁剪模式
|
|
12
|
+
* @default 'aspectFill'
|
|
13
|
+
*/
|
|
9
14
|
mode: {
|
|
10
15
|
type: String,
|
|
11
16
|
default: 'aspectFill'
|
|
12
17
|
},
|
|
13
|
-
|
|
18
|
+
/**
|
|
19
|
+
* @description 设置宽度,单位任意
|
|
20
|
+
* @default '100%'
|
|
21
|
+
*/
|
|
14
22
|
width: {
|
|
15
23
|
type: [String,Number],
|
|
16
24
|
default: '100%'
|
|
17
25
|
},
|
|
18
|
-
|
|
26
|
+
/**
|
|
27
|
+
* @description 设置高度,单位任意
|
|
28
|
+
* @default 120
|
|
29
|
+
*/
|
|
19
30
|
height: {
|
|
20
31
|
type: [String,Number],
|
|
21
32
|
default: 150
|
|
22
33
|
},
|
|
23
|
-
|
|
34
|
+
/**
|
|
35
|
+
* @description 图片形状
|
|
36
|
+
* @values 'circle' - 圆形, 'square' - 方形
|
|
37
|
+
* @default 'square'
|
|
38
|
+
*/
|
|
24
39
|
shape: {
|
|
25
40
|
type: String,
|
|
26
41
|
default: 'square'
|
|
27
42
|
},
|
|
28
|
-
|
|
43
|
+
/**
|
|
44
|
+
* @description 设置圆角,单位任意
|
|
45
|
+
*/
|
|
29
46
|
radius: {
|
|
30
47
|
type: [String,Number],
|
|
31
48
|
default: 0
|
|
32
49
|
},
|
|
33
|
-
|
|
50
|
+
/**
|
|
51
|
+
* @description 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
|
|
52
|
+
* @default true
|
|
53
|
+
*/
|
|
34
54
|
lazyLoad: {
|
|
35
55
|
type: Boolean,
|
|
36
56
|
default: true
|
|
37
57
|
},
|
|
38
|
-
|
|
58
|
+
/**
|
|
59
|
+
* @description 是否开启 observer 懒加载,nvue不生效
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
39
62
|
observeLazyLoad: {
|
|
40
63
|
type: Boolean,
|
|
41
64
|
default: false
|
|
42
65
|
},
|
|
43
|
-
|
|
66
|
+
/**
|
|
67
|
+
* @description 开启长按图片显示识别微信小程序码菜单
|
|
68
|
+
* @default true
|
|
69
|
+
*/
|
|
44
70
|
showMenuByLongpress: {
|
|
45
71
|
type: Boolean,
|
|
46
72
|
default: true
|
|
47
73
|
},
|
|
48
|
-
|
|
74
|
+
/**
|
|
75
|
+
* @description 加载中的图标
|
|
76
|
+
* @default 'image'
|
|
77
|
+
*/
|
|
49
78
|
loadingIcon: {
|
|
50
79
|
type: String,
|
|
51
80
|
default: 'image'
|
|
52
81
|
},
|
|
53
|
-
|
|
82
|
+
/**
|
|
83
|
+
* @description 加载失败的图标
|
|
84
|
+
* @default 'error'
|
|
85
|
+
*/
|
|
54
86
|
errorIcon: {
|
|
55
87
|
type: String,
|
|
56
88
|
default: 'error'
|
|
57
89
|
},
|
|
58
|
-
|
|
90
|
+
/**
|
|
91
|
+
* @description 是否显示加载中的图标或者自定义的slot
|
|
92
|
+
* @default true
|
|
93
|
+
*/
|
|
59
94
|
showLoading: {
|
|
60
95
|
type: Boolean,
|
|
61
96
|
default: true
|
|
62
97
|
},
|
|
63
|
-
|
|
98
|
+
/**
|
|
99
|
+
* @description 是否显示加载错误的图标或者自定义的slot
|
|
100
|
+
* @default true
|
|
101
|
+
*/
|
|
64
102
|
showError: {
|
|
65
103
|
type: Boolean,
|
|
66
104
|
default: true
|
|
67
105
|
},
|
|
68
|
-
|
|
106
|
+
/**
|
|
107
|
+
* @description 是否需要淡入效果
|
|
108
|
+
* @default true
|
|
109
|
+
*/
|
|
69
110
|
fade: {
|
|
70
111
|
type: Boolean,
|
|
71
112
|
default: true
|
|
72
113
|
},
|
|
73
|
-
|
|
114
|
+
/**
|
|
115
|
+
* @description 只支持网络资源,只对微信小程序有效
|
|
116
|
+
* @default true
|
|
117
|
+
*/
|
|
74
118
|
webp: {
|
|
75
119
|
type: Boolean,
|
|
76
120
|
default: true
|
|
77
121
|
},
|
|
78
|
-
|
|
122
|
+
/**
|
|
123
|
+
* @description 过渡时间,单位ms
|
|
124
|
+
* @default 300
|
|
125
|
+
*/
|
|
79
126
|
duration: {
|
|
80
127
|
type: [String,Number],
|
|
81
128
|
default: 300
|
|
82
129
|
},
|
|
83
|
-
|
|
130
|
+
/**
|
|
131
|
+
* @description 背景颜色,用于深色页面加载图片时,为了和背景色融合
|
|
132
|
+
*/
|
|
84
133
|
bgColor: {
|
|
85
134
|
type: String,
|
|
86
135
|
default: ''
|
|
87
136
|
},
|
|
88
|
-
|
|
137
|
+
/**
|
|
138
|
+
* @description 图片模糊
|
|
139
|
+
*/
|
|
89
140
|
dim: {
|
|
90
141
|
type: [String,Number],
|
|
91
142
|
default: 0
|
|
@@ -27,10 +27,11 @@
|
|
|
27
27
|
* IndexAnchor 列表锚点
|
|
28
28
|
* @description 此组件需配合fu-index-list组件一起使用
|
|
29
29
|
* @property {String,Number} text 列表锚点文本内容
|
|
30
|
-
* @property {String} color 列表锚点文字颜色 (
|
|
31
|
-
* @property {String,Number} size
|
|
32
|
-
* @property {String} bgColor 列表锚点背景颜色 (
|
|
33
|
-
* @property {String,Number} height
|
|
30
|
+
* @property {String} color 列表锚点文字颜色 (默认 '#606266')
|
|
31
|
+
* @property {String,Number} size 列表锚点文字大小 (默认 14)
|
|
32
|
+
* @property {String} bgColor 列表锚点背景颜色 (默认 '#f6f6f6')
|
|
33
|
+
* @property {String,Number} height 列表锚点高度 (默认 32)
|
|
34
|
+
*
|
|
34
35
|
* @example <fu-index-anchor :text="indexList[index]"></fu-index-anchor>
|
|
35
36
|
*/
|
|
36
37
|
export default {
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
</script>
|
|
72
73
|
|
|
73
74
|
<style lang="scss" scoped>
|
|
74
|
-
@import '../../libs/
|
|
75
|
+
@import '../../libs/style/components.scss';
|
|
75
76
|
|
|
76
77
|
.fu-index-anchor {
|
|
77
78
|
@include flex;
|
|
@@ -1,26 +1,40 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
props: {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @description 列表锚点文本内容
|
|
5
|
+
*/
|
|
4
6
|
text: {
|
|
5
7
|
type: [String, Number],
|
|
6
8
|
default: ''
|
|
7
9
|
},
|
|
8
|
-
|
|
10
|
+
/**
|
|
11
|
+
* @description 列表锚点文字颜色
|
|
12
|
+
* @default '#606266'
|
|
13
|
+
*/
|
|
9
14
|
color: {
|
|
10
15
|
type: String,
|
|
11
|
-
default: '#
|
|
16
|
+
default: '#606266'
|
|
12
17
|
},
|
|
13
|
-
|
|
18
|
+
/**
|
|
19
|
+
* @description 列表锚点文字大小
|
|
20
|
+
* @default 14
|
|
21
|
+
*/
|
|
14
22
|
size: {
|
|
15
23
|
type: [String, Number],
|
|
16
24
|
default: 14
|
|
17
25
|
},
|
|
18
|
-
|
|
26
|
+
/**
|
|
27
|
+
* @description 列表锚点背景颜色
|
|
28
|
+
* @default '#f6f6f6'
|
|
29
|
+
*/
|
|
19
30
|
bgColor: {
|
|
20
31
|
type: String,
|
|
21
32
|
default: '#f6f6f6'
|
|
22
33
|
},
|
|
23
|
-
|
|
34
|
+
/**
|
|
35
|
+
* @description 列表锚点高度
|
|
36
|
+
* @default 32
|
|
37
|
+
*/
|
|
24
38
|
height: {
|
|
25
39
|
type: [String, Number],
|
|
26
40
|
default: 32
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- #ifdef APP-NVUE -->
|
|
3
3
|
<cell ref="fu-index-item">
|
|
4
|
-
|
|
4
|
+
<!-- #endif -->
|
|
5
5
|
<view :id="`fu-index-item-${id}`" class="fu-index-item" :class="[`fu-index-item-${id}`]">
|
|
6
6
|
<slot />
|
|
7
7
|
</view>
|
|
8
|
-
|
|
8
|
+
<!-- #ifdef APP-NVUE -->
|
|
9
9
|
</cell>
|
|
10
10
|
<!-- #endif -->
|
|
11
11
|
</template>
|
|
@@ -74,6 +74,6 @@
|
|
|
74
74
|
}
|
|
75
75
|
</script>
|
|
76
76
|
|
|
77
|
-
<style
|
|
78
|
-
|
|
77
|
+
<style>
|
|
78
|
+
|
|
79
79
|
</style>
|
|
@@ -75,6 +75,9 @@
|
|
|
75
75
|
</template>
|
|
76
76
|
|
|
77
77
|
<script>
|
|
78
|
+
import mpMixin from '../../libs/mixin/mpMixin.js'
|
|
79
|
+
import mixin from '../../libs/mixin/mixin.js'
|
|
80
|
+
import props from './props.js';
|
|
78
81
|
const indexList = () => {
|
|
79
82
|
const indexList = [];
|
|
80
83
|
const charCodeOfA = 'A'.charCodeAt(0);
|
|
@@ -83,9 +86,6 @@
|
|
|
83
86
|
}
|
|
84
87
|
return indexList;
|
|
85
88
|
}
|
|
86
|
-
import mpMixin from '../../libs/mixin/mpMixin.js'
|
|
87
|
-
import mixin from '../../libs/mixin/mixin.js'
|
|
88
|
-
import props from './props.js';
|
|
89
89
|
// #ifdef APP-NVUE
|
|
90
90
|
// 由于weex为阿里的KPI业绩考核的产物,所以不支持百分比单位,这里需要通过dom查询组件的宽度
|
|
91
91
|
const dom = uni.requireNativePlugin('dom')
|
|
@@ -93,11 +93,11 @@
|
|
|
93
93
|
/**
|
|
94
94
|
* IndexList 索引列表
|
|
95
95
|
* @description 此组件通过折叠面板收纳内容区域
|
|
96
|
-
* @property {String} inactiveColor 右边锚点非激活的颜色 (
|
|
97
|
-
* @property {String} activeColor 右边锚点激活的颜色 (
|
|
96
|
+
* @property {String} inactiveColor 右边锚点非激活的颜色 (默认 '#606266')
|
|
97
|
+
* @property {String} activeColor 右边锚点激活的颜色 (默认 '#2979ff')
|
|
98
98
|
* @property {Array} indexList 索引字符列表,数组形式
|
|
99
|
-
* @property {Boolean} sticky = [true|false] 是否开启锚点自动吸顶 (
|
|
100
|
-
* @property {String,Number} customNavHeight 自定义导航栏的高度 (
|
|
99
|
+
* @property {Boolean} sticky = [true|false] 是否开启锚点自动吸顶 (默认 true)
|
|
100
|
+
* @property {String,Number} customNavHeight 自定义导航栏的高度 (默认 0)
|
|
101
101
|
* @event {Function} select 选中右边索引字符时触发
|
|
102
102
|
* */
|
|
103
103
|
export default {
|
|
@@ -361,8 +361,8 @@
|
|
|
361
361
|
</script>
|
|
362
362
|
|
|
363
363
|
<style lang="scss" scoped>
|
|
364
|
-
@import '../../libs/
|
|
365
|
-
@import '../../libs/
|
|
364
|
+
@import '../../libs/style/components.scss';
|
|
365
|
+
@import '../../libs/style/color.scss';
|
|
366
366
|
|
|
367
367
|
.fu-index-list {
|
|
368
368
|
|
|
@@ -1,26 +1,39 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
props: {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @description 右边锚点非激活的颜色
|
|
5
|
+
* @default '#606266'
|
|
6
|
+
*/
|
|
4
7
|
inactiveColor: {
|
|
5
8
|
type: String,
|
|
6
|
-
default: '#
|
|
9
|
+
default: '#606266'
|
|
7
10
|
},
|
|
8
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @description 右边锚点激活的颜色
|
|
13
|
+
* @default '#2979ff'
|
|
14
|
+
*/
|
|
9
15
|
activeColor: {
|
|
10
16
|
type: String,
|
|
11
17
|
default: '#2979ff'
|
|
12
18
|
},
|
|
13
|
-
|
|
19
|
+
/**
|
|
20
|
+
* @description 索引字符列表,数组形式
|
|
21
|
+
*/
|
|
14
22
|
indexList: {
|
|
15
23
|
type: Array,
|
|
16
24
|
default: () => []
|
|
17
25
|
},
|
|
18
|
-
|
|
26
|
+
/**
|
|
27
|
+
* @description 是否开启锚点自动吸顶
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
19
30
|
sticky: {
|
|
20
31
|
type: Boolean,
|
|
21
32
|
default: true
|
|
22
33
|
},
|
|
23
|
-
|
|
34
|
+
/**
|
|
35
|
+
* @description 自定义导航栏的高度
|
|
36
|
+
*/
|
|
24
37
|
customNavHeight: {
|
|
25
38
|
type: [String,Number],
|
|
26
39
|
default: 0
|