@varlet/ui 2.16.0 → 2.16.1-alpha.1693896731525
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/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/snackbar/style/index.mjs +1 -1
- package/es/swipe/Swipe.mjs +6 -3
- package/es/varlet.esm.js +2373 -2379
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +8 -5
- package/package.json +7 -7
- package/umd/varlet.js +4 -4
package/es/index.bundle.mjs
CHANGED
|
@@ -247,7 +247,7 @@ import './tooltip/style/index.mjs'
|
|
|
247
247
|
import './uploader/style/index.mjs'
|
|
248
248
|
import './watermark/style/index.mjs'
|
|
249
249
|
|
|
250
|
-
const version = '2.16.
|
|
250
|
+
const version = '2.16.1-alpha.1693896731525'
|
|
251
251
|
|
|
252
252
|
function install(app) {
|
|
253
253
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -164,7 +164,7 @@ export * from './tooltip/index.mjs'
|
|
|
164
164
|
export * from './uploader/index.mjs'
|
|
165
165
|
export * from './watermark/index.mjs'
|
|
166
166
|
|
|
167
|
-
const version = '2.16.
|
|
167
|
+
const version = '2.16.1-alpha.1693896731525'
|
|
168
168
|
|
|
169
169
|
function install(app) {
|
|
170
170
|
ActionSheet.install && app.use(ActionSheet)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../../styles/common.css'
|
|
2
|
-
import '../SnackbarSfc.css'
|
|
3
2
|
import '../../styles/elevation.css'
|
|
4
3
|
import '../../loading/loading.css'
|
|
5
4
|
import '../../button/button.css'
|
|
6
5
|
import '../../icon/icon.css'
|
|
7
6
|
import '../snackbar.css'
|
|
8
7
|
import '../coreSfc.css'
|
|
8
|
+
import '../SnackbarSfc.css'
|
package/es/swipe/Swipe.mjs
CHANGED
|
@@ -89,6 +89,7 @@ var __sfc__ = defineComponent({
|
|
|
89
89
|
moveTouch,
|
|
90
90
|
endTouch
|
|
91
91
|
} = useTouch();
|
|
92
|
+
var isExpectDirection = computed(() => direction.value === (props.vertical ? 'vertical' : 'horizontal'));
|
|
92
93
|
var initializedIndex = false;
|
|
93
94
|
var timer = -1;
|
|
94
95
|
var findSwipeItem = idx => swipeItems.find(_ref => {
|
|
@@ -222,8 +223,7 @@ var __sfc__ = defineComponent({
|
|
|
222
223
|
return;
|
|
223
224
|
}
|
|
224
225
|
moveTouch(event);
|
|
225
|
-
|
|
226
|
-
if (direction.value !== expectDirection) {
|
|
226
|
+
if (!isExpectDirection.value) {
|
|
227
227
|
return;
|
|
228
228
|
}
|
|
229
229
|
event.preventDefault();
|
|
@@ -233,11 +233,14 @@ var __sfc__ = defineComponent({
|
|
|
233
233
|
if (!touching.value) {
|
|
234
234
|
return;
|
|
235
235
|
}
|
|
236
|
+
endTouch();
|
|
237
|
+
if (!isExpectDirection.value) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
236
240
|
var {
|
|
237
241
|
vertical,
|
|
238
242
|
onChange
|
|
239
243
|
} = props;
|
|
240
|
-
endTouch();
|
|
241
244
|
var positive = vertical ? deltaY.value < 0 : deltaX.value < 0;
|
|
242
245
|
var offset = vertical ? offsetY.value : offsetX.value;
|
|
243
246
|
var quickSwiping = performance.now() - startTime.value <= SWIPE_DELAY && offset >= SWIPE_OFFSET;
|