fusions-ui 1.2.4 → 1.2.7
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 -20
- 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 +26 -33
- package/components/fu-form-item/props.js +30 -8
- 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 +110 -0
- package/components/fu-icon/fuicon.css +584 -0
- package/components/{fu-icons/icons.js → fu-icon/fuicon.js} +1031 -1031
- package/components/{fu-icons/fuicons.ttf → fu-icon/fuicon.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 +38 -43
- 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 +34 -17
- 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 +29 -27
- package/components/fu-swiper/props.js +81 -25
- 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
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
fontWeight: index1 === innerIndex[index] ? 'bold' : 'normal'
|
|
41
41
|
},textStyle(index,index1)]"
|
|
42
42
|
v-for="(item1, index1) in item" :key="index1"
|
|
43
|
-
v-if="$fu.
|
|
43
|
+
v-if="$fu.isArray(item)">{{ getItemText(item1) }}</text>
|
|
44
44
|
</picker-view-column>
|
|
45
45
|
</picker-view>
|
|
46
46
|
</view>
|
|
@@ -55,22 +55,22 @@
|
|
|
55
55
|
* @description 此组件选择器用于单列、多列联动的的选择场景。
|
|
56
56
|
* @property {String} bgColor 定义背景色 默认#FFFFFF
|
|
57
57
|
* @property {String} title 定义标题 不传不显示
|
|
58
|
-
* @property {String,Number} titleSize
|
|
58
|
+
* @property {String,Number} titleSize 标题字体大(默认 15)
|
|
59
59
|
* @property {String} titleColor 标题字体颜色
|
|
60
60
|
* @property {String} confirmText 确认按钮文本
|
|
61
|
-
* @property {String,Number} confirmSize
|
|
61
|
+
* @property {String,Number} confirmSize 确认按钮字体大小(默认 13)
|
|
62
62
|
* @property {String} confirmColor 确认按钮文本颜色
|
|
63
63
|
* @property {String} cancelText 取消按钮文本
|
|
64
|
-
* @property {String,Number} cancelSize
|
|
65
|
-
* @property {String} cancelColor
|
|
64
|
+
* @property {String,Number} cancelSize 取消按钮字体大小(默认 13)
|
|
65
|
+
* @property {String} cancelColor 取消按钮文本颜色(默认 '#888888')
|
|
66
66
|
* @property {Array} columns 对象数组,设置每一列的数据
|
|
67
|
-
* @property {String} color
|
|
68
|
-
* @property {String} activeColor
|
|
69
|
-
* @property {String,Number} visibleItemCount
|
|
70
|
-
* @property {String} keyName
|
|
71
|
-
* @property {Array} defaultIndex
|
|
72
|
-
* @property {Boolean} maskClosable = [true|false]
|
|
73
|
-
* @property {String,Number} itemHeight
|
|
67
|
+
* @property {String} color 文字颜色
|
|
68
|
+
* @property {String} activeColor 选中文字的颜色
|
|
69
|
+
* @property {String,Number} visibleItemCount 每列中可见选项的数量(默认 5)
|
|
70
|
+
* @property {String} keyName 选项对象中,需要展示的属性键名(默认 'value')
|
|
71
|
+
* @property {Array} defaultIndex 各列的默认索引(默认[])
|
|
72
|
+
* @property {Boolean} maskClosable = [true|false] 是否允许点击遮罩关闭选择器(默认 true)
|
|
73
|
+
* @property {String,Number} itemHeight 各列中,单个选项的高度(默认 44)
|
|
74
74
|
* @property {Boolean} immediateChange = [true|false] 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
|
|
75
75
|
* @event {Function} confirm 点击确定按钮时触发,返回当前选择的值
|
|
76
76
|
* @event {Function} cancel 点击取消按钮时触发
|
|
@@ -123,14 +123,14 @@
|
|
|
123
123
|
methods: {
|
|
124
124
|
// 点击工具栏的取消按钮
|
|
125
125
|
cancel() {
|
|
126
|
-
this
|
|
126
|
+
this.close()
|
|
127
127
|
setTimeout(() => {
|
|
128
128
|
this.$emit('cancel')
|
|
129
129
|
}, 10)
|
|
130
130
|
},
|
|
131
131
|
// 点击工具栏的确定按钮
|
|
132
132
|
confirm() {
|
|
133
|
-
this
|
|
133
|
+
this.close()
|
|
134
134
|
// 在这里使用deepClone拷贝后,vue3会自动转换成原始对象,这样处理是因为cli项目可能出现不返回值的情况
|
|
135
135
|
this.$emit('confirm', this.$fu.deepClone({
|
|
136
136
|
indexs: this.innerIndex,
|
|
@@ -144,9 +144,14 @@
|
|
|
144
144
|
this.$refs.popup.open()
|
|
145
145
|
},
|
|
146
146
|
|
|
147
|
+
// 关闭
|
|
148
|
+
close() {
|
|
149
|
+
this.$refs.popup.close()
|
|
150
|
+
},
|
|
151
|
+
|
|
147
152
|
// 获取item需要显示的文字,判别为对象还是文本
|
|
148
153
|
getItemText(item) {
|
|
149
|
-
if (this.$fu.
|
|
154
|
+
if (this.$fu.isObject(item)) {
|
|
150
155
|
return item[this.keyName]
|
|
151
156
|
} else {
|
|
152
157
|
return item
|
|
@@ -272,8 +277,8 @@
|
|
|
272
277
|
</script>
|
|
273
278
|
|
|
274
279
|
<style lang="scss" scoped>
|
|
275
|
-
@import '../../libs/
|
|
276
|
-
@import '../../libs/
|
|
280
|
+
@import '../../libs/style/components.scss';
|
|
281
|
+
@import '../../libs/style/color.scss';
|
|
277
282
|
|
|
278
283
|
.fu-picker {
|
|
279
284
|
position: relative;
|
|
@@ -1,96 +1,147 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
props: {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @description 背景颜色
|
|
5
|
+
* @default '#FFFFFF'
|
|
6
|
+
*/
|
|
4
7
|
bgColor: {
|
|
5
8
|
type: String,
|
|
6
9
|
default: '#FFFFFF'
|
|
7
10
|
},
|
|
8
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @description 标题
|
|
13
|
+
*/
|
|
9
14
|
title: {
|
|
10
15
|
type: String,
|
|
11
16
|
default: ''
|
|
12
17
|
},
|
|
13
|
-
|
|
18
|
+
/**
|
|
19
|
+
* @description 标题字体大小
|
|
20
|
+
* @default 15
|
|
21
|
+
*/
|
|
14
22
|
titleSize: {
|
|
15
23
|
type: [String,Number],
|
|
16
24
|
default: 15
|
|
17
25
|
},
|
|
18
|
-
|
|
26
|
+
/**
|
|
27
|
+
* @description 标题字体颜色
|
|
28
|
+
* @default '#333333'
|
|
29
|
+
*/
|
|
19
30
|
titleColor: {
|
|
20
31
|
type: String,
|
|
21
32
|
default: '#333333'
|
|
22
33
|
},
|
|
23
|
-
|
|
34
|
+
/**
|
|
35
|
+
* @description 确定按钮文本
|
|
36
|
+
* @default '确定'
|
|
37
|
+
*/
|
|
24
38
|
confirmText: {
|
|
25
39
|
type: String,
|
|
26
40
|
default: '确定'
|
|
27
41
|
},
|
|
28
|
-
|
|
42
|
+
/**
|
|
43
|
+
* @description 确定按钮字体大小
|
|
44
|
+
* @default 13
|
|
45
|
+
*/
|
|
29
46
|
confirmSize: {
|
|
30
47
|
type: [String,Number],
|
|
31
48
|
default: 13
|
|
32
49
|
},
|
|
33
|
-
|
|
50
|
+
/**
|
|
51
|
+
* @description 确认按钮文本颜色
|
|
52
|
+
*/
|
|
34
53
|
confirmColor: {
|
|
35
54
|
type: String,
|
|
36
55
|
default: ''
|
|
37
56
|
},
|
|
38
|
-
|
|
57
|
+
/**
|
|
58
|
+
* @description 取消按钮文本
|
|
59
|
+
* @default '取消'
|
|
60
|
+
*/
|
|
39
61
|
cancelText: {
|
|
40
62
|
type: String,
|
|
41
63
|
default: '取消'
|
|
42
64
|
},
|
|
43
|
-
|
|
65
|
+
/**
|
|
66
|
+
* @description 取消按钮字体大小
|
|
67
|
+
* @default 13
|
|
68
|
+
*/
|
|
44
69
|
cancelSize: {
|
|
45
70
|
type: [String,Number],
|
|
46
71
|
default: 13
|
|
47
72
|
},
|
|
48
|
-
|
|
73
|
+
/**
|
|
74
|
+
* @description 取消按钮文本颜色
|
|
75
|
+
* @default '#888888'
|
|
76
|
+
*/
|
|
49
77
|
cancelColor: {
|
|
50
78
|
type: String,
|
|
51
79
|
default: '#888888'
|
|
52
80
|
},
|
|
53
|
-
|
|
81
|
+
/**
|
|
82
|
+
* @description 各列中,单个选项的高度
|
|
83
|
+
* @default 44
|
|
84
|
+
*/
|
|
54
85
|
itemHeight: {
|
|
55
86
|
type: [String, Number],
|
|
56
87
|
default: 44
|
|
57
88
|
},
|
|
58
|
-
|
|
89
|
+
/**
|
|
90
|
+
* @description 对象数组,设置每一列的数据
|
|
91
|
+
*/
|
|
59
92
|
columns: {
|
|
60
93
|
type: Array,
|
|
61
94
|
default: () => []
|
|
62
95
|
},
|
|
63
|
-
|
|
96
|
+
/**
|
|
97
|
+
* @description 文字颜色
|
|
98
|
+
*/
|
|
64
99
|
color: {
|
|
65
100
|
type: String,
|
|
66
101
|
default: ''
|
|
67
102
|
},
|
|
68
|
-
|
|
103
|
+
/**
|
|
104
|
+
* @description 选中文字的颜色
|
|
105
|
+
*/
|
|
69
106
|
activeColor: {
|
|
70
107
|
type: String,
|
|
71
108
|
default: ''
|
|
72
109
|
},
|
|
73
|
-
|
|
110
|
+
/**
|
|
111
|
+
* @description 每列中可见选项的数量
|
|
112
|
+
* @default 5
|
|
113
|
+
*/
|
|
74
114
|
visibleItemCount: {
|
|
75
115
|
type: [String, Number],
|
|
76
116
|
default: 5
|
|
77
117
|
},
|
|
78
|
-
|
|
118
|
+
/**
|
|
119
|
+
* @description 选项对象中,需要展示的属性键名
|
|
120
|
+
* @default 'value'
|
|
121
|
+
*/
|
|
79
122
|
keyName: {
|
|
80
123
|
type: String,
|
|
81
124
|
default: 'value'
|
|
82
125
|
},
|
|
83
|
-
|
|
126
|
+
/**
|
|
127
|
+
* @description 各列的默认索引
|
|
128
|
+
*/
|
|
84
129
|
defaultIndex: {
|
|
85
130
|
type: Array,
|
|
86
131
|
default: () => []
|
|
87
132
|
},
|
|
88
|
-
|
|
133
|
+
/**
|
|
134
|
+
* @description 是否允许点击遮罩关闭选择器
|
|
135
|
+
* @default true
|
|
136
|
+
*/
|
|
89
137
|
maskClosable: {
|
|
90
138
|
type: Boolean,
|
|
91
139
|
default: true
|
|
92
140
|
},
|
|
93
|
-
|
|
141
|
+
/**
|
|
142
|
+
* @description 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
|
|
143
|
+
* @default true
|
|
144
|
+
*/
|
|
94
145
|
immediateChange: {
|
|
95
146
|
type: Boolean,
|
|
96
147
|
default: true
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view v-if="showPopup" class="fu-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']" :style="{zIndex: zIndex}">
|
|
3
3
|
<view @touchstart="touchstart">
|
|
4
|
-
<fu-transition key="1" v-if="maskShow" name="mask" mode="fade" :
|
|
5
|
-
<fu-transition key="2" :mode="ani" name="content" :
|
|
4
|
+
<fu-transition key="1" v-if="maskShow" name="mask" mode="fade" :customStyle="maskClass" :duration="duration" :show="showTrans" @click="onTap" />
|
|
5
|
+
<fu-transition key="2" :mode="ani" name="content" :customStyle="transClass" :duration="duration" :show="showTrans" @click="onTap">
|
|
6
6
|
<view class="fu-popup__wrapper" :style="[getStyle]" :class="[popupstyle]" @click="clear">
|
|
7
7
|
<slot />
|
|
8
8
|
<fu-safe-area mode="bottom" v-if="safeArea && direction == 'bottom'"></fu-safe-area>
|
|
9
9
|
<view class="fu-popup__wrapper__close" :class="['fu-popup__wrapper__close--' + closeIconPosition]" hover-class="fu-popup__wrapper__close--hover" hover-stay-time="150" @tap.stop="close" v-if="showClose">
|
|
10
|
-
<fu-
|
|
10
|
+
<fu-icon name="cancel" color="#909399" size="18" bold></fu-icon>
|
|
11
11
|
</view>
|
|
12
12
|
</view>
|
|
13
13
|
</fu-transition>
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
* @value top 顶部弹出
|
|
33
33
|
* @value center 中间弹出
|
|
34
34
|
* @value bottom 底部弹出
|
|
35
|
-
* @value left
|
|
36
|
-
* @value right
|
|
35
|
+
* @value left 左侧弹出
|
|
36
|
+
* @value right 右侧弹出
|
|
37
37
|
* @property {Boolean} animation = [true|false] 是否开启动画
|
|
38
38
|
* @property {Boolean} isMaskClick = [true|false] 蒙版点击是否关闭弹窗
|
|
39
39
|
* @property {String} bgColor 主窗口背景色
|
|
@@ -47,8 +47,10 @@
|
|
|
47
47
|
* @value bottom-left 左下角
|
|
48
48
|
* @value bottom-right 右下角
|
|
49
49
|
* @property {String,Number} radius 自定义圆角
|
|
50
|
+
*
|
|
50
51
|
* @event {Function} change 打开关闭弹窗触发,e={show: false}
|
|
51
52
|
* @event {Function} maskClick 点击遮罩触发
|
|
53
|
+
* @example <fu-popup>弹窗内容</fu-popup>
|
|
52
54
|
*/
|
|
53
55
|
export default {
|
|
54
56
|
name: 'FuPopup',
|
|
@@ -159,12 +161,12 @@
|
|
|
159
161
|
this.messageChild = null
|
|
160
162
|
// 解决头条冒泡的问题
|
|
161
163
|
this.clearPropagation = false
|
|
162
|
-
this.maskClass.backgroundColor = this.maskBgColor
|
|
164
|
+
this.maskClass.backgroundColor = this.maskBgColor;
|
|
163
165
|
},
|
|
164
166
|
methods: {
|
|
165
167
|
setH5Visible() {
|
|
166
168
|
// #ifdef H5
|
|
167
|
-
//
|
|
169
|
+
// 处理 h5 滚动穿透的问题
|
|
168
170
|
document.getElementsByTagName('body')[0].style.overflow = 'visible'
|
|
169
171
|
// #endif
|
|
170
172
|
},
|
|
@@ -185,7 +187,7 @@
|
|
|
185
187
|
|
|
186
188
|
// 打开
|
|
187
189
|
open(direction) {
|
|
188
|
-
//
|
|
190
|
+
// 处理快速打开关闭的情况
|
|
189
191
|
if (this.showPopup) {
|
|
190
192
|
return
|
|
191
193
|
}
|
|
@@ -211,29 +213,27 @@
|
|
|
211
213
|
|
|
212
214
|
// 关闭
|
|
213
215
|
close(mode) {
|
|
214
|
-
this.showTrans = false
|
|
216
|
+
this.showTrans = false;
|
|
215
217
|
this.$emit('change', {
|
|
216
218
|
show: false,
|
|
217
219
|
mode: this.mode
|
|
218
220
|
})
|
|
219
221
|
clearTimeout(this.timer)
|
|
220
|
-
// // 自定义关闭事件
|
|
221
|
-
// this.customOpen && this.customClose()
|
|
222
222
|
this.timer = setTimeout(() => {
|
|
223
|
-
this.showPopup = false
|
|
223
|
+
this.showPopup = false;
|
|
224
224
|
}, 300)
|
|
225
225
|
},
|
|
226
226
|
|
|
227
227
|
// 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
|
|
228
228
|
touchstart() {
|
|
229
|
-
this.clearPropagation = false
|
|
229
|
+
this.clearPropagation = false;
|
|
230
230
|
},
|
|
231
231
|
|
|
232
232
|
// 点击遮罩触发
|
|
233
233
|
onTap() {
|
|
234
234
|
if (this.clearPropagation) {
|
|
235
235
|
// fix by mehaotian 兼容 nvue
|
|
236
|
-
this.clearPropagation = false
|
|
236
|
+
this.clearPropagation = false;
|
|
237
237
|
return
|
|
238
238
|
}
|
|
239
239
|
this.$emit('maskClick')
|
|
@@ -245,18 +245,17 @@
|
|
|
245
245
|
* 顶部弹出样式处理
|
|
246
246
|
*/
|
|
247
247
|
top(mode) {
|
|
248
|
-
this.popupstyle = this.isDesktop ? 'fixforpc-top' : 'top'
|
|
249
|
-
this.ani = ['slide-top']
|
|
248
|
+
this.popupstyle = this.isDesktop ? 'fixforpc-top' : 'top';
|
|
249
|
+
this.ani = ['slide-top'];
|
|
250
250
|
this.transClass = {
|
|
251
251
|
position: 'fixed',
|
|
252
252
|
left: 0,
|
|
253
253
|
right: 0,
|
|
254
254
|
...this.getStyle
|
|
255
|
-
}
|
|
256
|
-
// 兼容 mode 属性 ,后续会废弃
|
|
255
|
+
};
|
|
257
256
|
if (mode) return
|
|
258
|
-
this.showPopup = true
|
|
259
|
-
this.showTrans = true
|
|
257
|
+
this.showPopup = true;
|
|
258
|
+
this.showTrans = true;
|
|
260
259
|
this.$nextTick(() => {
|
|
261
260
|
if (this.messageChild && this.mode === 'message') {
|
|
262
261
|
this.messageChild.timerClose()
|
|
@@ -268,27 +267,26 @@
|
|
|
268
267
|
* 底部弹出样式处理
|
|
269
268
|
*/
|
|
270
269
|
bottom(mode) {
|
|
271
|
-
this.popupstyle = 'bottom'
|
|
272
|
-
this.ani = ['slide-bottom']
|
|
270
|
+
this.popupstyle = 'bottom';
|
|
271
|
+
this.ani = ['slide-bottom'];
|
|
273
272
|
this.transClass = {
|
|
274
273
|
position: 'fixed',
|
|
275
274
|
left: 0,
|
|
276
275
|
right: 0,
|
|
277
276
|
bottom: 0,
|
|
278
277
|
...this.getStyle
|
|
279
|
-
}
|
|
280
|
-
// 兼容 mode 属性 ,后续会废弃
|
|
278
|
+
};
|
|
281
279
|
if (mode) return
|
|
282
|
-
this.showPopup = true
|
|
283
|
-
this.showTrans = true
|
|
280
|
+
this.showPopup = true;
|
|
281
|
+
this.showTrans = true;
|
|
284
282
|
},
|
|
285
283
|
|
|
286
284
|
/**
|
|
287
285
|
* 中间弹出样式处理
|
|
288
286
|
*/
|
|
289
287
|
center(mode) {
|
|
290
|
-
this.popupstyle = 'center'
|
|
291
|
-
this.ani = ['zoom-out', 'fade']
|
|
288
|
+
this.popupstyle = 'center';
|
|
289
|
+
this.ani = ['zoom-out', 'fade'];
|
|
292
290
|
this.transClass = {
|
|
293
291
|
position: 'fixed',
|
|
294
292
|
/* #ifndef APP-NVUE */
|
|
@@ -301,19 +299,18 @@
|
|
|
301
299
|
top: 0,
|
|
302
300
|
justifyContent: 'center',
|
|
303
301
|
alignItems: 'center'
|
|
304
|
-
}
|
|
305
|
-
// 兼容 mode 属性 ,后续会废弃
|
|
302
|
+
};
|
|
306
303
|
if (mode) return
|
|
307
|
-
this.showPopup = true
|
|
308
|
-
this.showTrans = true
|
|
304
|
+
this.showPopup = true;
|
|
305
|
+
this.showTrans = true;
|
|
309
306
|
},
|
|
310
307
|
|
|
311
308
|
/**
|
|
312
309
|
* 左侧弹出样式处理
|
|
313
310
|
*/
|
|
314
311
|
left(mode) {
|
|
315
|
-
this.popupstyle = 'left'
|
|
316
|
-
this.ani = ['slide-left']
|
|
312
|
+
this.popupstyle = 'left';
|
|
313
|
+
this.ani = ['slide-left'];
|
|
317
314
|
this.transClass = {
|
|
318
315
|
position: 'fixed',
|
|
319
316
|
left: 0,
|
|
@@ -324,18 +321,17 @@
|
|
|
324
321
|
display: 'flex',
|
|
325
322
|
flexDirection: 'column'
|
|
326
323
|
/* #endif */
|
|
327
|
-
}
|
|
328
|
-
// 兼容 mode 属性 ,后续会废弃
|
|
324
|
+
};
|
|
329
325
|
if (mode) return
|
|
330
|
-
this.showPopup = true
|
|
331
|
-
this.showTrans = true
|
|
326
|
+
this.showPopup = true;
|
|
327
|
+
this.showTrans = true;
|
|
332
328
|
},
|
|
333
329
|
|
|
334
330
|
/**
|
|
335
331
|
* 右侧弹出样式处理
|
|
336
332
|
*/
|
|
337
333
|
right(mode) {
|
|
338
|
-
this.popupstyle = 'right'
|
|
334
|
+
this.popupstyle = 'right';
|
|
339
335
|
this.ani = ['slide-right']
|
|
340
336
|
this.transClass = {
|
|
341
337
|
position: 'fixed',
|
|
@@ -347,11 +343,10 @@
|
|
|
347
343
|
display: 'flex',
|
|
348
344
|
flexDirection: 'column'
|
|
349
345
|
/* #endif */
|
|
350
|
-
}
|
|
351
|
-
// 兼容 mode 属性 ,后续会废弃
|
|
346
|
+
};
|
|
352
347
|
if (mode) return
|
|
353
|
-
this.showPopup = true
|
|
354
|
-
this.showTrans = true
|
|
348
|
+
this.showPopup = true;
|
|
349
|
+
this.showTrans = true;
|
|
355
350
|
}
|
|
356
351
|
},
|
|
357
352
|
watch: {
|
|
@@ -1,36 +1,54 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
props: {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @description 是否开启动画
|
|
5
|
+
* @default true
|
|
6
|
+
*/
|
|
4
7
|
animation: {
|
|
5
8
|
type: Boolean,
|
|
6
9
|
default: true
|
|
7
10
|
},
|
|
8
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @description 弹出层方向
|
|
13
|
+
* @values 'top' - 顶部弹出, 'center' - 中间弹出, 'bottom' - 底部弹出, 'left' - 左侧弹出, 'right' - 右侧弹出
|
|
14
|
+
* @default 'center'
|
|
15
|
+
*/
|
|
9
16
|
mode: {
|
|
10
17
|
type: String,
|
|
11
18
|
default: 'center'
|
|
12
19
|
},
|
|
13
|
-
|
|
20
|
+
/**
|
|
21
|
+
* @description 蒙版点击是否关闭弹窗
|
|
22
|
+
*/
|
|
14
23
|
isMaskClick: {
|
|
15
24
|
type: Boolean,
|
|
16
25
|
default: null
|
|
17
26
|
},
|
|
18
|
-
|
|
27
|
+
/**
|
|
28
|
+
* @description 主窗口背景色
|
|
29
|
+
*/
|
|
19
30
|
bgColor: {
|
|
20
31
|
type: String,
|
|
21
32
|
default: '#FFFFFF'
|
|
22
33
|
},
|
|
23
|
-
|
|
34
|
+
/**
|
|
35
|
+
* @description 是否适配底部安全区(默认 true)
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
24
38
|
safeArea: {
|
|
25
39
|
type: Boolean,
|
|
26
40
|
default: true
|
|
27
41
|
},
|
|
28
|
-
|
|
42
|
+
/**
|
|
43
|
+
* @description 蒙版颜色
|
|
44
|
+
*/
|
|
29
45
|
maskBgColor: {
|
|
30
46
|
type: String,
|
|
31
47
|
default: 'rgba(0, 0, 0, 0.4)'
|
|
32
48
|
},
|
|
33
|
-
|
|
49
|
+
/**
|
|
50
|
+
* @description 弹出层的层级
|
|
51
|
+
*/
|
|
34
52
|
zIndex: {
|
|
35
53
|
type: [String,Number],
|
|
36
54
|
// #ifdef H5
|
|
@@ -40,16 +58,23 @@ export default {
|
|
|
40
58
|
default: 10075
|
|
41
59
|
// #endif
|
|
42
60
|
},
|
|
43
|
-
|
|
61
|
+
/**
|
|
62
|
+
* @description 是否显示关闭图标,默认false
|
|
63
|
+
*/
|
|
44
64
|
showClose: {
|
|
45
65
|
type: Boolean,
|
|
46
66
|
default: false
|
|
47
67
|
},
|
|
68
|
+
/**
|
|
69
|
+
* @description 设置关闭图标位置
|
|
70
|
+
*/
|
|
48
71
|
closeIconPos: {
|
|
49
72
|
type: String,
|
|
50
73
|
default: ''
|
|
51
74
|
},
|
|
52
|
-
|
|
75
|
+
/**
|
|
76
|
+
* @description 设置圆角
|
|
77
|
+
*/
|
|
53
78
|
radius: {
|
|
54
79
|
type: [String,Number],
|
|
55
80
|
default: 0
|
|
@@ -57,6 +57,8 @@
|
|
|
57
57
|
* @property {String,Number} size 进度条大小(仅mode = circle有效)
|
|
58
58
|
* @property {String,Number} borderWidth 进度条圆环宽度(仅mode = circle有效)
|
|
59
59
|
* @property {Number} duration 圆环执行动画的时间,单位 ms(仅mode = circle有效)
|
|
60
|
+
*
|
|
61
|
+
* @example <fu-progress :percent="percent"></fu-progress>
|
|
60
62
|
*/
|
|
61
63
|
export default {
|
|
62
64
|
name: "FuProgress",
|
|
@@ -218,8 +220,7 @@
|
|
|
218
220
|
</script>
|
|
219
221
|
|
|
220
222
|
<style lang="scss" scoped>
|
|
221
|
-
@import '../../libs/
|
|
222
|
-
|
|
223
|
+
@import '../../libs/style/components.scss';
|
|
223
224
|
$bg-color: #f0f0f0;
|
|
224
225
|
|
|
225
226
|
// 线形
|
|
@@ -1,46 +1,73 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
props: {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @description 进度条类型
|
|
5
|
+
* @values 'line' - 线形, 'circle' - 圆形
|
|
6
|
+
* @default 'line'
|
|
7
|
+
*/
|
|
4
8
|
mode: {
|
|
5
9
|
type: String,
|
|
6
10
|
default: 'line'
|
|
7
11
|
},
|
|
8
|
-
|
|
12
|
+
/**
|
|
13
|
+
* @description 激活部分的颜色
|
|
14
|
+
* @default '#2979ff'
|
|
15
|
+
*/
|
|
9
16
|
activeColor: {
|
|
10
17
|
type: String,
|
|
11
18
|
default: '#2979ff'
|
|
12
19
|
},
|
|
13
|
-
|
|
20
|
+
/**
|
|
21
|
+
* @description 未激活部分的颜色
|
|
22
|
+
* @default '#f0f0f0'
|
|
23
|
+
*/
|
|
14
24
|
inactiveColor: {
|
|
15
25
|
type: String,
|
|
16
26
|
default: '#f0f0f0'
|
|
17
27
|
},
|
|
18
|
-
|
|
28
|
+
/**
|
|
29
|
+
* @description 进度百分比,数值
|
|
30
|
+
* @default 0
|
|
31
|
+
*/
|
|
19
32
|
percent: {
|
|
20
33
|
type: [String,Number],
|
|
21
34
|
default: 0
|
|
22
35
|
},
|
|
23
|
-
|
|
36
|
+
/**
|
|
37
|
+
* @description 是否在进度条内部显示百分比的值
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
24
40
|
showPercent: {
|
|
25
41
|
type: Boolean,
|
|
26
42
|
default: true
|
|
27
43
|
},
|
|
28
|
-
|
|
44
|
+
/**
|
|
45
|
+
* @description 进度条的高度(仅mode=line时生效)
|
|
46
|
+
* @default 12
|
|
47
|
+
*/
|
|
29
48
|
height: {
|
|
30
49
|
type: [String,Number],
|
|
31
50
|
default: 12
|
|
32
51
|
},
|
|
33
|
-
|
|
52
|
+
/**
|
|
53
|
+
* @description 进度条大小(仅mode=circle时生效)
|
|
54
|
+
* @default 200
|
|
55
|
+
*/
|
|
34
56
|
size: {
|
|
35
57
|
type: [String,Number],
|
|
36
58
|
default: 200
|
|
37
59
|
},
|
|
38
|
-
|
|
60
|
+
/**
|
|
61
|
+
* @description 进度条圆环宽度(仅mode=circle时生效)
|
|
62
|
+
* @default 12
|
|
63
|
+
*/
|
|
39
64
|
borderWidth: {
|
|
40
65
|
type: [String,Number],
|
|
41
66
|
default: 14
|
|
42
67
|
},
|
|
43
|
-
|
|
68
|
+
/**
|
|
69
|
+
* @description 圆环执行动画的时间,单位 ms(仅mode=circle时生效)
|
|
70
|
+
*/
|
|
44
71
|
duration: {
|
|
45
72
|
type: Number,
|
|
46
73
|
default: 1500
|