@varlet/ui 2.16.0 → 2.16.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "2.16.0",
4
+ "version": "2.16.1",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "2.16.0",
4
+ "version": "2.16.1",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
package/lib/varlet.cjs.js CHANGED
@@ -13865,6 +13865,7 @@ var __sfc__$J = vue.defineComponent({
13865
13865
  moveTouch,
13866
13866
  endTouch
13867
13867
  } = useTouch();
13868
+ var isExpectDirection = vue.computed(() => direction.value === (props2.vertical ? "vertical" : "horizontal"));
13868
13869
  var initializedIndex = false;
13869
13870
  var timer = -1;
13870
13871
  var findSwipeItem = (idx) => swipeItems.find((_ref) => {
@@ -13995,8 +13996,7 @@ var __sfc__$J = vue.defineComponent({
13995
13996
  return;
13996
13997
  }
13997
13998
  moveTouch(event);
13998
- var expectDirection = vertical2 ? "vertical" : "horizontal";
13999
- if (direction.value !== expectDirection) {
13999
+ if (!isExpectDirection.value) {
14000
14000
  return;
14001
14001
  }
14002
14002
  event.preventDefault();
@@ -14006,11 +14006,14 @@ var __sfc__$J = vue.defineComponent({
14006
14006
  if (!touching.value) {
14007
14007
  return;
14008
14008
  }
14009
+ endTouch();
14010
+ if (!isExpectDirection.value) {
14011
+ return;
14012
+ }
14009
14013
  var {
14010
14014
  vertical: vertical2,
14011
14015
  onChange
14012
14016
  } = props2;
14013
- endTouch();
14014
14017
  var positive = vertical2 ? deltaY.value < 0 : deltaX.value < 0;
14015
14018
  var offset2 = vertical2 ? offsetY.value : offsetX.value;
14016
14019
  var quickSwiping = performance.now() - startTime.value <= SWIPE_DELAY && offset2 >= SWIPE_OFFSET;
@@ -24446,9 +24449,9 @@ const skeleton = "";
24446
24449
  const SkeletonSfc = "";
24447
24450
  const slider = "";
24448
24451
  const SliderSfc = "";
24449
- const SnackbarSfc = "";
24450
24452
  const snackbar = "";
24451
24453
  const coreSfc = "";
24454
+ const SnackbarSfc = "";
24452
24455
  const space = "";
24453
24456
  const step = "";
24454
24457
  const StepSfc = "";
@@ -24475,7 +24478,7 @@ const uploader = "";
24475
24478
  const UploaderSfc = "";
24476
24479
  const watermark = "";
24477
24480
  const WatermarkSfc = "";
24478
- const version = "2.16.0";
24481
+ const version = "2.16.1";
24479
24482
  function install(app) {
24480
24483
  ActionSheet.install && app.use(ActionSheet);
24481
24484
  AppBar.install && app.use(AppBar);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "2.16.0",
3
+ "version": "2.16.1",
4
4
  "description": "A material like components library",
5
5
  "main": "lib/varlet.cjs.js",
6
6
  "module": "es/index.mjs",
@@ -46,9 +46,9 @@
46
46
  "@popperjs/core": "^2.11.6",
47
47
  "dayjs": "^1.10.4",
48
48
  "decimal.js": "^10.2.1",
49
- "@varlet/icons": "2.16.0",
50
- "@varlet/shared": "2.16.0",
51
- "@varlet/use": "2.16.0"
49
+ "@varlet/icons": "2.16.1",
50
+ "@varlet/shared": "2.16.1",
51
+ "@varlet/use": "2.16.1"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@vue/runtime-core": "3.3.4",
@@ -64,9 +64,9 @@
64
64
  "typescript": "^5.1.5",
65
65
  "vue": "3.3.4",
66
66
  "vue-router": "4.2.0",
67
- "@varlet/cli": "2.16.0",
68
- "@varlet/touch-emulator": "2.16.0",
69
- "@varlet/ui": "2.16.0"
67
+ "@varlet/cli": "2.16.1",
68
+ "@varlet/touch-emulator": "2.16.1",
69
+ "@varlet/ui": "2.16.1"
70
70
  },
71
71
  "browserslist": [
72
72
  "Chrome >= 54",