ninemoon-ui 0.0.20 → 0.0.21

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/index.css CHANGED
@@ -102,9 +102,6 @@
102
102
  .tdd-top-4 {
103
103
  top: 1rem;
104
104
  }
105
- .-tdd-z-10 {
106
- z-index: -10;
107
- }
108
105
  .tdd-z-10 {
109
106
  z-index: 10;
110
107
  }
package/dist/index.umd.js CHANGED
@@ -107,9 +107,6 @@
107
107
  .tdd-top-4 {
108
108
  top: 1rem;
109
109
  }
110
- .-tdd-z-10 {
111
- z-index: -10;
112
- }
113
110
  .tdd-z-10 {
114
111
  z-index: 10;
115
112
  }
@@ -5668,15 +5665,13 @@
5668
5665
  const bodyHandle = (MySlot, d) => {
5669
5666
  let between = d - activeIndex.value;
5670
5667
  let transformNum = 0;
5671
- if (between < 0) {
5672
- if (between == -1) {
5673
- transformNum = -translatexNum.value;
5674
- } else {
5675
- transformNum = (totalLen.value + between) * translatexNum.value;
5676
- }
5668
+ if (totalLen.value <= 2) {
5669
+ transformNum = Math.abs(between * translatexNum.value);
5677
5670
  } else {
5678
- if (activeIndex.value === 0 && d == totalLen.value - 1 && totalLen.value != 1) {
5671
+ if (activeIndex.value === 0 && d == totalLen.value - 1) {
5679
5672
  transformNum = -translatexNum.value;
5673
+ } else if (between < -1) {
5674
+ transformNum = (totalLen.value + between) * translatexNum.value;
5680
5675
  } else {
5681
5676
  transformNum = between * translatexNum.value;
5682
5677
  }
@@ -5684,7 +5679,7 @@
5684
5679
  return vue.h(
5685
5680
  "div",
5686
5681
  {
5687
- class: vue.normalizeClass(["carouselBody", [activeIndex.value === d ? "tdd-z-10" : "-tdd-z-10"]]),
5682
+ class: vue.normalizeClass(["carouselBody", [activeIndex.value === d ? "" : "tdd-opacity-0"]]),
5688
5683
  style: {
5689
5684
  transform: `translateX(${transformNum}px)`
5690
5685
  }
@@ -45,15 +45,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
45
45
  const bodyHandle = (MySlot, d) => {
46
46
  let between = d - activeIndex.value;
47
47
  let transformNum = 0;
48
- if (between < 0) {
49
- if (between == -1) {
50
- transformNum = -translatexNum.value;
51
- } else {
52
- transformNum = (totalLen.value + between) * translatexNum.value;
53
- }
48
+ if (totalLen.value <= 2) {
49
+ transformNum = Math.abs(between * translatexNum.value);
54
50
  } else {
55
- if (activeIndex.value === 0 && d == totalLen.value - 1 && totalLen.value != 1) {
51
+ if (activeIndex.value === 0 && d == totalLen.value - 1) {
56
52
  transformNum = -translatexNum.value;
53
+ } else if (between < -1) {
54
+ transformNum = (totalLen.value + between) * translatexNum.value;
57
55
  } else {
58
56
  transformNum = between * translatexNum.value;
59
57
  }
@@ -61,7 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
61
59
  return h(
62
60
  "div",
63
61
  {
64
- class: normalizeClass(["carouselBody", [activeIndex.value === d ? "tdd-z-10" : "-tdd-z-10"]]),
62
+ class: normalizeClass(["carouselBody", [activeIndex.value === d ? "" : "tdd-opacity-0"]]),
65
63
  style: {
66
64
  transform: `translateX(${transformNum}px)`
67
65
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninemoon-ui",
3
3
  "private": false,
4
- "version": "0.0.20",
4
+ "version": "0.0.21",
5
5
  "author": "zhuboy",
6
6
  "keywords": [
7
7
  "vue3",