@varlet/ui 3.1.2 → 3.1.3

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/lib/varlet.cjs.js CHANGED
@@ -3624,15 +3624,19 @@ const __sfc__$1f = vue.defineComponent({
3624
3624
  const disabled = vue.ref(true);
3625
3625
  let scroller;
3626
3626
  const handleScroll = throttle(() => {
3627
- show.value = getScrollTop(scroller) >= toPxNum(props2.visibilityHeight);
3627
+ setBackTopVisibility();
3628
3628
  }, 200);
3629
3629
  vue.onMounted(() => {
3630
3630
  setScroller();
3631
3631
  addScrollerEventListener();
3632
+ setBackTopVisibility();
3632
3633
  disabled.value = false;
3633
3634
  });
3634
3635
  vue.onActivated(addScrollerEventListener);
3635
3636
  onSmartUnmounted(removeScrollerEventListener);
3637
+ function setBackTopVisibility() {
3638
+ show.value = getScrollTop(scroller) >= toPxNum(props2.visibilityHeight);
3639
+ }
3636
3640
  function handleClick(event) {
3637
3641
  call(props2.onClick, event);
3638
3642
  const left2 = getScrollLeft(scroller);
@@ -9970,7 +9974,7 @@ const __sfc__$W = vue.defineComponent({
9970
9974
  return;
9971
9975
  }
9972
9976
  let scrollerTop = 0;
9973
- if (scroller !== window) {
9977
+ if (scroller && scroller !== window) {
9974
9978
  const { top: top2 } = getRect(scroller);
9975
9979
  scrollerTop = top2;
9976
9980
  }
@@ -21921,7 +21925,7 @@ const __sfc__$f = vue.defineComponent({
21921
21925
  }
21922
21926
  function setPercent(moveDistance, type) {
21923
21927
  let rangeValue = [];
21924
- const { step, range, modelValue, onChange, min: min2 } = props2;
21928
+ const { step, range, modelValue, min: min2 } = props2;
21925
21929
  const stepNumber = toNumber(step);
21926
21930
  const roundDistance = Math.round(moveDistance / unitWidth.value);
21927
21931
  const curValue = roundDistance * stepNumber + toNumber(min2);
@@ -22706,6 +22710,7 @@ var stdin_default$3r = vue.defineComponent({
22706
22710
  lastIndex
22707
22711
  });
22708
22712
  return vue.createVNode("div", {
22713
+ "class": classes$a([direction === "column", n$d("--full")]),
22709
22714
  "style": {
22710
22715
  margin
22711
22716
  }
@@ -28371,7 +28376,7 @@ withInstall(stdin_default$1);
28371
28376
  withPropsDefaultsSetter(stdin_default$1, props);
28372
28377
  const _WatermarkComponent = stdin_default$1;
28373
28378
  var stdin_default = stdin_default$1;
28374
- const version = "3.1.2";
28379
+ const version = "3.1.3";
28375
28380
  function install(app) {
28376
28381
  stdin_default$5E.install && app.use(stdin_default$5E);
28377
28382
  stdin_default$5C.install && app.use(stdin_default$5C);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "description": "A material like components library",
5
5
  "main": "lib/varlet.cjs.js",
6
6
  "module": "es/index.mjs",
@@ -48,9 +48,9 @@
48
48
  "@popperjs/core": "^2.11.6",
49
49
  "dayjs": "^1.10.4",
50
50
  "decimal.js": "^10.2.1",
51
- "@varlet/icons": "3.1.2",
52
- "@varlet/shared": "3.1.2",
53
- "@varlet/use": "3.1.2"
51
+ "@varlet/use": "3.1.3",
52
+ "@varlet/shared": "3.1.3",
53
+ "@varlet/icons": "3.1.3"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@vue/runtime-core": "3.4.21",
@@ -66,9 +66,9 @@
66
66
  "typescript": "^5.1.5",
67
67
  "vue": "3.4.21",
68
68
  "vue-router": "4.2.0",
69
- "@varlet/cli": "3.1.2",
70
- "@varlet/ui": "3.1.2",
71
- "@varlet/touch-emulator": "3.1.2"
69
+ "@varlet/ui": "3.1.3",
70
+ "@varlet/touch-emulator": "3.1.3",
71
+ "@varlet/cli": "3.1.3"
72
72
  },
73
73
  "scripts": {
74
74
  "dev": "varlet-cli dev",