@vtj/materials 0.13.15 → 0.13.17
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/assets/antdv/index.umd.js +2 -2
- package/dist/assets/charts/index.umd.js +2 -2
- package/dist/assets/element/index.umd.js +3 -3
- package/dist/assets/icons/index.umd.js +2 -2
- package/dist/assets/ui/index.umd.js +2 -2
- package/dist/assets/uni-h5/index.umd.js +2 -2
- package/dist/assets/uni-ui/index.umd.js +2 -2
- package/dist/assets/vant/index.umd.js +2 -2
- package/dist/deps/@vtj/charts/index.umd.js +2 -2
- package/dist/deps/@vtj/icons/index.umd.js +2 -2
- package/dist/deps/@vtj/ui/index.umd.js +4 -4
- package/dist/deps/@vtj/ui/style.css +1 -1
- package/dist/deps/@vtj/utils/index.umd.js +28 -33
- package/dist/deps/@vueuse/core/index.iife.min.js +1 -1
- package/dist/deps/element-plus/index.css +1 -1
- package/dist/deps/element-plus/index.full.min.js +14 -14
- package/dist/deps/element-plus/zh-cn.js +1 -1
- package/dist/deps/uni-app/index.umd.js +1 -1
- package/dist/deps/uni-h5/index.umd.js +8 -8
- package/dist/deps/uni-h5/style.css +1 -1
- package/dist/deps/uni-h5-vue/index.umd.js +1 -1
- package/dist/deps/uni-ui/index.umd.js +6 -1
- package/dist/deps/uni-ui/style.css +1 -1
- package/dist/deps/vue/vue.global.js +88 -53
- package/dist/deps/vue/vue.global.prod.js +9 -9
- package/package.json +12 -12
- package/src/antdv/image.ts +1 -1
- package/src/element/image.ts +1 -1
- package/src/element/virtualizedTable.ts +6 -6
- package/src/manifest.json +69 -0
- package/src/pages/index.vue +2 -0
- package/src/pages.json +19 -0
- package/src/uni-ui/index.ts +88 -58
- package/src/{uni-ui/lib/uni.scss → uni.scss} +4 -0
- package/src/version.ts +2 -2
- package/src/uni-ui/lib/uni-col/uni-col.vue +0 -324
- package/src/uni-ui/lib/uni-collapse/uni-collapse.vue +0 -153
- package/src/uni-ui/lib/uni-collapse-item/uni-collapse-item.vue +0 -425
- package/src/uni-ui/lib/uni-data-picker/keypress.js +0 -45
- package/src/uni-ui/lib/uni-data-picker/uni-data-picker.vue +0 -604
- package/src/uni-ui/lib/uni-data-pickerview/uni-data-picker.js +0 -622
- package/src/uni-ui/lib/uni-data-pickerview/uni-data-pickerview.css +0 -76
- package/src/uni-ui/lib/uni-data-pickerview/uni-data-pickerview.vue +0 -335
- package/src/uni-ui/lib/uni-data-select/uni-data-select.vue +0 -590
- package/src/uni-ui/lib/uni-datetime-picker/calendar-item.vue +0 -188
- package/src/uni-ui/lib/uni-datetime-picker/calendar.vue +0 -985
- package/src/uni-ui/lib/uni-datetime-picker/i18n/en.json +0 -22
- package/src/uni-ui/lib/uni-datetime-picker/i18n/index.js +0 -8
- package/src/uni-ui/lib/uni-datetime-picker/i18n/zh-Hans.json +0 -22
- package/src/uni-ui/lib/uni-datetime-picker/i18n/zh-Hant.json +0 -22
- package/src/uni-ui/lib/uni-datetime-picker/time-picker.vue +0 -1032
- package/src/uni-ui/lib/uni-datetime-picker/uni-datetime-picker.vue +0 -1230
- package/src/uni-ui/lib/uni-datetime-picker/util.js +0 -448
- package/src/uni-ui/lib/uni-easyinput/common.js +0 -54
- package/src/uni-ui/lib/uni-easyinput/uni-easyinput.vue +0 -790
- package/src/uni-ui/lib/uni-fav/i18n/en.json +0 -4
- package/src/uni-ui/lib/uni-fav/i18n/index.js +0 -8
- package/src/uni-ui/lib/uni-fav/i18n/zh-Hans.json +0 -4
- package/src/uni-ui/lib/uni-fav/i18n/zh-Hant.json +0 -4
- package/src/uni-ui/lib/uni-fav/uni-fav.vue +0 -170
- package/src/uni-ui/lib/uni-file-picker/choose-and-upload-file.js +0 -280
- package/src/uni-ui/lib/uni-file-picker/uni-file-picker.vue +0 -668
- package/src/uni-ui/lib/uni-file-picker/upload-file.vue +0 -325
- package/src/uni-ui/lib/uni-file-picker/upload-image.vue +0 -292
- package/src/uni-ui/lib/uni-file-picker/utils.js +0 -110
- package/src/uni-ui/lib/uni-forms/uni-forms.vue +0 -416
- package/src/uni-ui/lib/uni-forms/utils.js +0 -293
- package/src/uni-ui/lib/uni-forms/validate.js +0 -486
- package/src/uni-ui/lib/uni-forms-item/uni-forms-item.vue +0 -630
- package/src/uni-ui/lib/uni-goods-nav/i18n/en.json +0 -6
- package/src/uni-ui/lib/uni-goods-nav/i18n/index.js +0 -8
- package/src/uni-ui/lib/uni-goods-nav/i18n/zh-Hans.json +0 -6
- package/src/uni-ui/lib/uni-goods-nav/i18n/zh-Hant.json +0 -6
- package/src/uni-ui/lib/uni-goods-nav/uni-goods-nav.vue +0 -231
- package/src/uni-ui/lib/uni-grid/uni-grid.vue +0 -148
- package/src/uni-ui/lib/uni-icons/uni-icons.uvue +0 -91
- package/src/uni-ui/lib/uni-icons/uni-icons.vue +0 -114
- package/src/uni-ui/lib/uni-icons/uniicons.css +0 -664
- package/src/uni-ui/lib/uni-icons/uniicons.ttf +0 -0
- package/src/uni-ui/lib/uni-icons/uniicons_file.ts +0 -664
- package/src/uni-ui/lib/uni-icons/uniicons_file_vue.js +0 -649
- package/src/uni-ui/lib/uni-indexed-list/uni-indexed-list-item.vue +0 -168
- package/src/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue +0 -404
- package/src/uni-ui/lib/uni-list/uni-list.vue +0 -123
- package/src/uni-ui/lib/uni-list/uni-refresh.vue +0 -65
- package/src/uni-ui/lib/uni-list/uni-refresh.wxs +0 -87
- package/src/uni-ui/lib/uni-load-more/i18n/en.json +0 -5
- package/src/uni-ui/lib/uni-load-more/i18n/index.js +0 -8
- package/src/uni-ui/lib/uni-load-more/i18n/zh-Hans.json +0 -5
- package/src/uni-ui/lib/uni-load-more/i18n/zh-Hant.json +0 -5
- package/src/uni-ui/lib/uni-load-more/uni-load-more.vue +0 -456
- package/src/uni-ui/lib/uni-notice-bar/uni-notice-bar.vue +0 -484
- package/src/uni-ui/lib/uni-popup/i18n/en.json +0 -7
- package/src/uni-ui/lib/uni-popup/i18n/index.js +0 -8
- package/src/uni-ui/lib/uni-popup/i18n/zh-Hans.json +0 -7
- package/src/uni-ui/lib/uni-popup/i18n/zh-Hant.json +0 -7
- package/src/uni-ui/lib/uni-popup/keypress.js +0 -45
- package/src/uni-ui/lib/uni-popup/popup.js +0 -26
- package/src/uni-ui/lib/uni-popup/uni-popup.uvue +0 -90
- package/src/uni-ui/lib/uni-popup/uni-popup.vue +0 -552
- package/src/uni-ui/lib/uni-popup-dialog/keypress.js +0 -45
- package/src/uni-ui/lib/uni-popup-dialog/uni-popup-dialog.vue +0 -324
- package/src/uni-ui/lib/uni-popup-message/uni-popup-message.vue +0 -149
- package/src/uni-ui/lib/uni-rate/uni-rate.vue +0 -380
- package/src/uni-ui/lib/uni-row/uni-row.vue +0 -193
- package/src/uni-ui/lib/uni-search-bar/i18n/en.json +0 -4
- package/src/uni-ui/lib/uni-search-bar/i18n/index.js +0 -8
- package/src/uni-ui/lib/uni-search-bar/i18n/zh-Hans.json +0 -4
- package/src/uni-ui/lib/uni-search-bar/i18n/zh-Hant.json +0 -4
- package/src/uni-ui/lib/uni-search-bar/uni-search-bar.vue +0 -339
- package/src/uni-ui/lib/uni-swipe-action-item/bindingx.js +0 -311
- package/src/uni-ui/lib/uni-swipe-action-item/isPC.js +0 -12
- package/src/uni-ui/lib/uni-swipe-action-item/mpalipay.js +0 -195
- package/src/uni-ui/lib/uni-swipe-action-item/mpother.js +0 -260
- package/src/uni-ui/lib/uni-swipe-action-item/mpwxs.js +0 -84
- package/src/uni-ui/lib/uni-swipe-action-item/render.js +0 -270
- package/src/uni-ui/lib/uni-swipe-action-item/uni-swipe-action-item.vue +0 -493
- package/src/uni-ui/lib/uni-swipe-action-item/wx.wxs +0 -341
- package/src/uni-ui/lib/uni-table/uni-table.vue +0 -496
- package/src/uni-ui/lib/uni-td/uni-td.vue +0 -99
- package/src/uni-ui/lib/uni-th/filter-dropdown.vue +0 -559
- package/src/uni-ui/lib/uni-th/uni-th.vue +0 -322
- package/src/uni-ui/lib/uni-tr/table-checkbox.vue +0 -181
- package/src/uni-ui/lib/uni-tr/uni-tr.vue +0 -208
- package/src/uni-ui/lib/uni-transition/createAnimation.js +0 -131
- package/src/uni-ui/lib/uni-transition/uni-transition.vue +0 -310
- package/src/uni-ui/polyfill.ts +0 -41
@@ -1,493 +0,0 @@
|
|
1
|
-
<template>
|
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
|
-
<!-- #endif -->
|
16
|
-
<!-- #ifndef MP-WEIXIN || VUE3 -->
|
17
|
-
<view
|
18
|
-
class="uni-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="uni-swipe_button-group button-group--left">
|
29
|
-
<slot name="left">
|
30
|
-
<view
|
31
|
-
v-for="(item, index) in leftOptions"
|
32
|
-
:key="index"
|
33
|
-
:style="{
|
34
|
-
backgroundColor:
|
35
|
-
item.style && item.style.backgroundColor
|
36
|
-
? item.style.backgroundColor
|
37
|
-
: '#C7C6CD'
|
38
|
-
}"
|
39
|
-
class="uni-swipe_button button-hock"
|
40
|
-
@touchstart.stop="appTouchStart"
|
41
|
-
@touchend.stop="appTouchEnd($event, index, item, 'left')"
|
42
|
-
@click.stop="onClickForPC(index, item, 'left')">
|
43
|
-
<text
|
44
|
-
class="uni-swipe_button-text"
|
45
|
-
:style="{
|
46
|
-
color:
|
47
|
-
item.style && item.style.color
|
48
|
-
? item.style.color
|
49
|
-
: '#FFFFFF',
|
50
|
-
fontSize:
|
51
|
-
item.style && item.style.fontSize
|
52
|
-
? item.style.fontSize
|
53
|
-
: '16px'
|
54
|
-
}"
|
55
|
-
>{{ item.text }}</text
|
56
|
-
>
|
57
|
-
</view>
|
58
|
-
</slot>
|
59
|
-
</view>
|
60
|
-
<view class="uni-swipe_text--center">
|
61
|
-
<slot></slot>
|
62
|
-
</view>
|
63
|
-
<view class="uni-swipe_button-group button-group--right">
|
64
|
-
<slot name="right">
|
65
|
-
<view
|
66
|
-
v-for="(item, index) in rightOptions"
|
67
|
-
:key="index"
|
68
|
-
:style="{
|
69
|
-
backgroundColor:
|
70
|
-
item.style && item.style.backgroundColor
|
71
|
-
? item.style.backgroundColor
|
72
|
-
: '#C7C6CD'
|
73
|
-
}"
|
74
|
-
class="uni-swipe_button button-hock"
|
75
|
-
@touchstart.stop="appTouchStart"
|
76
|
-
@touchend.stop="appTouchEnd($event, index, item, 'right')"
|
77
|
-
@click.stop="onClickForPC(index, item, 'right')"
|
78
|
-
><text
|
79
|
-
class="uni-swipe_button-text"
|
80
|
-
:style="{
|
81
|
-
color:
|
82
|
-
item.style && item.style.color
|
83
|
-
? item.style.color
|
84
|
-
: '#FFFFFF',
|
85
|
-
fontSize:
|
86
|
-
item.style && item.style.fontSize
|
87
|
-
? item.style.fontSize
|
88
|
-
: '16px'
|
89
|
-
}"
|
90
|
-
>{{ item.text }}</text
|
91
|
-
>
|
92
|
-
</view>
|
93
|
-
</slot>
|
94
|
-
</view>
|
95
|
-
</view>
|
96
|
-
</view>
|
97
|
-
<!-- #endif -->
|
98
|
-
<!-- app nvue端 使用 bindingx -->
|
99
|
-
<!-- #ifdef APP-NVUE -->
|
100
|
-
<!-- <view
|
101
|
-
ref="selector-box--hock"
|
102
|
-
class="uni-swipe"
|
103
|
-
@horizontalpan="touchstart"
|
104
|
-
@touchend="touchend">
|
105
|
-
<view
|
106
|
-
ref="selector-left-button--hock"
|
107
|
-
class="uni-swipe_button-group button-group--left">
|
108
|
-
<slot name="left">
|
109
|
-
<view
|
110
|
-
v-for="(item, index) in leftOptions"
|
111
|
-
:key="index"
|
112
|
-
:style="{
|
113
|
-
backgroundColor:
|
114
|
-
item.style && item.style.backgroundColor
|
115
|
-
? item.style.backgroundColor
|
116
|
-
: '#C7C6CD'
|
117
|
-
}"
|
118
|
-
class="uni-swipe_button button-hock"
|
119
|
-
@click.stop="onClick(index, item, 'left')">
|
120
|
-
<text
|
121
|
-
class="uni-swipe_button-text"
|
122
|
-
:style="{
|
123
|
-
color:
|
124
|
-
item.style && item.style.color ? item.style.color : '#FFFFFF',
|
125
|
-
fontSize:
|
126
|
-
item.style && item.style.fontSize
|
127
|
-
? item.style.fontSize
|
128
|
-
: '16px'
|
129
|
-
}">
|
130
|
-
{{ item.text }}
|
131
|
-
</text>
|
132
|
-
</view>
|
133
|
-
</slot>
|
134
|
-
</view>
|
135
|
-
<view
|
136
|
-
ref="selector-right-button--hock"
|
137
|
-
class="uni-swipe_button-group button-group--right">
|
138
|
-
<slot name="right">
|
139
|
-
<view
|
140
|
-
v-for="(item, index) in rightOptions"
|
141
|
-
:key="index"
|
142
|
-
:style="{
|
143
|
-
backgroundColor:
|
144
|
-
item.style && item.style.backgroundColor
|
145
|
-
? item.style.backgroundColor
|
146
|
-
: '#C7C6CD'
|
147
|
-
}"
|
148
|
-
class="uni-swipe_button button-hock"
|
149
|
-
@click.stop="onClick(index, item, 'right')"
|
150
|
-
><text
|
151
|
-
class="uni-swipe_button-text"
|
152
|
-
:style="{
|
153
|
-
color:
|
154
|
-
item.style && item.style.color ? item.style.color : '#FFFFFF',
|
155
|
-
fontSize:
|
156
|
-
item.style && item.style.fontSize
|
157
|
-
? item.style.fontSize
|
158
|
-
: '16px'
|
159
|
-
}"
|
160
|
-
>{{ item.text }}</text
|
161
|
-
>
|
162
|
-
</view>
|
163
|
-
</slot>
|
164
|
-
</view>
|
165
|
-
<view ref="selector-content--hock" class="uni-swipe_box">
|
166
|
-
<slot></slot>
|
167
|
-
</view>
|
168
|
-
</view> -->
|
169
|
-
<!-- #endif -->
|
170
|
-
<!-- 其他平台使用 js ,长列表性能可能会有影响-->
|
171
|
-
<!-- #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO || MP-QQ -->
|
172
|
-
<!-- <view class="uni-swipe">
|
173
|
-
<view
|
174
|
-
class="uni-swipe_box"
|
175
|
-
@touchstart="touchstart"
|
176
|
-
@touchmove="touchmove"
|
177
|
-
@touchend="touchend"
|
178
|
-
:style="{ transform: moveLeft }"
|
179
|
-
:class="{ ani: ani }">
|
180
|
-
<view
|
181
|
-
class="uni-swipe_button-group button-group--left"
|
182
|
-
:class="[elClass]">
|
183
|
-
<slot name="left">
|
184
|
-
<view
|
185
|
-
v-for="(item, index) in leftOptions"
|
186
|
-
:key="index"
|
187
|
-
:style="{
|
188
|
-
backgroundColor:
|
189
|
-
item.style && item.style.backgroundColor
|
190
|
-
? item.style.backgroundColor
|
191
|
-
: '#C7C6CD',
|
192
|
-
fontSize:
|
193
|
-
item.style && item.style.fontSize
|
194
|
-
? item.style.fontSize
|
195
|
-
: '16px'
|
196
|
-
}"
|
197
|
-
class="uni-swipe_button button-hock"
|
198
|
-
@touchstart.stop="appTouchStart"
|
199
|
-
@touchend.stop="appTouchEnd($event, index, item, 'left')"
|
200
|
-
><text
|
201
|
-
class="uni-swipe_button-text"
|
202
|
-
:style="{
|
203
|
-
color:
|
204
|
-
item.style && item.style.color
|
205
|
-
? item.style.color
|
206
|
-
: '#FFFFFF'
|
207
|
-
}"
|
208
|
-
>{{ item.text }}</text
|
209
|
-
>
|
210
|
-
</view>
|
211
|
-
</slot>
|
212
|
-
</view>
|
213
|
-
<slot></slot>
|
214
|
-
<view
|
215
|
-
class="uni-swipe_button-group button-group--right"
|
216
|
-
:class="[elClass]">
|
217
|
-
<slot name="right">
|
218
|
-
<view
|
219
|
-
v-for="(item, index) in rightOptions"
|
220
|
-
:key="index"
|
221
|
-
:style="{
|
222
|
-
backgroundColor:
|
223
|
-
item.style && item.style.backgroundColor
|
224
|
-
? item.style.backgroundColor
|
225
|
-
: '#C7C6CD',
|
226
|
-
fontSize:
|
227
|
-
item.style && item.style.fontSize
|
228
|
-
? item.style.fontSize
|
229
|
-
: '16px'
|
230
|
-
}"
|
231
|
-
@touchstart.stop="appTouchStart"
|
232
|
-
@touchend.stop="appTouchEnd($event, index, item, 'right')"
|
233
|
-
class="uni-swipe_button button-hock"
|
234
|
-
><text
|
235
|
-
class="uni-swipe_button-text"
|
236
|
-
:style="{
|
237
|
-
color:
|
238
|
-
item.style && item.style.color
|
239
|
-
? item.style.color
|
240
|
-
: '#FFFFFF'
|
241
|
-
}"
|
242
|
-
>{{ item.text }}</text
|
243
|
-
>
|
244
|
-
</view>
|
245
|
-
</slot>
|
246
|
-
</view>
|
247
|
-
</view>
|
248
|
-
</view> -->
|
249
|
-
<!-- #endif -->
|
250
|
-
</view>
|
251
|
-
</template>
|
252
|
-
<!-- <script src="./wx.wxs" module="wxsswipe" lang="wxs"></script> -->
|
253
|
-
|
254
|
-
<!-- <script module="renderswipe" lang="renderjs">
|
255
|
-
import render from './render.js'
|
256
|
-
export default {
|
257
|
-
mounted(e, ins, owner) {
|
258
|
-
this.state = {}
|
259
|
-
},
|
260
|
-
methods: {
|
261
|
-
showWatch(newVal, oldVal, ownerInstance, instance) {
|
262
|
-
render.showWatch(newVal, oldVal, ownerInstance, instance, this)
|
263
|
-
},
|
264
|
-
touchstart(e, ownerInstance) {
|
265
|
-
render.touchstart(e, ownerInstance, this)
|
266
|
-
},
|
267
|
-
touchmove(e, ownerInstance) {
|
268
|
-
render.touchmove(e, ownerInstance, this)
|
269
|
-
},
|
270
|
-
touchend(e, ownerInstance) {
|
271
|
-
render.touchend(e, ownerInstance, this)
|
272
|
-
}
|
273
|
-
}
|
274
|
-
}
|
275
|
-
</script> -->
|
276
|
-
<script>
|
277
|
-
import mpwxs from './mpwxs';
|
278
|
-
import bindingx from './bindingx.js';
|
279
|
-
import mpother from './mpother';
|
280
|
-
|
281
|
-
/**
|
282
|
-
* SwipeActionItem 滑动操作子组件
|
283
|
-
* @description 通过滑动触发选项的容器
|
284
|
-
* @tutorial https://ext.dcloud.net.cn/plugin?id=181
|
285
|
-
* @property {Boolean} show = [left|right|none] 开启关闭组件,auto-close = false 时生效
|
286
|
-
* @property {Boolean} disabled = [true|false] 是否禁止滑动
|
287
|
-
* @property {Boolean} autoClose = [true|false] 滑动打开当前组件,是否关闭其他组件
|
288
|
-
* @property {Number} threshold 滑动缺省值
|
289
|
-
* @property {Array} leftOptions 左侧选项内容及样式
|
290
|
-
* @property {Array} rightOptions 右侧选项内容及样式
|
291
|
-
* @event {Function} click 点击选项按钮时触发事件,e = {content,index} ,content(点击内容)、index(下标)
|
292
|
-
* @event {Function} change 组件打开或关闭时触发,left\right\none
|
293
|
-
*/
|
294
|
-
|
295
|
-
export default {
|
296
|
-
mixins: [mpwxs, bindingx, mpother],
|
297
|
-
emits: ['click', 'change'],
|
298
|
-
props: {
|
299
|
-
// 控制开关
|
300
|
-
show: {
|
301
|
-
type: String,
|
302
|
-
default: 'none'
|
303
|
-
},
|
304
|
-
|
305
|
-
// 禁用
|
306
|
-
disabled: {
|
307
|
-
type: Boolean,
|
308
|
-
default: false
|
309
|
-
},
|
310
|
-
|
311
|
-
// 是否自动关闭
|
312
|
-
autoClose: {
|
313
|
-
type: Boolean,
|
314
|
-
default: true
|
315
|
-
},
|
316
|
-
|
317
|
-
// 滑动缺省距离
|
318
|
-
threshold: {
|
319
|
-
type: Number,
|
320
|
-
default: 20
|
321
|
-
},
|
322
|
-
|
323
|
-
// 左侧按钮内容
|
324
|
-
leftOptions: {
|
325
|
-
type: Array,
|
326
|
-
default() {
|
327
|
-
return [];
|
328
|
-
}
|
329
|
-
},
|
330
|
-
|
331
|
-
// 右侧按钮内容
|
332
|
-
rightOptions: {
|
333
|
-
type: Array,
|
334
|
-
default() {
|
335
|
-
return [];
|
336
|
-
}
|
337
|
-
}
|
338
|
-
},
|
339
|
-
// #ifndef VUE3
|
340
|
-
// TODO vue2
|
341
|
-
// destroyed() {
|
342
|
-
// if (this.__isUnmounted) return;
|
343
|
-
// this.uninstall();
|
344
|
-
// },
|
345
|
-
// #endif
|
346
|
-
// #ifdef VUE3
|
347
|
-
// TODO vue3
|
348
|
-
unmounted() {
|
349
|
-
this.__isUnmounted = true;
|
350
|
-
this.uninstall();
|
351
|
-
},
|
352
|
-
// #endif
|
353
|
-
|
354
|
-
methods: {
|
355
|
-
uninstall() {
|
356
|
-
if (this.swipeaction) {
|
357
|
-
this.swipeaction.children.forEach((item, index) => {
|
358
|
-
if (item === this) {
|
359
|
-
this.swipeaction.children.splice(index, 1);
|
360
|
-
}
|
361
|
-
});
|
362
|
-
}
|
363
|
-
},
|
364
|
-
/**
|
365
|
-
* 获取父元素实例
|
366
|
-
*/
|
367
|
-
getSwipeAction(name = 'uniSwipeAction') {
|
368
|
-
let parent = this.$parent;
|
369
|
-
let parentName = parent.$options.name;
|
370
|
-
while (parentName !== name) {
|
371
|
-
parent = parent.$parent;
|
372
|
-
if (!parent) return false;
|
373
|
-
parentName = parent.$options.name;
|
374
|
-
}
|
375
|
-
return parent;
|
376
|
-
}
|
377
|
-
}
|
378
|
-
};
|
379
|
-
</script>
|
380
|
-
|
381
|
-
<style lang="scss">
|
382
|
-
.uni-swipe {
|
383
|
-
position: relative;
|
384
|
-
/* #ifndef APP-NVUE */
|
385
|
-
overflow: hidden;
|
386
|
-
/* #endif */
|
387
|
-
}
|
388
|
-
|
389
|
-
.uni-swipe_box {
|
390
|
-
/* #ifndef APP-NVUE */
|
391
|
-
display: flex;
|
392
|
-
flex-shrink: 0;
|
393
|
-
// touch-action: none;
|
394
|
-
/* #endif */
|
395
|
-
position: relative;
|
396
|
-
}
|
397
|
-
|
398
|
-
.uni-swipe_content {
|
399
|
-
// border: 1px red solid;
|
400
|
-
}
|
401
|
-
|
402
|
-
.uni-swipe_text--center {
|
403
|
-
width: 100%;
|
404
|
-
/* #ifndef APP-NVUE */
|
405
|
-
cursor: grab;
|
406
|
-
/* #endif */
|
407
|
-
}
|
408
|
-
|
409
|
-
.uni-swipe_button-group {
|
410
|
-
/* #ifndef APP-NVUE */
|
411
|
-
box-sizing: border-box;
|
412
|
-
display: flex;
|
413
|
-
/* #endif */
|
414
|
-
flex-direction: row;
|
415
|
-
position: absolute;
|
416
|
-
top: 0;
|
417
|
-
bottom: 0;
|
418
|
-
/* #ifdef H5 */
|
419
|
-
cursor: pointer;
|
420
|
-
/* #endif */
|
421
|
-
}
|
422
|
-
|
423
|
-
.button-group--left {
|
424
|
-
left: 0;
|
425
|
-
transform: translateX(-100%);
|
426
|
-
}
|
427
|
-
|
428
|
-
.button-group--right {
|
429
|
-
right: 0;
|
430
|
-
transform: translateX(100%);
|
431
|
-
}
|
432
|
-
|
433
|
-
.uni-swipe_button {
|
434
|
-
/* #ifdef APP-NVUE */
|
435
|
-
flex: 1;
|
436
|
-
/* #endif */
|
437
|
-
/* #ifndef APP-NVUE */
|
438
|
-
display: flex;
|
439
|
-
/* #endif */
|
440
|
-
flex-direction: row;
|
441
|
-
justify-content: center;
|
442
|
-
align-items: center;
|
443
|
-
padding: 0 20px;
|
444
|
-
}
|
445
|
-
|
446
|
-
.uni-swipe_button-text {
|
447
|
-
/* #ifndef APP-NVUE */
|
448
|
-
flex-shrink: 0;
|
449
|
-
/* #endif */
|
450
|
-
font-size: 14px;
|
451
|
-
}
|
452
|
-
|
453
|
-
.ani {
|
454
|
-
transition-property: transform;
|
455
|
-
transition-duration: 0.3s;
|
456
|
-
transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
|
457
|
-
}
|
458
|
-
|
459
|
-
/* #ifdef MP-ALIPAY */
|
460
|
-
.movable-area {
|
461
|
-
/* width: 100%; */
|
462
|
-
height: 45px;
|
463
|
-
}
|
464
|
-
|
465
|
-
.movable-view {
|
466
|
-
display: flex;
|
467
|
-
/* justify-content: center; */
|
468
|
-
position: relative;
|
469
|
-
flex: 1;
|
470
|
-
height: 45px;
|
471
|
-
z-index: 2;
|
472
|
-
}
|
473
|
-
|
474
|
-
.movable-view-button {
|
475
|
-
display: flex;
|
476
|
-
flex-shrink: 0;
|
477
|
-
flex-direction: row;
|
478
|
-
height: 100%;
|
479
|
-
background: #c0c0c0;
|
480
|
-
}
|
481
|
-
|
482
|
-
/* .transition {
|
483
|
-
transition: all 0.3s;
|
484
|
-
} */
|
485
|
-
|
486
|
-
.movable-view-box {
|
487
|
-
flex-shrink: 0;
|
488
|
-
height: 100%;
|
489
|
-
background-color: #fff;
|
490
|
-
}
|
491
|
-
|
492
|
-
/* #endif */
|
493
|
-
</style>
|