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 +0 -3
- package/dist/index.umd.js +6 -11
- package/dist/js/carousel/carousel.js +6 -8
- package/package.json +1 -1
package/dist/index.css
CHANGED
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 (
|
|
5672
|
-
|
|
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
|
|
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 ? "
|
|
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 (
|
|
49
|
-
|
|
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
|
|
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 ? "
|
|
62
|
+
class: normalizeClass(["carouselBody", [activeIndex.value === d ? "" : "tdd-opacity-0"]]),
|
|
65
63
|
style: {
|
|
66
64
|
transform: `translateX(${transformNum}px)`
|
|
67
65
|
}
|