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
|
@@ -3,105 +3,129 @@
|
|
|
3
3
|
<!-- #ifdef APP-VUE || MP-WEIXIN || H5 -->
|
|
4
4
|
<view class="fu-swipe">
|
|
5
5
|
<!-- #ifdef MP-WEIXIN || VUE3 -->
|
|
6
|
-
<view
|
|
7
|
-
|
|
6
|
+
<view
|
|
7
|
+
class="fu-swipe_box"
|
|
8
|
+
:change:prop="wxsswipe.showWatch"
|
|
9
|
+
:prop="is_show"
|
|
10
|
+
:data-threshold="threshold"
|
|
11
|
+
:data-disabled="disabled"
|
|
12
|
+
@touchstart="wxsswipe.touchstart"
|
|
13
|
+
@touchmove="wxsswipe.touchmove"
|
|
8
14
|
@touchend="wxsswipe.touchend">
|
|
9
|
-
<!-- #endif -->
|
|
10
|
-
<!-- #ifndef MP-WEIXIN || VUE3 -->
|
|
11
|
-
<view class="fu-swipe_box" :change:prop="renderswipe.showWatch" :prop="is_show" :data-threshold="threshold"
|
|
12
|
-
:data-disabled="disabled+''" @touchstart="renderswipe.touchstart" @touchmove="renderswipe.touchmove"
|
|
13
|
-
@touchend="renderswipe.touchend">
|
|
14
|
-
<!-- #endif -->
|
|
15
|
-
<!-- 在微信小程序 app vue端 h5 使用wxs 实现-->
|
|
16
|
-
<view class="fu-swipe_button-group button-group--left">
|
|
17
|
-
<slot name="left">
|
|
18
|
-
<view v-for="(item,index) in leftOptions" :key="index" :style="{
|
|
19
|
-
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD'
|
|
20
|
-
}" class="fu-swipe_button button-hock" @touchstart="appTouchStart"
|
|
21
|
-
@touchend="appTouchEnd($event,index,item,'left')"
|
|
22
|
-
@click.stop="onClickForPC(index,item,'left')">
|
|
23
|
-
<text class="fu-swipe_button-text"
|
|
24
|
-
:style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'}">{{ item.text }}</text>
|
|
25
|
-
</view>
|
|
26
|
-
</slot>
|
|
27
|
-
</view>
|
|
28
|
-
<view class="fu-swipe_text--center">
|
|
29
|
-
<slot></slot>
|
|
30
|
-
</view>
|
|
31
|
-
<view class="fu-swipe_button-group button-group--right">
|
|
32
|
-
<slot name="right">
|
|
33
|
-
<view v-for="(item,index) in rightOptions" :key="index" :style="{
|
|
34
|
-
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD'
|
|
35
|
-
}" class="fu-swipe_button button-hock" @touchstart="appTouchStart"
|
|
36
|
-
@touchend="appTouchEnd($event,index,item,'right')"
|
|
37
|
-
@click.stop="onClickForPC(index,item,'right')"><text class="fu-swipe_button-text"
|
|
38
|
-
:style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'}">{{ item.text }}</text>
|
|
39
|
-
</view>
|
|
40
|
-
</slot>
|
|
41
|
-
</view>
|
|
42
|
-
</view>
|
|
43
|
-
</view>
|
|
44
15
|
<!-- #endif -->
|
|
45
|
-
<!--
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
16
|
+
<!-- #ifndef MP-WEIXIN || VUE3 -->
|
|
17
|
+
<view
|
|
18
|
+
class="fu-swipe_box"
|
|
19
|
+
:change:prop="renderswipe.showWatch"
|
|
20
|
+
:prop="is_show"
|
|
21
|
+
:data-threshold="threshold"
|
|
22
|
+
:data-disabled="disabled + ''"
|
|
23
|
+
@touchstart="renderswipe.touchstart"
|
|
24
|
+
@touchmove="renderswipe.touchmove"
|
|
25
|
+
@touchend="renderswipe.touchend">
|
|
26
|
+
<!-- #endif -->
|
|
27
|
+
<!-- 在微信小程序 app vue端 h5 使用wxs 实现-->
|
|
28
|
+
<view class="fu-swipe_button-group button-group--left">
|
|
49
29
|
<slot name="left">
|
|
50
|
-
<view
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
30
|
+
<view
|
|
31
|
+
class="fu-swipe_button button-hock"
|
|
32
|
+
:style="{backgroundColor: item.style && item.style.backgroundColor? item.style.backgroundColor: '#C7C6CD'}"
|
|
33
|
+
v-for="(item,index) in leftOptions" :key="index"
|
|
34
|
+
@touchstart="appTouchStart"
|
|
35
|
+
@touchend="appTouchEnd($event,index,item,'left')"
|
|
36
|
+
@click.stop="handleClickForPC(index,item,'left')">
|
|
37
|
+
<text class="fu-swipe_button-text" :style="{color: item.style && item.style.color? item.style.color: '#FFFFFF', fontSize: item.style && item.style.fontSize? item.style.fontSize: '16px'}">{{ item.text }}</text>
|
|
55
38
|
</view>
|
|
56
39
|
</slot>
|
|
57
40
|
</view>
|
|
58
|
-
<view
|
|
41
|
+
<view class="fu-swipe_text--center">
|
|
42
|
+
<slot></slot>
|
|
43
|
+
</view>
|
|
44
|
+
<view class="fu-swipe_button-group button-group--right">
|
|
59
45
|
<slot name="right">
|
|
60
|
-
<view
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
46
|
+
<view
|
|
47
|
+
class="fu-swipe_button button-hock"
|
|
48
|
+
:style="{backgroundColor: item.style && item.style.backgroundColor? item.style.backgroundColor: '#C7C6CD'}"
|
|
49
|
+
v-for="(item,index) in rightOptions" :key="index"
|
|
50
|
+
@touchstart="appTouchStart"
|
|
51
|
+
@touchend="appTouchEnd($event,index,item,'right')"
|
|
52
|
+
@click.stop="handleClickForPC(index,item,'right')">
|
|
53
|
+
<text class="fu-swipe_button-text" :style="{color: item.style && item.style.color? item.style.color: '#FFFFFF', fontSize: item.style && item.style.fontSize? item.style.fontSize: '16px'}">{{ item.text }}</text>
|
|
65
54
|
</view>
|
|
66
55
|
</slot>
|
|
67
56
|
</view>
|
|
68
|
-
<view ref='selector-content--hock' class="fu-swipe_box">
|
|
69
|
-
<slot></slot>
|
|
70
|
-
</view>
|
|
71
57
|
</view>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
:style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',}">{{ item.text }}</text>
|
|
86
|
-
</view>
|
|
87
|
-
</slot>
|
|
58
|
+
</view>
|
|
59
|
+
<!-- #endif -->
|
|
60
|
+
<!-- app nvue端 使用 bindingx -->
|
|
61
|
+
<!-- #ifdef APP-NVUE -->
|
|
62
|
+
<view ref="selector-box--hock" class="fu-swipe" @horizontalpan="touchstart" @touchend="touchend">
|
|
63
|
+
<view ref='selector-left-button--hock' class="fu-swipe_button-group button-group--left">
|
|
64
|
+
<slot name="left">
|
|
65
|
+
<view
|
|
66
|
+
class="fu-swipe_button button-hock"
|
|
67
|
+
:style="{backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD'}"
|
|
68
|
+
v-for="(item,index) in leftOptions" :key="index"
|
|
69
|
+
@click.stop="handleClick(index,item,'left')">
|
|
70
|
+
<text class="fu-swipe_button-text" :style="{color: item.style && item.style.color? item.style.color: '#FFFFFF', fontSize: item.style && item.style.fontSize? item.style.fontSize: '16px'}">{{ item.text }}</text>
|
|
88
71
|
</view>
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
</slot>
|
|
72
|
+
</slot>
|
|
73
|
+
</view>
|
|
74
|
+
<view ref='selector-right-button--hock' class="fu-swipe_button-group button-group--right">
|
|
75
|
+
<slot name="right">
|
|
76
|
+
<view
|
|
77
|
+
class="fu-swipe_button button-hock"
|
|
78
|
+
:style="{backgroundColor: item.style && item.style.backgroundColor ?item.style.backgroundColor : '#C7C6CD'}"
|
|
79
|
+
v-for="(item,index) in rightOptions" :key="index"
|
|
80
|
+
@click.stop="handleClick(index,item,'right')">
|
|
81
|
+
<text class="fu-swipe_button-text" :style="{color: item.style && item.style.color? item.style.color: '#FFFFFF', fontSize: item.style && item.style.fontSize? item.style.fontSize: '16px'}">{{ item.text }}</text>
|
|
100
82
|
</view>
|
|
83
|
+
</slot>
|
|
84
|
+
</view>
|
|
85
|
+
<view ref='selector-content--hock' class="fu-swipe_box">
|
|
86
|
+
<slot></slot>
|
|
87
|
+
</view>
|
|
88
|
+
</view>
|
|
89
|
+
<!-- #endif -->
|
|
90
|
+
|
|
91
|
+
<!-- 其他平台使用 js ,长列表性能可能会有影响-->
|
|
92
|
+
<!-- #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO || MP-QQ -->
|
|
93
|
+
<view class="fu-swipe">
|
|
94
|
+
<view
|
|
95
|
+
class="fu-swipe_box"
|
|
96
|
+
:class="{ani:ani}"
|
|
97
|
+
:style="{transform:moveLeft}"
|
|
98
|
+
@touchstart="touchstart"
|
|
99
|
+
@touchmove="touchmove"
|
|
100
|
+
@touchend="touchend">
|
|
101
|
+
<view class="fu-swipe_button-group button-group--left" :class="[elClass]">
|
|
102
|
+
<slot name="left">
|
|
103
|
+
<view
|
|
104
|
+
class="fu-swipe_button button-hock"
|
|
105
|
+
:style="{ backgroundColor: item.style && item.style.backgroundColor? item.style.backgroundColor: '#C7C6CD', fontSize: item.style && item.style.fontSize? item.style.fontSize: '16px'}"
|
|
106
|
+
v-for="(item,index) in leftOptions" :key="index"
|
|
107
|
+
@touchstart="appTouchStart"
|
|
108
|
+
@touchend="appTouchEnd($event,index,item,'left')">
|
|
109
|
+
<text class="fu-swipe_button-text" :style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF'}">{{ item.text }}</text>
|
|
110
|
+
</view>
|
|
111
|
+
</slot>
|
|
112
|
+
</view>
|
|
113
|
+
<slot></slot>
|
|
114
|
+
<view class="fu-swipe_button-group button-group--right" :class="[elClass]">
|
|
115
|
+
<slot name="right">
|
|
116
|
+
<view
|
|
117
|
+
class="fu-swipe_button button-hock"
|
|
118
|
+
:style="{backgroundColor: item.style && item.style.backgroundColor? item.style.backgroundColor: '#C7C6CD', fontSize: item.style && item.style.fontSize? item.style.fontSize: '16px'}"
|
|
119
|
+
v-for="(item,index) in rightOptions" :key="index"
|
|
120
|
+
@touchstart="appTouchStart"
|
|
121
|
+
@touchend="appTouchEnd($event,index,item,'right')">
|
|
122
|
+
<text class="fu-swipe_button-text" :style="{color: item.style && item.style.color? item.style.color: '#FFFFFF'}">{{ item.text }}</text>
|
|
123
|
+
</view>
|
|
124
|
+
</slot>
|
|
101
125
|
</view>
|
|
102
126
|
</view>
|
|
103
|
-
|
|
104
|
-
|
|
127
|
+
</view>
|
|
128
|
+
<!-- #endif -->
|
|
105
129
|
</template>
|
|
106
130
|
|
|
107
131
|
<script src="./wx.wxs" module="wxsswipe" lang="wxs"></script>
|
|
@@ -150,19 +174,6 @@
|
|
|
150
174
|
name:"FuSwipeActionItem",
|
|
151
175
|
mixins: [mpMixin, mpwxs, bindingx, mpother, props],
|
|
152
176
|
emits: ['click', 'change'],
|
|
153
|
-
// #ifndef VUE3
|
|
154
|
-
destroyed() {
|
|
155
|
-
if (this.__isUnmounted) return
|
|
156
|
-
this.uninstall()
|
|
157
|
-
},
|
|
158
|
-
// #endif
|
|
159
|
-
// #ifdef VUE3
|
|
160
|
-
unmounted() {
|
|
161
|
-
this.__isUnmounted = true
|
|
162
|
-
this.uninstall()
|
|
163
|
-
},
|
|
164
|
-
// #endif
|
|
165
|
-
|
|
166
177
|
methods: {
|
|
167
178
|
uninstall() {
|
|
168
179
|
if (this.swipeaction) {
|
|
@@ -186,10 +197,24 @@
|
|
|
186
197
|
}
|
|
187
198
|
return parent;
|
|
188
199
|
}
|
|
200
|
+
},
|
|
201
|
+
// #ifndef VUE3
|
|
202
|
+
destroyed() {
|
|
203
|
+
if (this.__isUnmounted) return
|
|
204
|
+
this.uninstall()
|
|
205
|
+
},
|
|
206
|
+
// #endif
|
|
207
|
+
// #ifdef VUE3
|
|
208
|
+
unmounted() {
|
|
209
|
+
this.__isUnmounted = true
|
|
210
|
+
this.uninstall()
|
|
189
211
|
}
|
|
212
|
+
// #endif
|
|
190
213
|
}
|
|
191
214
|
</script>
|
|
192
215
|
<style lang="scss" scoped>
|
|
216
|
+
@import '../../libs/style/components.scss';
|
|
217
|
+
|
|
193
218
|
.fu-swipe {
|
|
194
219
|
position: relative;
|
|
195
220
|
/* #ifndef APP-NVUE */
|
|
@@ -198,18 +223,14 @@
|
|
|
198
223
|
}
|
|
199
224
|
|
|
200
225
|
.fu-swipe_box {
|
|
226
|
+
@include flex;
|
|
201
227
|
/* #ifndef APP-NVUE */
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
// touch-action: none;
|
|
228
|
+
flex: 0 0 auto;
|
|
229
|
+
touch-action: none;
|
|
205
230
|
/* #endif */
|
|
206
231
|
position: relative;
|
|
207
232
|
}
|
|
208
233
|
|
|
209
|
-
.fu-swipe_content {
|
|
210
|
-
// border: 1px red solid;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
234
|
.fu-swipe_text--center {
|
|
214
235
|
width: 100%;
|
|
215
236
|
/* #ifndef APP-NVUE */
|
|
@@ -218,11 +239,10 @@
|
|
|
218
239
|
}
|
|
219
240
|
|
|
220
241
|
.fu-swipe_button-group {
|
|
242
|
+
@include flex(row);
|
|
221
243
|
/* #ifndef APP-NVUE */
|
|
222
244
|
box-sizing: border-box;
|
|
223
|
-
display: flex;
|
|
224
245
|
/* #endif */
|
|
225
|
-
flex-direction: row;
|
|
226
246
|
position: absolute;
|
|
227
247
|
top: 0;
|
|
228
248
|
bottom: 0;
|
|
@@ -245,10 +265,7 @@
|
|
|
245
265
|
/* #ifdef APP-NVUE */
|
|
246
266
|
flex: 1;
|
|
247
267
|
/* #endif */
|
|
248
|
-
|
|
249
|
-
display: flex;
|
|
250
|
-
/* #endif */
|
|
251
|
-
flex-direction: row;
|
|
268
|
+
@include flex(row);
|
|
252
269
|
justify-content: center;
|
|
253
270
|
align-items: center;
|
|
254
271
|
padding: 0 20px;
|
|
@@ -256,7 +273,7 @@
|
|
|
256
273
|
|
|
257
274
|
.fu-swipe_button-text {
|
|
258
275
|
/* #ifndef APP-NVUE */
|
|
259
|
-
flex
|
|
276
|
+
flex: 0 0 auto;
|
|
260
277
|
/* #endif */
|
|
261
278
|
font-size: 14px;
|
|
262
279
|
}
|
|
@@ -274,8 +291,8 @@
|
|
|
274
291
|
}
|
|
275
292
|
|
|
276
293
|
.movable-view {
|
|
277
|
-
|
|
278
|
-
|
|
294
|
+
@include flex;
|
|
295
|
+
justify-content: center;
|
|
279
296
|
position: relative;
|
|
280
297
|
flex: 1;
|
|
281
298
|
height: 45px;
|
|
@@ -283,26 +300,20 @@
|
|
|
283
300
|
}
|
|
284
301
|
|
|
285
302
|
.movable-view-button {
|
|
286
|
-
|
|
303
|
+
@include flex(row);
|
|
287
304
|
/* #ifndef APP-NVUE */
|
|
288
|
-
flex
|
|
305
|
+
flex: 0 0 auto;
|
|
289
306
|
/* #endif */
|
|
290
|
-
flex-direction: row;
|
|
291
307
|
height: 100%;
|
|
292
308
|
background: #C0C0C0;
|
|
293
309
|
}
|
|
294
310
|
|
|
295
|
-
/* .transition {
|
|
296
|
-
transition: all 0.3s;
|
|
297
|
-
} */
|
|
298
|
-
|
|
299
311
|
.movable-view-box {
|
|
300
312
|
/* #ifndef APP-NVUE */
|
|
301
|
-
flex
|
|
313
|
+
flex: 0 0 auto;
|
|
302
314
|
/* #endif */
|
|
303
315
|
height: 100%;
|
|
304
|
-
background-color: #
|
|
316
|
+
background-color: #ffffff;
|
|
305
317
|
}
|
|
306
|
-
|
|
307
318
|
/* #endif */
|
|
308
319
|
</style>
|
|
@@ -1,33 +1,49 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
props: {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @description 控制开关
|
|
5
|
+
* @default 'none'
|
|
6
|
+
*/
|
|
4
7
|
show: {
|
|
5
8
|
type: String,
|
|
6
9
|
default: 'none'
|
|
7
10
|
},
|
|
8
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @description 是否禁用
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
9
15
|
disabled: {
|
|
10
16
|
type: Boolean,
|
|
11
17
|
default: false
|
|
12
18
|
},
|
|
13
|
-
|
|
19
|
+
/**
|
|
20
|
+
* @description 是否自动关闭
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
14
23
|
autoClose: {
|
|
15
24
|
type: Boolean,
|
|
16
25
|
default: true
|
|
17
26
|
},
|
|
18
|
-
|
|
27
|
+
/**
|
|
28
|
+
* @description 滑动缺省距离
|
|
29
|
+
* @default 20
|
|
30
|
+
*/
|
|
19
31
|
threshold: {
|
|
20
32
|
type: Number,
|
|
21
33
|
default: 20
|
|
22
34
|
},
|
|
23
|
-
|
|
35
|
+
/**
|
|
36
|
+
* @description 左侧按钮内容
|
|
37
|
+
*/
|
|
24
38
|
leftOptions: {
|
|
25
39
|
type: Array,
|
|
26
40
|
default () {
|
|
27
41
|
return []
|
|
28
42
|
}
|
|
29
43
|
},
|
|
30
|
-
|
|
44
|
+
/**
|
|
45
|
+
* @description 右侧按钮内容
|
|
46
|
+
*/
|
|
31
47
|
rightOptions: {
|
|
32
48
|
type: Array,
|
|
33
49
|
default () {
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
* @property {Array} list 轮播图列表数据
|
|
101
101
|
* @property {String,Number} radius 圆角的值 (默认 5)
|
|
102
102
|
* @property {Number} current 初始化时,默认显示第几项
|
|
103
|
-
* @property {String,Number} height 高度 (默认
|
|
103
|
+
* @property {String,Number} height 高度 (默认 160)
|
|
104
104
|
* @property {String} bgColor 背景色 (默认 #f2f3f4)
|
|
105
105
|
* @property {String} keyName 图片的属性名 (默认 image)
|
|
106
106
|
* @property {Boolean} showTitle = [true|false] 是否显示标题(默认 false)
|
|
@@ -127,8 +127,10 @@
|
|
|
127
127
|
* @property {Boolean} circular = [true|false] 是否衔接滑动 (默认 true)
|
|
128
128
|
* @property {String} imgMode 图片裁剪模式
|
|
129
129
|
* @property {Boolean} loading 是否加载中(默认 false)
|
|
130
|
+
*
|
|
130
131
|
* @event {Function} click 点击轮播图时触发
|
|
131
132
|
* @event {Function} change 轮播图切换时触发
|
|
133
|
+
* @example <fu-swiper :list="list"></fu-swiper>
|
|
132
134
|
*/
|
|
133
135
|
export default {
|
|
134
136
|
name: 'FuSwiper',
|
|
@@ -143,45 +145,39 @@
|
|
|
143
145
|
computed: {
|
|
144
146
|
indicatorStyle() {
|
|
145
147
|
let style = {}
|
|
146
|
-
if (this.indicatorPosition === 'topLeft' || this.indicatorPosition === 'bottomLeft') style.justifyContent =
|
|
147
|
-
|
|
148
|
-
if (this.indicatorPosition === '
|
|
149
|
-
.justifyContent = 'center'
|
|
150
|
-
if (this.indicatorPosition === 'topRight' || this.indicatorPosition === 'bottomRight') style
|
|
151
|
-
.justifyContent = 'flex-end'
|
|
148
|
+
if (this.indicatorPosition === 'topLeft' || this.indicatorPosition === 'bottomLeft') style.justifyContent = 'flex-start'
|
|
149
|
+
if (this.indicatorPosition === 'topCenter' || this.indicatorPosition === 'bottomCenter') style.justifyContent = 'center'
|
|
150
|
+
if (this.indicatorPosition === 'topRight' || this.indicatorPosition === 'bottomRight') style.justifyContent = 'flex-end'
|
|
152
151
|
if (['topLeft', 'topCenter', 'topRight'].indexOf(this.indicatorPosition) >= 0) {
|
|
153
|
-
style.top = '12rpx'
|
|
154
|
-
style.bottom = 'auto'
|
|
152
|
+
style.top = '12rpx';
|
|
153
|
+
style.bottom = 'auto';
|
|
155
154
|
} else {
|
|
156
|
-
style.top = 'auto'
|
|
157
|
-
style.bottom = '12rpx'
|
|
155
|
+
style.top = 'auto';
|
|
156
|
+
style.bottom = '12rpx';
|
|
158
157
|
}
|
|
159
|
-
style.padding = `0 ${this.effect3D
|
|
158
|
+
style.padding = `0 ${this.effect3D? '74rpx': '24rpx'}`;
|
|
160
159
|
|
|
161
160
|
return style
|
|
162
161
|
},
|
|
163
162
|
swiperTitleStyle() {
|
|
164
163
|
let style = {}
|
|
165
164
|
if (this.mode === 'none' || this.mode === '') style.paddingBottom = '12rpx'
|
|
166
|
-
if (['bottomLeft', 'bottomCenter', 'bottomRight'].indexOf(this.indicatorPosition) >= 0 && this.mode ===
|
|
167
|
-
'
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
.mode !== 'number') {
|
|
171
|
-
style.paddingBottom = '40rpx'
|
|
165
|
+
if (['bottomLeft', 'bottomCenter', 'bottomRight'].indexOf(this.indicatorPosition) >= 0 && this.mode === 'number') {
|
|
166
|
+
style.paddingBottom = '60rpx';
|
|
167
|
+
} else if (['bottomLeft', 'bottomCenter', 'bottomRight'].indexOf(this.indicatorPosition) >= 0 && this.mode !== 'number') {
|
|
168
|
+
style.paddingBottom = '40rpx';
|
|
172
169
|
} else {
|
|
173
|
-
style.paddingBottom = '12rpx'
|
|
170
|
+
style.paddingBottom = '12rpx';
|
|
174
171
|
}
|
|
175
172
|
|
|
176
|
-
|
|
177
|
-
return style
|
|
173
|
+
return Object.assign(style, this.titleStyle)
|
|
178
174
|
}
|
|
179
175
|
},
|
|
180
176
|
methods: {
|
|
181
177
|
getItemType(e) {
|
|
182
178
|
if (typeof e === 'string') return this.$fu.isVideo(this.getSource(e)) ? 'video' : 'image'
|
|
183
179
|
if (typeof e === 'object' && this.keyName) {
|
|
184
|
-
if (!e.type) return this.$fu.isVideo(this.getSource(e))
|
|
180
|
+
if (!e.type) return this.$fu.isVideo(this.getSource(e))? 'video': 'image'
|
|
185
181
|
if (e.type === 'image') return 'image'
|
|
186
182
|
if (e.type === 'video') return 'video'
|
|
187
183
|
return 'image'
|
|
@@ -236,15 +232,17 @@
|
|
|
236
232
|
</script>
|
|
237
233
|
|
|
238
234
|
<style lang="scss" scoped>
|
|
239
|
-
@import "../../libs/
|
|
235
|
+
@import "../../libs/style/components.scss";
|
|
240
236
|
|
|
241
237
|
.fu-swiper {
|
|
242
238
|
@include flex;
|
|
243
239
|
justify-content: center;
|
|
244
240
|
align-items: center;
|
|
245
241
|
position: relative;
|
|
246
|
-
overflow: hidden;
|
|
247
242
|
transform: translateY(0);
|
|
243
|
+
/* #ifndef APP-NVUE */
|
|
244
|
+
overflow: hidden;
|
|
245
|
+
/* #endif */
|
|
248
246
|
|
|
249
247
|
&__wrap {
|
|
250
248
|
flex: 1;
|
|
@@ -256,7 +254,9 @@
|
|
|
256
254
|
&__wrap {
|
|
257
255
|
@include flex;
|
|
258
256
|
position: relative;
|
|
257
|
+
/* #ifndef APP-NVUE */
|
|
259
258
|
overflow: hidden;
|
|
259
|
+
/* #endif */
|
|
260
260
|
transition: transform 0.3s;
|
|
261
261
|
flex: 1;
|
|
262
262
|
|
|
@@ -273,7 +273,9 @@
|
|
|
273
273
|
height: 100%;
|
|
274
274
|
flex: 1;
|
|
275
275
|
transition: all 0.5s;
|
|
276
|
+
/* #ifndef APP-NVUE */
|
|
276
277
|
overflow: hidden;
|
|
278
|
+
/* #endif */
|
|
277
279
|
box-sizing: content-box;
|
|
278
280
|
position: relative;
|
|
279
281
|
}
|