@kengic/uni 0.5.1 → 0.5.2-beta.1
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/dist/uni/uni-ui/uni-badge/uni-badge.vue +222 -219
- package/dist/uni/uni-ui/uni-breadcrumb/uni-breadcrumb.vue +29 -29
- package/dist/uni/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue +88 -88
- package/dist/uni/uni-ui/uni-calendar/calendar.js +936 -532
- package/dist/uni/uni-ui/uni-calendar/i18n/en.json +10 -10
- package/dist/uni/uni-ui/uni-calendar/i18n/index.js +8 -7
- package/dist/uni/uni-ui/uni-calendar/i18n/zh-Hans.json +10 -10
- package/dist/uni/uni-ui/uni-calendar/i18n/zh-Hant.json +10 -10
- package/dist/uni/uni-ui/uni-calendar/uni-calendar-item.vue +190 -168
- package/dist/uni/uni-ui/uni-calendar/uni-calendar.vue +459 -459
- package/dist/uni/uni-ui/uni-calendar/util.js +324 -340
- package/dist/uni/uni-ui/uni-card/uni-card.vue +8 -1
- package/dist/uni/uni-ui/uni-col/uni-col.vue +294 -287
- package/dist/uni/uni-ui/uni-collapse/uni-collapse.vue +139 -140
- package/dist/uni/uni-ui/uni-collapse-item/uni-collapse-item.vue +381 -378
- package/dist/uni/uni-ui/uni-combox/uni-combox.vue +280 -272
- package/dist/uni/uni-ui/uni-countdown/i18n/en.json +4 -4
- package/dist/uni/uni-ui/uni-countdown/i18n/index.js +8 -7
- package/dist/uni/uni-ui/uni-countdown/i18n/zh-Hans.json +4 -4
- package/dist/uni/uni-ui/uni-countdown/i18n/zh-Hant.json +4 -4
- package/dist/uni/uni-ui/uni-countdown/uni-countdown.vue +249 -257
- package/dist/uni/uni-ui/uni-data-checkbox/uni-data-checkbox.vue +832 -813
- package/dist/uni/uni-ui/uni-data-picker/keypress.js +42 -42
- package/dist/uni/uni-ui/uni-data-picker/uni-data-picker.vue +535 -516
- package/dist/uni/uni-ui/uni-data-pickerview/uni-data-picker.js +623 -618
- package/dist/uni/uni-ui/uni-data-pickerview/uni-data-pickerview.vue +293 -288
- package/dist/uni/uni-ui/uni-data-select/uni-data-select.vue +495 -509
- package/dist/uni/uni-ui/uni-dateformat/date-format.js +181 -184
- package/dist/uni/uni-ui/uni-dateformat/uni-dateformat.vue +81 -82
- package/dist/uni/uni-ui/uni-datetime-picker/calendar-item.vue +176 -170
- package/dist/uni/uni-ui/uni-datetime-picker/calendar.vue +926 -920
- package/dist/uni/uni-ui/uni-datetime-picker/i18n/en.json +20 -20
- package/dist/uni/uni-ui/uni-datetime-picker/i18n/index.js +8 -7
- package/dist/uni/uni-ui/uni-datetime-picker/i18n/zh-Hans.json +21 -21
- package/dist/uni/uni-ui/uni-datetime-picker/i18n/zh-Hant.json +21 -21
- package/dist/uni/uni-ui/uni-datetime-picker/time-picker.vue +921 -926
- package/dist/uni/uni-ui/uni-datetime-picker/uni-datetime-picker.vue +1059 -1012
- package/dist/uni/uni-ui/uni-datetime-picker/util.js +366 -377
- package/dist/uni/uni-ui/uni-drawer/keypress.js +42 -42
- package/dist/uni/uni-ui/uni-drawer/uni-drawer.vue +176 -167
- package/dist/uni/uni-ui/uni-easyinput/common.js +40 -42
- package/dist/uni/uni-ui/uni-easyinput/uni-easyinput.vue +628 -547
- package/dist/uni/uni-ui/uni-fab/uni-fab.vue +507 -483
- package/dist/uni/uni-ui/uni-fav/i18n/en.json +2 -2
- package/dist/uni/uni-ui/uni-fav/i18n/index.js +8 -7
- package/dist/uni/uni-ui/uni-fav/i18n/zh-Hans.json +2 -2
- package/dist/uni/uni-ui/uni-fav/i18n/zh-Hant.json +2 -2
- package/dist/uni/uni-ui/uni-fav/uni-fav.vue +155 -147
- package/dist/uni/uni-ui/uni-file-picker/choose-and-upload-file.js +172 -198
- package/dist/uni/uni-ui/uni-file-picker/uni-file-picker.vue +636 -634
- package/dist/uni/uni-ui/uni-file-picker/upload-file.vue +294 -293
- package/dist/uni/uni-ui/uni-file-picker/upload-image.vue +267 -270
- package/dist/uni/uni-ui/uni-file-picker/utils.js +81 -82
- package/dist/uni/uni-ui/uni-forms/uni-forms.vue +360 -372
- package/dist/uni/uni-ui/uni-forms/utils.js +170 -174
- package/dist/uni/uni-ui/uni-forms/validate.js +447 -456
- package/dist/uni/uni-ui/uni-forms-item/uni-forms-item.vue +497 -497
- package/dist/uni/uni-ui/uni-goods-nav/i18n/en.json +4 -4
- package/dist/uni/uni-ui/uni-goods-nav/i18n/index.js +8 -7
- package/dist/uni/uni-ui/uni-goods-nav/i18n/zh-Hans.json +4 -4
- package/dist/uni/uni-ui/uni-goods-nav/i18n/zh-Hant.json +4 -4
- package/dist/uni/uni-ui/uni-goods-nav/uni-goods-nav.vue +238 -222
- package/dist/uni/uni-ui/uni-grid/uni-grid.vue +134 -134
- package/dist/uni/uni-ui/uni-grid-item/uni-grid-item.vue +121 -119
- package/dist/uni/uni-ui/uni-group/uni-group.vue +121 -121
- package/dist/uni/uni-ui/uni-icons/icons.js +1170 -1168
- package/dist/uni/uni-ui/uni-icons/uni-icons.vue +91 -86
- package/dist/uni/uni-ui/uni-icons/uniicons.css +166 -166
- package/dist/uni/uni-ui/uni-indexed-list/uni-indexed-list-item.vue +129 -129
- package/dist/uni/uni-ui/uni-indexed-list/uni-indexed-list.vue +352 -347
- package/dist/uni/uni-ui/uni-link/uni-link.vue +134 -119
- package/dist/uni/uni-ui/uni-list/uni-list.vue +119 -110
- package/dist/uni/uni-ui/uni-list/uni-refresh.vue +14 -14
- package/dist/uni/uni-ui/uni-list/uni-refresh.wxs +14 -14
- package/dist/uni/uni-ui/uni-list-ad/uni-list-ad.vue +101 -95
- package/dist/uni/uni-ui/uni-list-chat/uni-list-chat.scss +18 -18
- package/dist/uni/uni-ui/uni-list-chat/uni-list-chat.vue +602 -586
- package/dist/uni/uni-ui/uni-list-item/uni-list-item.vue +507 -503
- package/dist/uni/uni-ui/uni-load-more/i18n/en.json +3 -3
- package/dist/uni/uni-ui/uni-load-more/i18n/index.js +8 -7
- package/dist/uni/uni-ui/uni-load-more/i18n/zh-Hans.json +3 -3
- package/dist/uni/uni-ui/uni-load-more/i18n/zh-Hant.json +3 -3
- package/dist/uni/uni-ui/uni-load-more/uni-load-more.vue +402 -392
- package/dist/uni/uni-ui/uni-nav-bar/uni-nav-bar.vue +328 -330
- package/dist/uni/uni-ui/uni-nav-bar/uni-status-bar.vue +17 -17
- package/dist/uni/uni-ui/uni-notice-bar/uni-notice-bar.vue +422 -401
- package/dist/uni/uni-ui/uni-number-box/uni-number-box.vue +211 -205
- package/dist/uni/uni-ui/uni-pagination/i18n/en.json +3 -3
- package/dist/uni/uni-ui/uni-pagination/i18n/es.json +3 -3
- package/dist/uni/uni-ui/uni-pagination/i18n/fr.json +3 -3
- package/dist/uni/uni-ui/uni-pagination/i18n/index.js +12 -11
- package/dist/uni/uni-ui/uni-pagination/i18n/zh-Hans.json +3 -3
- package/dist/uni/uni-ui/uni-pagination/i18n/zh-Hant.json +3 -3
- package/dist/uni/uni-ui/uni-pagination/uni-pagination.vue +450 -433
- package/dist/uni/uni-ui/uni-popup/uni-popup.vue +404 -404
- package/dist/uni/uni-ui/uni-popup-dialog/keypress.js +42 -42
- package/dist/uni/uni-ui/uni-popup-dialog/uni-popup-dialog.vue +1 -0
- package/dist/uni/uni-ui/uni-popup-message/uni-popup-message.vue +126 -125
- package/dist/uni/uni-ui/uni-popup-share/uni-popup-share.vue +172 -172
- package/dist/uni/uni-ui/uni-rate/uni-rate.vue +343 -347
- package/dist/uni/uni-ui/uni-row/uni-row.vue +180 -182
- package/dist/uni/uni-ui/uni-scss/changelog.md +11 -4
- package/dist/uni/uni-ui/uni-scss/package.json +73 -73
- package/dist/uni/uni-ui/uni-scss/readme.md +2 -1
- package/dist/uni/uni-ui/uni-scss/styles/setting/_border.scss +2 -2
- package/dist/uni/uni-ui/uni-scss/styles/setting/_color.scss +46 -47
- package/dist/uni/uni-ui/uni-scss/styles/setting/_radius.scss +49 -49
- package/dist/uni/uni-ui/uni-scss/styles/setting/_space.scss +52 -53
- package/dist/uni/uni-ui/uni-scss/styles/setting/_styles.scss +142 -147
- package/dist/uni/uni-ui/uni-scss/styles/setting/_text.scss +20 -20
- package/dist/uni/uni-ui/uni-scss/styles/setting/_variables.scss +111 -95
- package/dist/uni/uni-ui/uni-scss/styles/tools/functions.scss +28 -18
- package/dist/uni/uni-ui/uni-scss/theme.scss +10 -7
- package/dist/uni/uni-ui/uni-scss/variables.scss +42 -24
- package/dist/uni/uni-ui/uni-search-bar/i18n/en.json +3 -3
- package/dist/uni/uni-ui/uni-search-bar/i18n/index.js +8 -7
- package/dist/uni/uni-ui/uni-search-bar/i18n/zh-Hans.json +2 -2
- package/dist/uni/uni-ui/uni-search-bar/i18n/zh-Hant.json +2 -2
- package/dist/uni/uni-ui/uni-search-bar/uni-search-bar.vue +290 -281
- package/dist/uni/uni-ui/uni-section/uni-section.vue +149 -146
- package/dist/uni/uni-ui/uni-segmented-control/uni-segmented-control.vue +141 -131
- package/dist/uni/uni-ui/uni-steps/uni-steps.vue +255 -236
- package/dist/uni/uni-ui/uni-swipe-action/uni-swipe-action.vue +51 -51
- package/dist/uni/uni-ui/uni-swipe-action-item/bindingx.js +276 -282
- package/dist/uni/uni-ui/uni-swipe-action-item/isPC.js +10 -10
- package/dist/uni/uni-ui/uni-swipe-action-item/mpalipay.js +182 -187
- package/dist/uni/uni-ui/uni-swipe-action-item/mpother.js +235 -244
- package/dist/uni/uni-ui/uni-swipe-action-item/mpwxs.js +70 -75
- package/dist/uni/uni-ui/uni-swipe-action-item/render.js +238 -247
- package/dist/uni/uni-ui/uni-swipe-action-item/uni-swipe-action-item.vue +387 -313
- package/dist/uni/uni-ui/uni-swipe-action-item/wx.wxs +206 -215
- package/dist/uni/uni-ui/uni-swiper-dot/uni-swiper-dot.vue +241 -197
- package/dist/uni/uni-ui/uni-table/uni-table.vue +445 -447
- package/dist/uni/uni-ui/uni-tag/uni-tag.vue +234 -244
- package/dist/uni/uni-ui/uni-tbody/uni-tbody.vue +20 -23
- package/dist/uni/uni-ui/uni-td/uni-td.vue +79 -80
- package/dist/uni/uni-ui/uni-th/filter-dropdown.vue +510 -503
- package/dist/uni/uni-ui/uni-th/uni-th.vue +289 -273
- package/dist/uni/uni-ui/uni-thead/uni-thead.vue +115 -114
- package/dist/uni/uni-ui/uni-title/uni-title.vue +151 -154
- package/dist/uni/uni-ui/uni-tooltip/uni-tooltip.vue +55 -60
- package/dist/uni/uni-ui/uni-tr/table-checkbox.vue +162 -163
- package/dist/uni/uni-ui/uni-tr/uni-tr.vue +158 -157
- package/dist/uni/uni-ui/uni-transition/createAnimation.js +130 -113
- package/dist/uni/uni-ui/uni-transition/uni-transition.vue +274 -272
- package/package.json +1 -1
|
@@ -1,347 +1,421 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
2
|
+
<!-- 在微信小程序 app vue端 h5 使用wxs 实现-->
|
|
3
|
+
<!-- #ifdef APP-VUE || MP-WEIXIN || H5 -->
|
|
4
|
+
<view class="uni-swipe">
|
|
5
|
+
<!-- #ifdef MP-WEIXIN || VUE3 -->
|
|
6
|
+
<view
|
|
7
|
+
class="uni-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"
|
|
14
|
+
@touchend="wxsswipe.touchend"
|
|
15
|
+
>
|
|
16
|
+
<!-- #endif -->
|
|
17
|
+
<!-- #ifndef MP-WEIXIN || VUE3 -->
|
|
18
|
+
<view
|
|
19
|
+
class="uni-swipe_box"
|
|
20
|
+
:change:prop="renderswipe.showWatch"
|
|
21
|
+
:prop="is_show"
|
|
22
|
+
:data-threshold="threshold"
|
|
23
|
+
:data-disabled="disabled + ''"
|
|
24
|
+
@touchstart="renderswipe.touchstart"
|
|
25
|
+
@touchmove="renderswipe.touchmove"
|
|
26
|
+
@touchend="renderswipe.touchend"
|
|
27
|
+
>
|
|
28
|
+
<!-- #endif -->
|
|
29
|
+
<!-- 在微信小程序 app vue端 h5 使用wxs 实现-->
|
|
30
|
+
<view class="uni-swipe_button-group button-group--left">
|
|
31
|
+
<slot name="left">
|
|
32
|
+
<view
|
|
33
|
+
v-for="(item, index) in leftOptions"
|
|
34
|
+
:key="index"
|
|
35
|
+
:style="{
|
|
36
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
|
|
37
|
+
}"
|
|
38
|
+
class="uni-swipe_button button-hock"
|
|
39
|
+
@touchstart="appTouchStart"
|
|
40
|
+
@touchend="appTouchEnd($event, index, item, 'left')"
|
|
41
|
+
@click.stop="onClickForPC(index, item, 'left')"
|
|
42
|
+
>
|
|
43
|
+
<text
|
|
44
|
+
class="uni-swipe_button-text"
|
|
45
|
+
:style="{
|
|
46
|
+
color: item.style && item.style.color ? item.style.color : '#FFFFFF',
|
|
47
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px',
|
|
48
|
+
}"
|
|
49
|
+
>{{ item.text }}</text
|
|
50
|
+
>
|
|
51
|
+
</view>
|
|
52
|
+
</slot>
|
|
53
|
+
</view>
|
|
54
|
+
<view class="uni-swipe_text--center">
|
|
55
|
+
<slot></slot>
|
|
56
|
+
</view>
|
|
57
|
+
<view class="uni-swipe_button-group button-group--right">
|
|
58
|
+
<slot name="right">
|
|
59
|
+
<view
|
|
60
|
+
v-for="(item, index) in rightOptions"
|
|
61
|
+
:key="index"
|
|
62
|
+
:style="{
|
|
63
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
|
|
64
|
+
}"
|
|
65
|
+
class="uni-swipe_button button-hock"
|
|
66
|
+
@touchstart="appTouchStart"
|
|
67
|
+
@touchend="appTouchEnd($event, index, item, 'right')"
|
|
68
|
+
@click.stop="onClickForPC(index, item, 'right')"
|
|
69
|
+
><text
|
|
70
|
+
class="uni-swipe_button-text"
|
|
71
|
+
:style="{
|
|
72
|
+
color: item.style && item.style.color ? item.style.color : '#FFFFFF',
|
|
73
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px',
|
|
74
|
+
}"
|
|
75
|
+
>{{ item.text }}</text
|
|
76
|
+
>
|
|
77
|
+
</view>
|
|
78
|
+
</slot>
|
|
79
|
+
</view>
|
|
80
|
+
</view>
|
|
81
|
+
</view>
|
|
82
|
+
<!-- #ifdef MP-WEIXIN || VUE3 -->
|
|
83
|
+
</view>
|
|
84
|
+
<!-- #endif -->
|
|
85
|
+
<!-- #endif -->
|
|
86
|
+
<!-- app nvue端 使用 bindingx -->
|
|
87
|
+
<!-- #ifdef APP-NVUE -->
|
|
88
|
+
<view ref="selector-box--hock" class="uni-swipe" @horizontalpan="touchstart" @touchend="touchend">
|
|
89
|
+
<view ref="selector-left-button--hock" class="uni-swipe_button-group button-group--left">
|
|
90
|
+
<slot name="left">
|
|
91
|
+
<view
|
|
92
|
+
v-for="(item, index) in leftOptions"
|
|
93
|
+
:key="index"
|
|
94
|
+
:style="{
|
|
95
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
|
|
96
|
+
}"
|
|
97
|
+
class="uni-swipe_button button-hock"
|
|
98
|
+
@click.stop="onClick(index, item, 'left')"
|
|
99
|
+
><text
|
|
100
|
+
class="uni-swipe_button-text"
|
|
101
|
+
:style="{
|
|
102
|
+
color: item.style && item.style.color ? item.style.color : '#FFFFFF',
|
|
103
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px',
|
|
104
|
+
}"
|
|
105
|
+
>{{ item.text }}</text
|
|
106
|
+
>
|
|
107
|
+
</view>
|
|
108
|
+
</slot>
|
|
109
|
+
</view>
|
|
110
|
+
<view ref="selector-right-button--hock" class="uni-swipe_button-group button-group--right">
|
|
111
|
+
<slot name="right">
|
|
112
|
+
<view
|
|
113
|
+
v-for="(item, index) in rightOptions"
|
|
114
|
+
:key="index"
|
|
115
|
+
:style="{
|
|
116
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
|
|
117
|
+
}"
|
|
118
|
+
class="uni-swipe_button button-hock"
|
|
119
|
+
@click.stop="onClick(index, item, 'right')"
|
|
120
|
+
><text
|
|
121
|
+
class="uni-swipe_button-text"
|
|
122
|
+
:style="{
|
|
123
|
+
color: item.style && item.style.color ? item.style.color : '#FFFFFF',
|
|
124
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px',
|
|
125
|
+
}"
|
|
126
|
+
>{{ item.text }}</text
|
|
127
|
+
>
|
|
128
|
+
</view>
|
|
129
|
+
</slot>
|
|
130
|
+
</view>
|
|
131
|
+
<view ref="selector-content--hock" class="uni-swipe_box">
|
|
132
|
+
<slot></slot>
|
|
133
|
+
</view>
|
|
134
|
+
</view>
|
|
135
|
+
<!-- #endif -->
|
|
136
|
+
<!-- 其他平台使用 js ,长列表性能可能会有影响-->
|
|
137
|
+
<!-- #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO || MP-QQ -->
|
|
138
|
+
<view class="uni-swipe">
|
|
139
|
+
<view class="uni-swipe_box" @touchstart="touchstart" @touchmove="touchmove" @touchend="touchend" :style="{ transform: moveLeft }" :class="{ ani: ani }">
|
|
140
|
+
<view class="uni-swipe_button-group button-group--left" :class="[elClass]">
|
|
141
|
+
<slot name="left">
|
|
142
|
+
<view
|
|
143
|
+
v-for="(item, index) in leftOptions"
|
|
144
|
+
:key="index"
|
|
145
|
+
:style="{
|
|
146
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
|
|
147
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px',
|
|
148
|
+
}"
|
|
149
|
+
class="uni-swipe_button button-hock"
|
|
150
|
+
@touchstart="appTouchStart"
|
|
151
|
+
@touchend="appTouchEnd($event, index, item, 'left')"
|
|
152
|
+
><text class="uni-swipe_button-text" :style="{ color: item.style && item.style.color ? item.style.color : '#FFFFFF' }">{{
|
|
153
|
+
item.text
|
|
154
|
+
}}</text>
|
|
155
|
+
</view>
|
|
156
|
+
</slot>
|
|
157
|
+
</view>
|
|
158
|
+
<slot></slot>
|
|
159
|
+
<view class="uni-swipe_button-group button-group--right" :class="[elClass]">
|
|
160
|
+
<slot name="right">
|
|
161
|
+
<view
|
|
162
|
+
v-for="(item, index) in rightOptions"
|
|
163
|
+
:key="index"
|
|
164
|
+
:style="{
|
|
165
|
+
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
|
|
166
|
+
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px',
|
|
167
|
+
}"
|
|
168
|
+
@touchstart="appTouchStart"
|
|
169
|
+
@touchend="appTouchEnd($event, index, item, 'right')"
|
|
170
|
+
class="uni-swipe_button button-hock"
|
|
171
|
+
><text class="uni-swipe_button-text" :style="{ color: item.style && item.style.color ? item.style.color : '#FFFFFF' }">{{
|
|
172
|
+
item.text
|
|
173
|
+
}}</text>
|
|
174
|
+
</view>
|
|
175
|
+
</slot>
|
|
176
|
+
</view>
|
|
177
|
+
</view>
|
|
178
|
+
</view>
|
|
179
|
+
<!-- #endif -->
|
|
105
180
|
</template>
|
|
106
|
-
<script src=
|
|
181
|
+
<script src="./wx.wxs" module="wxsswipe" lang="wxs"></script>
|
|
107
182
|
|
|
108
183
|
<script module="renderswipe" lang="renderjs">
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
184
|
+
import render from './render.js'
|
|
185
|
+
export default {
|
|
186
|
+
mounted(e, ins, owner) {
|
|
187
|
+
this.state = {}
|
|
188
|
+
},
|
|
189
|
+
methods: {
|
|
190
|
+
showWatch(newVal, oldVal, ownerInstance, instance) {
|
|
191
|
+
render.showWatch(newVal, oldVal, ownerInstance, instance, this)
|
|
192
|
+
},
|
|
193
|
+
touchstart(e, ownerInstance) {
|
|
194
|
+
render.touchstart(e, ownerInstance, this)
|
|
195
|
+
},
|
|
196
|
+
touchmove(e, ownerInstance) {
|
|
197
|
+
render.touchmove(e, ownerInstance, this)
|
|
198
|
+
},
|
|
199
|
+
touchend(e, ownerInstance) {
|
|
200
|
+
render.touchend(e, ownerInstance, this)
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
129
204
|
</script>
|
|
130
205
|
<script>
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* SwipeActionItem 滑动操作子组件
|
|
137
|
-
* @description 通过滑动触发选项的容器
|
|
138
|
-
* @tutorial https://ext.dcloud.net.cn/plugin?id=181
|
|
139
|
-
* @property {Boolean} show = [left|right|none] 开启关闭组件,auto-close = false 时生效
|
|
140
|
-
* @property {Boolean} disabled = [true|false] 是否禁止滑动
|
|
141
|
-
* @property {Boolean} autoClose = [true|false] 滑动打开当前组件,是否关闭其他组件
|
|
142
|
-
* @property {Number} threshold 滑动缺省值
|
|
143
|
-
* @property {Array} leftOptions 左侧选项内容及样式
|
|
144
|
-
* @property {Array} rgihtOptions 右侧选项内容及样式
|
|
145
|
-
* @event {Function} click 点击选项按钮时触发事件,e = {content,index} ,content(点击内容)、index(下标)
|
|
146
|
-
* @event {Function} change 组件打开或关闭时触发,left\right\none
|
|
147
|
-
*/
|
|
206
|
+
import mpwxs from './mpwxs';
|
|
207
|
+
import bindingx from './bindingx.js';
|
|
208
|
+
import mpother from './mpother';
|
|
148
209
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
210
|
+
/**
|
|
211
|
+
* SwipeActionItem 滑动操作子组件
|
|
212
|
+
* @description 通过滑动触发选项的容器
|
|
213
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=181
|
|
214
|
+
* @property {Boolean} show = [left|right|none] 开启关闭组件,auto-close = false 时生效
|
|
215
|
+
* @property {Boolean} disabled = [true|false] 是否禁止滑动
|
|
216
|
+
* @property {Boolean} autoClose = [true|false] 滑动打开当前组件,是否关闭其他组件
|
|
217
|
+
* @property {Number} threshold 滑动缺省值
|
|
218
|
+
* @property {Array} leftOptions 左侧选项内容及样式
|
|
219
|
+
* @property {Array} rgihtOptions 右侧选项内容及样式
|
|
220
|
+
* @event {Function} click 点击选项按钮时触发事件,e = {content,index} ,content(点击内容)、index(下标)
|
|
221
|
+
* @event {Function} change 组件打开或关闭时触发,left\right\none
|
|
222
|
+
*/
|
|
158
223
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
224
|
+
export default {
|
|
225
|
+
mixins: [mpwxs, bindingx, mpother],
|
|
226
|
+
emits: ['click', 'change'],
|
|
227
|
+
props: {
|
|
228
|
+
// 控制开关
|
|
229
|
+
show: {
|
|
230
|
+
type: String,
|
|
231
|
+
default: 'none',
|
|
232
|
+
},
|
|
164
233
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
234
|
+
// 禁用
|
|
235
|
+
disabled: {
|
|
236
|
+
type: Boolean,
|
|
237
|
+
default: false,
|
|
238
|
+
},
|
|
170
239
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
240
|
+
// 是否自动关闭
|
|
241
|
+
autoClose: {
|
|
242
|
+
type: Boolean,
|
|
243
|
+
default: true,
|
|
244
|
+
},
|
|
176
245
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
},
|
|
246
|
+
// 滑动缺省距离
|
|
247
|
+
threshold: {
|
|
248
|
+
type: Number,
|
|
249
|
+
default: 20,
|
|
250
|
+
},
|
|
184
251
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
252
|
+
// 左侧按钮内容
|
|
253
|
+
leftOptions: {
|
|
254
|
+
type: Array,
|
|
255
|
+
default() {
|
|
256
|
+
return [];
|
|
257
|
+
},
|
|
258
|
+
},
|
|
192
259
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
260
|
+
// 右侧按钮内容
|
|
261
|
+
rightOptions: {
|
|
262
|
+
type: Array,
|
|
263
|
+
default() {
|
|
264
|
+
return [];
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
// #ifndef VUE3
|
|
269
|
+
// TODO vue2
|
|
270
|
+
destroyed() {
|
|
271
|
+
if (this.__isUnmounted) return;
|
|
272
|
+
this.uninstall();
|
|
273
|
+
},
|
|
274
|
+
// #endif
|
|
275
|
+
// #ifdef VUE3
|
|
276
|
+
// TODO vue3
|
|
277
|
+
unmounted() {
|
|
278
|
+
this.__isUnmounted = true;
|
|
279
|
+
this.uninstall();
|
|
280
|
+
},
|
|
281
|
+
// #endif
|
|
208
282
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
283
|
+
methods: {
|
|
284
|
+
uninstall() {
|
|
285
|
+
if (this.swipeaction) {
|
|
286
|
+
this.swipeaction.children.forEach((item, index) => {
|
|
287
|
+
if (item === this) {
|
|
288
|
+
this.swipeaction.children.splice(index, 1);
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
/**
|
|
294
|
+
* 获取父元素实例
|
|
295
|
+
*/
|
|
296
|
+
getSwipeAction(name = 'uniSwipeAction') {
|
|
297
|
+
let parent = this.$parent;
|
|
298
|
+
let parentName = parent.$options.name;
|
|
299
|
+
while (parentName !== name) {
|
|
300
|
+
parent = parent.$parent;
|
|
301
|
+
if (!parent) return false;
|
|
302
|
+
parentName = parent.$options.name;
|
|
303
|
+
}
|
|
304
|
+
return parent;
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
};
|
|
234
308
|
</script>
|
|
235
309
|
<style lang="scss">
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
310
|
+
.uni-swipe {
|
|
311
|
+
position: relative;
|
|
312
|
+
/* #ifndef APP-NVUE */
|
|
313
|
+
overflow: hidden;
|
|
314
|
+
/* #endif */
|
|
315
|
+
}
|
|
242
316
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
317
|
+
.uni-swipe_box {
|
|
318
|
+
/* #ifndef APP-NVUE */
|
|
319
|
+
display: flex;
|
|
320
|
+
flex-shrink: 0;
|
|
321
|
+
// touch-action: none;
|
|
322
|
+
/* #endif */
|
|
323
|
+
position: relative;
|
|
324
|
+
}
|
|
251
325
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
326
|
+
.uni-swipe_content {
|
|
327
|
+
// border: 1px red solid;
|
|
328
|
+
}
|
|
255
329
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
330
|
+
.uni-swipe_text--center {
|
|
331
|
+
width: 100%;
|
|
332
|
+
/* #ifndef APP-NVUE */
|
|
333
|
+
cursor: grab;
|
|
334
|
+
/* #endif */
|
|
335
|
+
}
|
|
262
336
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
337
|
+
.uni-swipe_button-group {
|
|
338
|
+
/* #ifndef APP-NVUE */
|
|
339
|
+
box-sizing: border-box;
|
|
340
|
+
display: flex;
|
|
341
|
+
/* #endif */
|
|
342
|
+
flex-direction: row;
|
|
343
|
+
position: absolute;
|
|
344
|
+
top: 0;
|
|
345
|
+
bottom: 0;
|
|
346
|
+
/* #ifdef H5 */
|
|
347
|
+
cursor: pointer;
|
|
348
|
+
/* #endif */
|
|
349
|
+
}
|
|
276
350
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
351
|
+
.button-group--left {
|
|
352
|
+
left: 0;
|
|
353
|
+
transform: translateX(-100%);
|
|
354
|
+
}
|
|
281
355
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
356
|
+
.button-group--right {
|
|
357
|
+
right: 0;
|
|
358
|
+
transform: translateX(100%);
|
|
359
|
+
}
|
|
286
360
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
361
|
+
.uni-swipe_button {
|
|
362
|
+
/* #ifdef APP-NVUE */
|
|
363
|
+
flex: 1;
|
|
364
|
+
/* #endif */
|
|
365
|
+
/* #ifndef APP-NVUE */
|
|
366
|
+
display: flex;
|
|
367
|
+
/* #endif */
|
|
368
|
+
flex-direction: row;
|
|
369
|
+
justify-content: center;
|
|
370
|
+
align-items: center;
|
|
371
|
+
padding: 0 20px;
|
|
372
|
+
}
|
|
299
373
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
374
|
+
.uni-swipe_button-text {
|
|
375
|
+
/* #ifndef APP-NVUE */
|
|
376
|
+
flex-shrink: 0;
|
|
377
|
+
/* #endif */
|
|
378
|
+
font-size: 14px;
|
|
379
|
+
}
|
|
306
380
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
381
|
+
.ani {
|
|
382
|
+
transition-property: transform;
|
|
383
|
+
transition-duration: 0.3s;
|
|
384
|
+
transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
|
|
385
|
+
}
|
|
312
386
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
387
|
+
/* #ifdef MP-ALIPAY */
|
|
388
|
+
.movable-area {
|
|
389
|
+
/* width: 100%; */
|
|
390
|
+
height: 45px;
|
|
391
|
+
}
|
|
318
392
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
393
|
+
.movable-view {
|
|
394
|
+
display: flex;
|
|
395
|
+
/* justify-content: center; */
|
|
396
|
+
position: relative;
|
|
397
|
+
flex: 1;
|
|
398
|
+
height: 45px;
|
|
399
|
+
z-index: 2;
|
|
400
|
+
}
|
|
327
401
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
402
|
+
.movable-view-button {
|
|
403
|
+
display: flex;
|
|
404
|
+
flex-shrink: 0;
|
|
405
|
+
flex-direction: row;
|
|
406
|
+
height: 100%;
|
|
407
|
+
background: #c0c0c0;
|
|
408
|
+
}
|
|
335
409
|
|
|
336
|
-
|
|
410
|
+
/* .transition {
|
|
337
411
|
transition: all 0.3s;
|
|
338
412
|
} */
|
|
339
413
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
414
|
+
.movable-view-box {
|
|
415
|
+
flex-shrink: 0;
|
|
416
|
+
height: 100%;
|
|
417
|
+
background-color: #fff;
|
|
418
|
+
}
|
|
345
419
|
|
|
346
|
-
|
|
420
|
+
/* #endif */
|
|
347
421
|
</style>
|