ninemoon-ui 0.0.8 → 0.0.10
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/components/popover/popover.vue.d.ts +9 -0
- package/dist/components/select/select.vue.d.ts +2 -2
- package/dist/components/table/tableItem.vue.d.ts +2 -2
- package/dist/components/tabs/tabs.vue.d.ts +3 -8
- package/dist/index.css +3 -0
- package/dist/index.d.ts +24 -14
- package/dist/index.umd.js +460 -478
- package/dist/js/carousel/carousel.js +51 -70
- package/dist/js/check/checkgroup.js +37 -60
- package/dist/js/dialog/dialog.js +2 -2
- package/dist/js/form/form.js +2 -2
- package/dist/js/image/image.js +2 -2
- package/dist/js/index/index.js +64 -39
- package/dist/js/numberInput/numberinput.js +15 -30
- package/dist/js/pagination/pagination.js +14 -28
- package/dist/js/popover/popover.js +53 -23
- package/dist/js/radio/radiogroup.js +38 -69
- package/dist/js/select/select.js +34 -43
- package/dist/js/table/table.js +92 -68
- package/dist/js/tabs/tabs.js +59 -48
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -640,6 +640,9 @@
|
|
|
640
640
|
.tdd-pb-9 {
|
|
641
641
|
padding-bottom: 2.25rem;
|
|
642
642
|
}
|
|
643
|
+
.tdd-pt-2 {
|
|
644
|
+
padding-top: 0.5rem;
|
|
645
|
+
}
|
|
643
646
|
.tdd-pt-3 {
|
|
644
647
|
padding-top: 0.75rem;
|
|
645
648
|
}
|
|
@@ -1669,9 +1672,9 @@
|
|
|
1669
1672
|
mounted(el, binding) {
|
|
1670
1673
|
if (binding.value) {
|
|
1671
1674
|
if (binding.modifiers.fullScreen) {
|
|
1672
|
-
appendHandle(el, document.
|
|
1675
|
+
appendHandle(el, document.body);
|
|
1673
1676
|
if (binding.modifiers.lock) {
|
|
1674
|
-
document.
|
|
1677
|
+
document.body.classList.add("tdd-overflow-hidden");
|
|
1675
1678
|
}
|
|
1676
1679
|
} else {
|
|
1677
1680
|
appendHandle(el);
|
|
@@ -1684,9 +1687,9 @@
|
|
|
1684
1687
|
el.instance.loaddingWord = el.getAttribute("loadding-text");
|
|
1685
1688
|
}
|
|
1686
1689
|
if (binding.modifiers.fullScreen) {
|
|
1687
|
-
binding.value ? appendHandle(el, document.
|
|
1690
|
+
binding.value ? appendHandle(el, document.body) : removeHandle(el, document.body);
|
|
1688
1691
|
if (binding.modifiers.lock) {
|
|
1689
|
-
binding.value ? document.
|
|
1692
|
+
binding.value ? document.body.classList.add("tdd-overflow-hidden") : document.body.classList.remove("tdd-overflow-hidden");
|
|
1690
1693
|
}
|
|
1691
1694
|
} else {
|
|
1692
1695
|
binding.value ? appendHandle(el) : removeHandle(el);
|
|
@@ -1723,49 +1726,74 @@
|
|
|
1723
1726
|
};
|
|
1724
1727
|
};
|
|
1725
1728
|
const usePotion = (baseDom, aimDom, set) => {
|
|
1726
|
-
let
|
|
1727
|
-
let
|
|
1728
|
-
let
|
|
1729
|
-
let
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1729
|
+
let left = 0;
|
|
1730
|
+
let top = 0;
|
|
1731
|
+
let width = 0;
|
|
1732
|
+
let height = 0;
|
|
1733
|
+
if (!baseDom || !aimDom) {
|
|
1734
|
+
return {
|
|
1735
|
+
Top: top,
|
|
1736
|
+
Left: left,
|
|
1737
|
+
Width: width,
|
|
1738
|
+
Height: height
|
|
1739
|
+
};
|
|
1740
|
+
}
|
|
1741
|
+
const { left: baseLeft, right, bottom, top: baseTop } = baseDom.getBoundingClientRect();
|
|
1742
|
+
const { clientHeight: aimHeight, clientWidth: aimWidth } = aimDom;
|
|
1733
1743
|
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
1734
1744
|
const scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1745
|
+
switch (set == null ? void 0 : set.position) {
|
|
1746
|
+
case "bottomleft":
|
|
1747
|
+
case "bottommiddle":
|
|
1748
|
+
case "bottomright":
|
|
1749
|
+
top = scrollTop + bottom;
|
|
1750
|
+
break;
|
|
1751
|
+
case "topleft":
|
|
1752
|
+
case "topmiddle":
|
|
1753
|
+
case "topright":
|
|
1754
|
+
top = scrollTop + baseTop - aimHeight;
|
|
1755
|
+
break;
|
|
1756
|
+
case "centerleft":
|
|
1757
|
+
case "centerright":
|
|
1758
|
+
top = scrollTop + baseTop + (bottom - baseTop - aimHeight) / 2;
|
|
1759
|
+
break;
|
|
1738
1760
|
}
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1761
|
+
switch (set == null ? void 0 : set.position) {
|
|
1762
|
+
case "topleft":
|
|
1763
|
+
case "bottomleft":
|
|
1764
|
+
left = scrollLeft + baseLeft;
|
|
1765
|
+
break;
|
|
1766
|
+
case "topmiddle":
|
|
1767
|
+
case "bottommiddle":
|
|
1768
|
+
left = scrollLeft + baseLeft + (right - baseLeft - aimWidth) / 2;
|
|
1769
|
+
break;
|
|
1770
|
+
case "topright":
|
|
1771
|
+
case "bottomright":
|
|
1772
|
+
left = scrollLeft + right - aimWidth;
|
|
1773
|
+
break;
|
|
1774
|
+
case "centerleft":
|
|
1775
|
+
left = scrollLeft + baseLeft - aimWidth;
|
|
1776
|
+
break;
|
|
1777
|
+
case "centerright":
|
|
1778
|
+
left = scrollLeft + right;
|
|
1779
|
+
break;
|
|
1752
1780
|
}
|
|
1753
|
-
if (
|
|
1754
|
-
|
|
1781
|
+
if (top + aimHeight > window.innerHeight) {
|
|
1782
|
+
top = scrollTop + window.innerHeight - aimHeight - 10;
|
|
1755
1783
|
}
|
|
1756
|
-
if (
|
|
1757
|
-
|
|
1784
|
+
if (top < 0) {
|
|
1785
|
+
top = 10;
|
|
1758
1786
|
}
|
|
1759
|
-
if (
|
|
1760
|
-
|
|
1787
|
+
if (left + aimWidth > window.innerWidth) {
|
|
1788
|
+
left = scrollLeft + right - aimWidth;
|
|
1761
1789
|
}
|
|
1762
|
-
|
|
1763
|
-
|
|
1790
|
+
width = aimWidth;
|
|
1791
|
+
height = aimHeight;
|
|
1764
1792
|
return {
|
|
1765
|
-
Top,
|
|
1766
|
-
Left,
|
|
1767
|
-
Width,
|
|
1768
|
-
Height
|
|
1793
|
+
Top: top,
|
|
1794
|
+
Left: left,
|
|
1795
|
+
Width: width,
|
|
1796
|
+
Height: height
|
|
1769
1797
|
};
|
|
1770
1798
|
};
|
|
1771
1799
|
function getNewArray(array, subGroupLength) {
|
|
@@ -2018,9 +2046,9 @@
|
|
|
2018
2046
|
(val) => {
|
|
2019
2047
|
if (props.lockScroll) {
|
|
2020
2048
|
if (val === true) {
|
|
2021
|
-
document.
|
|
2049
|
+
document.body.classList.add("tdd-overflow-hidden");
|
|
2022
2050
|
} else {
|
|
2023
|
-
document.
|
|
2051
|
+
document.body.classList.remove("tdd-overflow-hidden");
|
|
2024
2052
|
}
|
|
2025
2053
|
}
|
|
2026
2054
|
}
|
|
@@ -2092,14 +2120,14 @@
|
|
|
2092
2120
|
};
|
|
2093
2121
|
const validate = async (callBack) => {
|
|
2094
2122
|
let passflag = true;
|
|
2095
|
-
|
|
2123
|
+
checkList.value.forEach(async (rule) => {
|
|
2096
2124
|
await rule.fc((msg) => {
|
|
2097
2125
|
if (msg !== null && msg !== void 0) {
|
|
2098
2126
|
passflag = false;
|
|
2099
2127
|
console.warn(msg);
|
|
2100
2128
|
}
|
|
2101
2129
|
});
|
|
2102
|
-
}
|
|
2130
|
+
});
|
|
2103
2131
|
if (passflag === true) {
|
|
2104
2132
|
callBack(passflag);
|
|
2105
2133
|
}
|
|
@@ -2440,67 +2468,58 @@
|
|
|
2440
2468
|
const isThis = optionList.value.filter((v) => v.value === props.modelValue);
|
|
2441
2469
|
if (isThis.length > 0) {
|
|
2442
2470
|
return isThis[0].label;
|
|
2471
|
+
} else if (props.modelValue) {
|
|
2472
|
+
return;
|
|
2443
2473
|
} else {
|
|
2474
|
+
emit("update:modelValue", null);
|
|
2475
|
+
ParentGetChangeHandle && ParentGetChangeHandle(null);
|
|
2476
|
+
emit("change", null);
|
|
2444
2477
|
return null;
|
|
2445
2478
|
}
|
|
2446
2479
|
});
|
|
2447
2480
|
const optionList = vue.ref([]);
|
|
2481
|
+
const optionHandle = (it) => {
|
|
2482
|
+
optionList.value.push({
|
|
2483
|
+
value: it.props.value,
|
|
2484
|
+
label: it.props.label
|
|
2485
|
+
});
|
|
2486
|
+
return vue.h(
|
|
2487
|
+
"div",
|
|
2488
|
+
{
|
|
2489
|
+
class: vue.normalizeClass(["label", [props.modelValue === it.props.value ? "labelselect" : ""]]),
|
|
2490
|
+
key: it.props.key,
|
|
2491
|
+
onClick: () => {
|
|
2492
|
+
emit("update:modelValue", it.props.value);
|
|
2493
|
+
ParentGetChangeHandle && ParentGetChangeHandle(it.props.value);
|
|
2494
|
+
emit("change", it.props.value);
|
|
2495
|
+
showOption.value = false;
|
|
2496
|
+
}
|
|
2497
|
+
},
|
|
2498
|
+
it.children || it.props.label
|
|
2499
|
+
);
|
|
2500
|
+
};
|
|
2448
2501
|
const renderOption = () => {
|
|
2449
2502
|
return vue.h(
|
|
2450
2503
|
"div",
|
|
2451
2504
|
{
|
|
2452
2505
|
class: "selectOption"
|
|
2453
2506
|
},
|
|
2454
|
-
slots.default().map((i,
|
|
2455
|
-
if (i.
|
|
2456
|
-
return
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
});
|
|
2461
|
-
return vue.h(
|
|
2462
|
-
"div",
|
|
2463
|
-
{
|
|
2464
|
-
class: `label ${props.modelValue === it.props.value ? "labelselect" : ""}`,
|
|
2465
|
-
key: `${j}-${k}`,
|
|
2466
|
-
onClick: () => {
|
|
2467
|
-
emit("update:modelValue", it.props.value);
|
|
2468
|
-
showOption.value = false;
|
|
2469
|
-
}
|
|
2470
|
-
},
|
|
2471
|
-
it.children || it.props.label
|
|
2472
|
-
);
|
|
2507
|
+
slots.default().map((i, _j) => {
|
|
2508
|
+
if (typeof i.children == "string")
|
|
2509
|
+
return null;
|
|
2510
|
+
if (Array.isArray(i.children)) {
|
|
2511
|
+
return i.children.map((it) => {
|
|
2512
|
+
return optionHandle(it);
|
|
2473
2513
|
});
|
|
2474
2514
|
} else {
|
|
2475
|
-
|
|
2476
|
-
value: i.props.value,
|
|
2477
|
-
label: i.props.label
|
|
2478
|
-
});
|
|
2479
|
-
return vue.h(
|
|
2480
|
-
"div",
|
|
2481
|
-
{
|
|
2482
|
-
class: `label ${props.modelValue === i.props.value ? "labelselect" : ""}`,
|
|
2483
|
-
key: j,
|
|
2484
|
-
onClick: () => {
|
|
2485
|
-
emit("update:modelValue", i.props.value);
|
|
2486
|
-
showOption.value = false;
|
|
2487
|
-
}
|
|
2488
|
-
},
|
|
2489
|
-
i.children || i.props.label
|
|
2490
|
-
);
|
|
2515
|
+
return optionHandle(i);
|
|
2491
2516
|
}
|
|
2492
2517
|
})
|
|
2493
2518
|
);
|
|
2494
2519
|
};
|
|
2495
|
-
vue.watch(
|
|
2496
|
-
() => props.modelValue,
|
|
2497
|
-
(n) => {
|
|
2498
|
-
ParentGetChangeHandle && ParentGetChangeHandle(n);
|
|
2499
|
-
emit("change", n);
|
|
2500
|
-
}
|
|
2501
|
-
);
|
|
2502
2520
|
return (_ctx, _cache) => {
|
|
2503
2521
|
return vue.openBlock(), vue.createBlock(vue.unref(Pop), {
|
|
2522
|
+
vIF: false,
|
|
2504
2523
|
trigger: "native",
|
|
2505
2524
|
modelValue: showOption.value,
|
|
2506
2525
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showOption.value = $event),
|
|
@@ -2579,47 +2598,64 @@
|
|
|
2579
2598
|
"colgroup",
|
|
2580
2599
|
null,
|
|
2581
2600
|
slots.default().map((it, _index) => {
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2601
|
+
if (typeof it.children == "string")
|
|
2602
|
+
return null;
|
|
2603
|
+
if (Array.isArray(it.children)) {
|
|
2604
|
+
return it.children.map((itt, _i) => colitemHandle(itt));
|
|
2605
|
+
} else {
|
|
2606
|
+
return colitemHandle(it);
|
|
2607
|
+
}
|
|
2586
2608
|
})
|
|
2587
2609
|
);
|
|
2588
2610
|
};
|
|
2611
|
+
const colitemHandle = (it) => {
|
|
2612
|
+
var _a;
|
|
2613
|
+
return vue.h("col", {
|
|
2614
|
+
width: ((_a = it.props) == null ? void 0 : _a.width) || null
|
|
2615
|
+
});
|
|
2616
|
+
};
|
|
2589
2617
|
const renderHead = () => {
|
|
2590
2618
|
return vue.h(
|
|
2591
2619
|
"thead",
|
|
2592
|
-
{
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
) : ((_a = it.props) == null ? void 0 : _a.type) && it.props.type === "selection" ? vue.h(
|
|
2606
|
-
"label",
|
|
2607
|
-
{
|
|
2608
|
-
class: "tdd-px-1 tdd-flex"
|
|
2609
|
-
},
|
|
2610
|
-
vue.withDirectives(
|
|
2611
|
-
vue.h("input", {
|
|
2612
|
-
type: "checkbox",
|
|
2613
|
-
"onUpdate:modelValue": (value) => allSelect.value = value,
|
|
2614
|
-
class: "tdd-appearance-none form-tick tdd-h-4 tdd-w-4 tdd-border tdd-border-gray-300 tdd-rounded checked:tdd-border-transparent checked:tdd-bg-red-600 tdd-text-red-600 focus:tdd-outline-none"
|
|
2615
|
-
}),
|
|
2616
|
-
[[vue.vModelCheckbox, allSelect.value]]
|
|
2617
|
-
)
|
|
2618
|
-
) : it.props.label
|
|
2619
|
-
);
|
|
2620
|
+
{
|
|
2621
|
+
class: vue.normalizeClass(["tdd-text-word6", [props.headclass]])
|
|
2622
|
+
},
|
|
2623
|
+
slots.default().map((it) => {
|
|
2624
|
+
if (typeof it.children == "string")
|
|
2625
|
+
return null;
|
|
2626
|
+
if (Array.isArray(it.children)) {
|
|
2627
|
+
return it.children.map((itt) => {
|
|
2628
|
+
return headitemHandle(itt);
|
|
2629
|
+
});
|
|
2630
|
+
} else {
|
|
2631
|
+
return headitemHandle(it);
|
|
2632
|
+
}
|
|
2620
2633
|
})
|
|
2621
2634
|
);
|
|
2622
2635
|
};
|
|
2636
|
+
const headitemHandle = (it) => {
|
|
2637
|
+
var _a;
|
|
2638
|
+
return vue.h(
|
|
2639
|
+
"th",
|
|
2640
|
+
{
|
|
2641
|
+
class: "tdd-font-normal tdd-h-10 tdd-border-b "
|
|
2642
|
+
},
|
|
2643
|
+
it.children && it.children.head ? it.children.head() : ((_a = it.props) == null ? void 0 : _a.type) && it.props.type === "selection" ? vue.h(
|
|
2644
|
+
"label",
|
|
2645
|
+
{
|
|
2646
|
+
class: "tdd-px-1 tdd-flex"
|
|
2647
|
+
},
|
|
2648
|
+
vue.withDirectives(
|
|
2649
|
+
vue.h("input", {
|
|
2650
|
+
type: "checkbox",
|
|
2651
|
+
"onUpdate:modelValue": (value) => allSelect.value = value,
|
|
2652
|
+
class: "tdd-appearance-none form-tick tdd-h-4 tdd-w-4 tdd-border tdd-border-gray-300 tdd-rounded checked:tdd-border-transparent checked:tdd-bg-red-600 tdd-text-red-600 focus:tdd-outline-none"
|
|
2653
|
+
}),
|
|
2654
|
+
[[vue.vModelCheckbox, allSelect.value]]
|
|
2655
|
+
)
|
|
2656
|
+
) : it.props.label
|
|
2657
|
+
);
|
|
2658
|
+
};
|
|
2623
2659
|
const allSelect = vue.computed({
|
|
2624
2660
|
set(flag) {
|
|
2625
2661
|
if (flag) {
|
|
@@ -2678,47 +2714,54 @@
|
|
|
2678
2714
|
}, ["stop"])
|
|
2679
2715
|
},
|
|
2680
2716
|
slots.default().map((it, _j) => {
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
{
|
|
2685
|
-
|
|
2686
|
-
}
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
class: "tdd-px-1 tdd-flex",
|
|
2691
|
-
for: "checkbox"
|
|
2692
|
-
},
|
|
2693
|
-
vue.withDirectives(
|
|
2694
|
-
vue.h("input", {
|
|
2695
|
-
type: "checkbox",
|
|
2696
|
-
value: i,
|
|
2697
|
-
"onUpdate:modelValue": (value) => {
|
|
2698
|
-
choosed.value = value;
|
|
2699
|
-
},
|
|
2700
|
-
class: "tdd-appearance-none form-tick tdd-h-4 tdd-w-4 tdd-border tdd-border-gray-300 tdd-rounded checked:tdd-border-transparent checked:tdd-bg-red-600 tdd-text-red-600 focus:tdd-outline-none "
|
|
2701
|
-
}),
|
|
2702
|
-
[[vue.vModelCheckbox, choosed.value]]
|
|
2703
|
-
)
|
|
2704
|
-
) : vue.h(
|
|
2705
|
-
"div",
|
|
2706
|
-
null,
|
|
2707
|
-
// @ts-ignore
|
|
2708
|
-
it.children && it.children.default ? (
|
|
2709
|
-
// @ts-ignore
|
|
2710
|
-
it.children.default({
|
|
2711
|
-
row,
|
|
2712
|
-
index: i
|
|
2713
|
-
})
|
|
2714
|
-
) : row[it.props.prop] != null ? row[it.props.prop] : props.whiteword
|
|
2715
|
-
)
|
|
2716
|
-
);
|
|
2717
|
+
if (typeof it.children == "string")
|
|
2718
|
+
return null;
|
|
2719
|
+
if (Array.isArray(it.children)) {
|
|
2720
|
+
return it.children.map((itt) => {
|
|
2721
|
+
return bodyHandle(row, itt, i);
|
|
2722
|
+
});
|
|
2723
|
+
} else {
|
|
2724
|
+
return bodyHandle(row, it, i);
|
|
2725
|
+
}
|
|
2717
2726
|
})
|
|
2718
2727
|
);
|
|
2719
2728
|
})
|
|
2720
2729
|
);
|
|
2721
2730
|
};
|
|
2731
|
+
const bodyHandle = (row, it, i) => {
|
|
2732
|
+
var _a;
|
|
2733
|
+
return vue.h(
|
|
2734
|
+
"td",
|
|
2735
|
+
{
|
|
2736
|
+
class: vue.normalizeClass(["tdd-text-center tdd-py-2", [props.cellclass]])
|
|
2737
|
+
},
|
|
2738
|
+
((_a = it.props) == null ? void 0 : _a.type) && it.props.type === "selection" ? vue.h(
|
|
2739
|
+
"label",
|
|
2740
|
+
{
|
|
2741
|
+
class: "tdd-px-1 tdd-flex",
|
|
2742
|
+
for: "checkbox"
|
|
2743
|
+
},
|
|
2744
|
+
vue.withDirectives(
|
|
2745
|
+
vue.h("input", {
|
|
2746
|
+
type: "checkbox",
|
|
2747
|
+
value: i,
|
|
2748
|
+
"onUpdate:modelValue": (value) => {
|
|
2749
|
+
choosed.value = value;
|
|
2750
|
+
},
|
|
2751
|
+
class: "tdd-appearance-none form-tick tdd-h-4 tdd-w-4 tdd-border tdd-border-gray-300 tdd-rounded checked:tdd-border-transparent checked:tdd-bg-red-600 tdd-text-red-600 focus:tdd-outline-none "
|
|
2752
|
+
}),
|
|
2753
|
+
[[vue.vModelCheckbox, choosed.value]]
|
|
2754
|
+
)
|
|
2755
|
+
) : vue.h(
|
|
2756
|
+
"div",
|
|
2757
|
+
null,
|
|
2758
|
+
it.children && it.children.default ? it.children.default({
|
|
2759
|
+
row,
|
|
2760
|
+
index: i
|
|
2761
|
+
}) : row[it.props.prop] != null ? row[it.props.prop] : props.whiteword
|
|
2762
|
+
)
|
|
2763
|
+
);
|
|
2764
|
+
};
|
|
2722
2765
|
__expose({
|
|
2723
2766
|
clearSelection,
|
|
2724
2767
|
allSelection,
|
|
@@ -2917,9 +2960,9 @@
|
|
|
2917
2960
|
const showBig = vue.ref(false);
|
|
2918
2961
|
vue.watch(showBig, (val) => {
|
|
2919
2962
|
if (val === true) {
|
|
2920
|
-
document.
|
|
2963
|
+
document.body.classList.add("tdd-overflow-hidden");
|
|
2921
2964
|
} else {
|
|
2922
|
-
document.
|
|
2965
|
+
document.body.classList.remove("tdd-overflow-hidden");
|
|
2923
2966
|
}
|
|
2924
2967
|
});
|
|
2925
2968
|
const showPreview = () => {
|
|
@@ -4108,18 +4151,15 @@
|
|
|
4108
4151
|
class: "tdd-w-4 tdd-h-4 tdd-block tdd-fill-word6",
|
|
4109
4152
|
viewBox: "0 0 1024 1024",
|
|
4110
4153
|
version: "1.1",
|
|
4111
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
4112
|
-
"p-id": "669"
|
|
4154
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
4113
4155
|
}, [
|
|
4114
4156
|
/* @__PURE__ */ vue.createElementVNode("path", {
|
|
4115
4157
|
d: "M842.666667 864c-8.533333 0-14.933333-2.133333-21.333334-8.533333l-341.333333-309.333334c-6.4-6.4-10.666667-14.933333-10.666667-23.466666 0-8.533333 4.266667-17.066667 10.666667-23.466667l341.333333-309.333333c12.8-12.8 34.133333-10.666667 44.8 2.133333 12.8 12.8 10.666667 34.133333-2.133333 44.8L548.266667 522.666667l315.733333 285.866666c12.8 10.666667 14.933333 32 2.133333 44.8-6.4 6.4-14.933333 10.666667-23.466666 10.666667z",
|
|
4116
|
-
fill: "currentColor"
|
|
4117
|
-
"p-id": "670"
|
|
4158
|
+
fill: "currentColor"
|
|
4118
4159
|
}),
|
|
4119
4160
|
/* @__PURE__ */ vue.createElementVNode("path", {
|
|
4120
4161
|
d: "M512 864c-8.533333 0-14.933333-2.133333-21.333333-8.533333L149.333333 546.133333c-6.4-6.4-10.666667-14.933333-10.666666-23.466666 0-8.533333 4.266667-17.066667 10.666666-23.466667L490.666667 189.866667c12.8-12.8 34.133333-10.666667 44.8 2.133333 12.8 12.8 10.666667 34.133333-2.133334 44.8L217.6 522.666667 533.333333 808.533333c12.8 12.8 14.933333 32 2.133334 44.8-6.4 6.4-14.933333 10.666667-23.466667 10.666667z",
|
|
4121
|
-
fill: "currentColor"
|
|
4122
|
-
"p-id": "671"
|
|
4162
|
+
fill: "currentColor"
|
|
4123
4163
|
})
|
|
4124
4164
|
], -1);
|
|
4125
4165
|
const _hoisted_5$2 = [
|
|
@@ -4132,23 +4172,19 @@
|
|
|
4132
4172
|
style: { "width": "1em", "height": "1em", "vertical-align": "middle", "fill": "currentColor", "overflow": "hidden" },
|
|
4133
4173
|
viewBox: "0 0 1024 1024",
|
|
4134
4174
|
version: "1.1",
|
|
4135
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
4136
|
-
"p-id": "1032"
|
|
4175
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
4137
4176
|
};
|
|
4138
4177
|
const _hoisted_8 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
4139
4178
|
d: "M192 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z",
|
|
4140
|
-
fill: "currentColor"
|
|
4141
|
-
"p-id": "1033"
|
|
4179
|
+
fill: "currentColor"
|
|
4142
4180
|
}, null, -1);
|
|
4143
4181
|
const _hoisted_9 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
4144
4182
|
d: "M512 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z",
|
|
4145
|
-
fill: "currentColor"
|
|
4146
|
-
"p-id": "1034"
|
|
4183
|
+
fill: "currentColor"
|
|
4147
4184
|
}, null, -1);
|
|
4148
4185
|
const _hoisted_10 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
4149
4186
|
d: "M832 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z",
|
|
4150
|
-
fill: "currentColor"
|
|
4151
|
-
"p-id": "1035"
|
|
4187
|
+
fill: "currentColor"
|
|
4152
4188
|
}, null, -1);
|
|
4153
4189
|
const _hoisted_11 = [
|
|
4154
4190
|
_hoisted_8,
|
|
@@ -4162,23 +4198,19 @@
|
|
|
4162
4198
|
style: { "width": "1em", "height": "1em", "vertical-align": "middle", "fill": "currentColor", "overflow": "hidden" },
|
|
4163
4199
|
viewBox: "0 0 1024 1024",
|
|
4164
4200
|
version: "1.1",
|
|
4165
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
4166
|
-
"p-id": "1032"
|
|
4201
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
4167
4202
|
};
|
|
4168
4203
|
const _hoisted_14 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
4169
4204
|
d: "M192 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z",
|
|
4170
|
-
fill: "currentColor"
|
|
4171
|
-
"p-id": "1033"
|
|
4205
|
+
fill: "currentColor"
|
|
4172
4206
|
}, null, -1);
|
|
4173
4207
|
const _hoisted_15 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
4174
4208
|
d: "M512 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z",
|
|
4175
|
-
fill: "currentColor"
|
|
4176
|
-
"p-id": "1034"
|
|
4209
|
+
fill: "currentColor"
|
|
4177
4210
|
}, null, -1);
|
|
4178
4211
|
const _hoisted_16 = /* @__PURE__ */ vue.createElementVNode("path", {
|
|
4179
4212
|
d: "M832 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0Z",
|
|
4180
|
-
fill: "currentColor"
|
|
4181
|
-
"p-id": "1035"
|
|
4213
|
+
fill: "currentColor"
|
|
4182
4214
|
}, null, -1);
|
|
4183
4215
|
const _hoisted_17 = [
|
|
4184
4216
|
_hoisted_14,
|
|
@@ -4190,18 +4222,15 @@
|
|
|
4190
4222
|
class: "tdd-w-4 tdd-h-4 tdd-block tdd-fill-word6",
|
|
4191
4223
|
viewBox: "0 0 1024 1024",
|
|
4192
4224
|
version: "1.1",
|
|
4193
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
4194
|
-
"p-id": "693"
|
|
4225
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
4195
4226
|
}, [
|
|
4196
4227
|
/* @__PURE__ */ vue.createElementVNode("path", {
|
|
4197
4228
|
d: "M544 522.666667c0-8.533333-4.266667-17.066667-10.666667-23.466667L192 189.866667c-12.8-12.8-34.133333-10.666667-44.8 2.133333-12.8 12.8-10.666667 34.133333 2.133333 44.8l315.733334 285.866667L149.333333 808.533333c-12.8 12.8-14.933333 32-2.133333 44.8 6.4 6.4 14.933333 10.666667 23.466667 10.666667 8.533333 0 14.933333-2.133333 21.333333-8.533333l341.333333-309.333334c6.4-6.4 10.666667-14.933333 10.666667-23.466666z",
|
|
4198
|
-
fill: "currentColor"
|
|
4199
|
-
"p-id": "694"
|
|
4229
|
+
fill: "currentColor"
|
|
4200
4230
|
}),
|
|
4201
4231
|
/* @__PURE__ */ vue.createElementVNode("path", {
|
|
4202
4232
|
d: "M864 499.2l-341.333333-309.333333c-12.8-12.8-34.133333-10.666667-44.8 2.133333-12.8 12.8-10.666667 34.133333 2.133333 44.8l315.733333 285.866667-315.733333 285.866666c-12.8 12.8-14.933333 32-2.133333 44.8 6.4 6.4 14.933333 10.666667 23.466666 10.666667 8.533333 0 14.933333-2.133333 21.333334-8.533333l341.333333-309.333334c6.4-6.4 10.666667-14.933333 10.666667-23.466666 0-8.533333-4.266667-17.066667-10.666667-23.466667z",
|
|
4203
|
-
fill: "currentColor"
|
|
4204
|
-
"p-id": "695"
|
|
4233
|
+
fill: "currentColor"
|
|
4205
4234
|
})
|
|
4206
4235
|
], -1);
|
|
4207
4236
|
const _hoisted_20 = [
|
|
@@ -4412,7 +4441,8 @@
|
|
|
4412
4441
|
placement: { default: "topleft" },
|
|
4413
4442
|
insertClass: {},
|
|
4414
4443
|
beforeHidden: {},
|
|
4415
|
-
modelValue: { type: Boolean }
|
|
4444
|
+
modelValue: { type: Boolean },
|
|
4445
|
+
vIF: { type: Boolean, default: true }
|
|
4416
4446
|
},
|
|
4417
4447
|
emits: ["update:modelValue"],
|
|
4418
4448
|
setup(__props, { expose: __expose, emit: emitAct }) {
|
|
@@ -4420,7 +4450,15 @@
|
|
|
4420
4450
|
const base = vue.ref();
|
|
4421
4451
|
const pop = vue.ref();
|
|
4422
4452
|
const showPop = vue.ref(false);
|
|
4423
|
-
const
|
|
4453
|
+
const trueFlag = vue.computed(() => {
|
|
4454
|
+
if (showPop.value || props.trigger === "native" && props.modelValue) {
|
|
4455
|
+
vue.nextTick(() => {
|
|
4456
|
+
setPosition();
|
|
4457
|
+
});
|
|
4458
|
+
} else {
|
|
4459
|
+
window.removeEventListener("resize", setPosition);
|
|
4460
|
+
window.removeEventListener("scroll", setPosition, true);
|
|
4461
|
+
}
|
|
4424
4462
|
if (props.trigger === "native") {
|
|
4425
4463
|
return props.modelValue;
|
|
4426
4464
|
} else {
|
|
@@ -4459,29 +4497,23 @@
|
|
|
4459
4497
|
};
|
|
4460
4498
|
const Left = vue.ref(0);
|
|
4461
4499
|
const Top = vue.ref(0);
|
|
4462
|
-
vue.watch(showPopFlag, (n) => {
|
|
4463
|
-
if (n === true) {
|
|
4464
|
-
vue.nextTick(() => {
|
|
4465
|
-
setPosition();
|
|
4466
|
-
if (props.trigger === "hover")
|
|
4467
|
-
return;
|
|
4468
|
-
window.addEventListener("resize", setPosition);
|
|
4469
|
-
window.addEventListener("scroll", setPosition, true);
|
|
4470
|
-
});
|
|
4471
|
-
}
|
|
4472
|
-
});
|
|
4473
4500
|
const setPosition = () => {
|
|
4474
|
-
|
|
4501
|
+
if (!pop.value) {
|
|
4502
|
+
window.removeEventListener("resize", setPosition);
|
|
4503
|
+
window.removeEventListener("scroll", setPosition, true);
|
|
4504
|
+
return;
|
|
4505
|
+
}
|
|
4506
|
+
const { top, bottom } = base.value.getBoundingClientRect();
|
|
4475
4507
|
if (top < 0 || bottom > window.innerHeight) {
|
|
4476
4508
|
if (props.trigger === "native") {
|
|
4477
4509
|
emitAct("update:modelValue", false);
|
|
4478
4510
|
} else {
|
|
4479
4511
|
showPop.value = false;
|
|
4480
4512
|
}
|
|
4481
|
-
window.removeEventListener("resize", setPosition);
|
|
4482
|
-
window.removeEventListener("scroll", setPosition, true);
|
|
4483
4513
|
return;
|
|
4484
4514
|
}
|
|
4515
|
+
window.addEventListener("resize", setPosition);
|
|
4516
|
+
window.addEventListener("scroll", setPosition, true);
|
|
4485
4517
|
const position = usePotion(base.value, pop.value, {
|
|
4486
4518
|
position: props.placement
|
|
4487
4519
|
});
|
|
@@ -4490,6 +4522,10 @@
|
|
|
4490
4522
|
};
|
|
4491
4523
|
const vClickoutside = {
|
|
4492
4524
|
mounted(el, binding) {
|
|
4525
|
+
if (!(el instanceof HTMLElement)) {
|
|
4526
|
+
console.error("el must be an instance of HTMLElement");
|
|
4527
|
+
return;
|
|
4528
|
+
}
|
|
4493
4529
|
function documentHandler(e) {
|
|
4494
4530
|
if ((el == null ? void 0 : el.contains) && (el == null ? void 0 : el.contains(e.target))) {
|
|
4495
4531
|
return false;
|
|
@@ -4508,6 +4544,10 @@
|
|
|
4508
4544
|
}
|
|
4509
4545
|
},
|
|
4510
4546
|
beforeUnmount(el) {
|
|
4547
|
+
if (!(el instanceof HTMLElement)) {
|
|
4548
|
+
console.error("el must be an instance of HTMLElement");
|
|
4549
|
+
return;
|
|
4550
|
+
}
|
|
4511
4551
|
document.removeEventListener("click", el._vueClickOutside_);
|
|
4512
4552
|
switch (props.trigger) {
|
|
4513
4553
|
case "hover":
|
|
@@ -4528,8 +4568,6 @@
|
|
|
4528
4568
|
if (disablecancelflag === true) {
|
|
4529
4569
|
return;
|
|
4530
4570
|
} else {
|
|
4531
|
-
window.removeEventListener("resize", setPosition);
|
|
4532
|
-
window.removeEventListener("scroll", setPosition, true);
|
|
4533
4571
|
if (props.trigger === "native") {
|
|
4534
4572
|
emitAct("update:modelValue", false);
|
|
4535
4573
|
} else {
|
|
@@ -4571,11 +4609,14 @@
|
|
|
4571
4609
|
vue.renderSlot(_ctx.$slots, "reference"),
|
|
4572
4610
|
(vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
4573
4611
|
to: "body",
|
|
4574
|
-
disabled: !
|
|
4612
|
+
disabled: !trueFlag.value
|
|
4575
4613
|
}, [
|
|
4576
|
-
vue.
|
|
4614
|
+
_ctx.vIF ? (vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
4615
|
+
key: 0,
|
|
4616
|
+
name: "opecity"
|
|
4617
|
+
}, {
|
|
4577
4618
|
default: vue.withCtx(() => [
|
|
4578
|
-
|
|
4619
|
+
trueFlag.value ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
4579
4620
|
key: 0,
|
|
4580
4621
|
ref_key: "pop",
|
|
4581
4622
|
ref: pop,
|
|
@@ -4588,7 +4629,25 @@
|
|
|
4588
4629
|
]) : vue.createCommentVNode("", true)
|
|
4589
4630
|
]),
|
|
4590
4631
|
_: 3
|
|
4591
|
-
})
|
|
4632
|
+
})) : (vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
4633
|
+
key: 1,
|
|
4634
|
+
name: "opecity"
|
|
4635
|
+
}, {
|
|
4636
|
+
default: vue.withCtx(() => [
|
|
4637
|
+
vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
4638
|
+
ref_key: "pop",
|
|
4639
|
+
ref: pop,
|
|
4640
|
+
class: vue.normalizeClass(["tdd-absolute tdd-z-1000 tdd-rounded tdd-bg-white tdd-p-4 tdd-drop-shadow", [marginClass.value, _ctx.insertClass]]),
|
|
4641
|
+
style: vue.normalizeStyle({ width: widthNum.value, top: `${Top.value}px`, left: `${Left.value}px` })
|
|
4642
|
+
}, [
|
|
4643
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
4644
|
+
], 6)), [
|
|
4645
|
+
[vue.vShow, trueFlag.value],
|
|
4646
|
+
[vClickoutside, closeCenter]
|
|
4647
|
+
])
|
|
4648
|
+
]),
|
|
4649
|
+
_: 3
|
|
4650
|
+
}))
|
|
4592
4651
|
], 8, ["disabled"]))
|
|
4593
4652
|
], 40, _hoisted_1$7);
|
|
4594
4653
|
};
|
|
@@ -4604,13 +4663,9 @@
|
|
|
4604
4663
|
class: "tdd-h-4 tdd-w-4 tdd-fill-word6 tdd-inline-block",
|
|
4605
4664
|
viewBox: "0 0 1024 1024",
|
|
4606
4665
|
version: "1.1",
|
|
4607
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
4608
|
-
"p-id": "1584"
|
|
4666
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
4609
4667
|
}, [
|
|
4610
|
-
/* @__PURE__ */ vue.createElementVNode("path", {
|
|
4611
|
-
d: "M853.333333 544H170.666667c-17.066667 0-32-14.933333-32-32s14.933333-32 32-32h682.666666c17.066667 0 32 14.933333 32 32s-14.933333 32-32 32z",
|
|
4612
|
-
"p-id": "1585"
|
|
4613
|
-
})
|
|
4668
|
+
/* @__PURE__ */ vue.createElementVNode("path", { d: "M853.333333 544H170.666667c-17.066667 0-32-14.933333-32-32s14.933333-32 32-32h682.666666c17.066667 0 32 14.933333 32 32s-14.933333 32-32 32z" })
|
|
4614
4669
|
], -1);
|
|
4615
4670
|
const _hoisted_4$3 = [
|
|
4616
4671
|
_hoisted_3$5
|
|
@@ -4620,13 +4675,9 @@
|
|
|
4620
4675
|
class: "tdd-h-4 tdd-w-4 tdd-fill-word6 tdd-inline-block",
|
|
4621
4676
|
viewBox: "0 0 1024 1024",
|
|
4622
4677
|
version: "1.1",
|
|
4623
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
4624
|
-
"p-id": "532"
|
|
4678
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
4625
4679
|
}, [
|
|
4626
|
-
/* @__PURE__ */ vue.createElementVNode("path", {
|
|
4627
|
-
d: "M853.333333 480H544V170.666667c0-17.066667-14.933333-32-32-32s-32 14.933333-32 32v309.333333H170.666667c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h309.333333V853.333333c0 17.066667 14.933333 32 32 32s32-14.933333 32-32V544H853.333333c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32z",
|
|
4628
|
-
"p-id": "533"
|
|
4629
|
-
})
|
|
4680
|
+
/* @__PURE__ */ vue.createElementVNode("path", { d: "M853.333333 480H544V170.666667c0-17.066667-14.933333-32-32-32s-32 14.933333-32 32v309.333333H170.666667c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h309.333333V853.333333c0 17.066667 14.933333 32 32 32s32-14.933333 32-32V544H853.333333c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32z" })
|
|
4630
4681
|
], -1);
|
|
4631
4682
|
const _hoisted_7 = [
|
|
4632
4683
|
_hoisted_6
|
|
@@ -4645,29 +4696,22 @@
|
|
|
4645
4696
|
emits: ["update:modelValue", "NumChange"],
|
|
4646
4697
|
setup(__props, { emit: emitAct }) {
|
|
4647
4698
|
const props = __props;
|
|
4699
|
+
function updateModelValueAndEmit(value) {
|
|
4700
|
+
const formattedValue = value.toFixed(lastLen.value);
|
|
4701
|
+
emitAct("update:modelValue", Number(formattedValue));
|
|
4702
|
+
emitAct("NumChange", Number(formattedValue));
|
|
4703
|
+
}
|
|
4704
|
+
const lastLen = vue.computed(() => {
|
|
4705
|
+
var _a;
|
|
4706
|
+
return (_a = props.step.toString().split(".")[1]) == null ? void 0 : _a.length;
|
|
4707
|
+
});
|
|
4648
4708
|
const addHandle = () => {
|
|
4649
|
-
var _a, _b;
|
|
4650
|
-
let modelLen = (_a = props.modelValue.toString().split(".")[1]) == null ? void 0 : _a.length;
|
|
4651
|
-
let stepLen = (_b = props.step.toString().split(".")[1]) == null ? void 0 : _b.length;
|
|
4652
|
-
let lastLen = 0;
|
|
4653
|
-
if (modelLen) {
|
|
4654
|
-
lastLen = modelLen > stepLen ? modelLen : stepLen;
|
|
4655
|
-
}
|
|
4656
4709
|
let result = props.modelValue + props.step;
|
|
4657
|
-
|
|
4658
|
-
emitAct("NumChange", Number(result.toFixed(lastLen)));
|
|
4710
|
+
updateModelValueAndEmit(result);
|
|
4659
4711
|
};
|
|
4660
4712
|
const reduceHandle = () => {
|
|
4661
|
-
var _a, _b;
|
|
4662
|
-
let modelLen = (_a = props.modelValue.toString().split(".")[1]) == null ? void 0 : _a.length;
|
|
4663
|
-
let stepLen = (_b = props.step.toString().split(".")[1]) == null ? void 0 : _b.length;
|
|
4664
|
-
let lastLen = 0;
|
|
4665
|
-
if (modelLen) {
|
|
4666
|
-
lastLen = modelLen > stepLen ? modelLen : stepLen;
|
|
4667
|
-
}
|
|
4668
4713
|
let result = props.modelValue - props.step;
|
|
4669
|
-
|
|
4670
|
-
emitAct("NumChange", Number(result.toFixed(lastLen)));
|
|
4714
|
+
updateModelValueAndEmit(result);
|
|
4671
4715
|
};
|
|
4672
4716
|
const inputValue = vue.computed({
|
|
4673
4717
|
get() {
|
|
@@ -4754,80 +4798,49 @@
|
|
|
4754
4798
|
const props = __props;
|
|
4755
4799
|
const ParentGetChangeHandle = vue.inject("changHandle", () => null);
|
|
4756
4800
|
const slots = vue.useSlots();
|
|
4801
|
+
const BoxHandle = (MySlot) => {
|
|
4802
|
+
var _a, _b;
|
|
4803
|
+
return vue.h(
|
|
4804
|
+
"label",
|
|
4805
|
+
{
|
|
4806
|
+
class: vue.normalizeClass(["radioGroup", [(_a = MySlot.props) == null ? void 0 : _a.class, props.modelValue == MySlot.props.label ? " tdd-bg-wordblue" : ""]])
|
|
4807
|
+
},
|
|
4808
|
+
[
|
|
4809
|
+
vue.withDirectives(
|
|
4810
|
+
vue.h("input", {
|
|
4811
|
+
type: "radio",
|
|
4812
|
+
value: MySlot.props.label,
|
|
4813
|
+
"onUpdate:modelValue": (value) => {
|
|
4814
|
+
ParentGetChangeHandle(value);
|
|
4815
|
+
emit("update:modelValue", value);
|
|
4816
|
+
},
|
|
4817
|
+
class: vue.normalizeClass(["hiddeninput form-tick", [props.showinput ? "" : " tdd-hidden"]])
|
|
4818
|
+
}),
|
|
4819
|
+
[[vue.vModelRadio, props.modelValue]]
|
|
4820
|
+
),
|
|
4821
|
+
vue.h(
|
|
4822
|
+
"span",
|
|
4823
|
+
{
|
|
4824
|
+
class: vue.normalizeClass(["tdd-text-sm", [props.modelValue == MySlot.props.label ? " tdd-text-white" : " tdd-text-word6"]])
|
|
4825
|
+
},
|
|
4826
|
+
((_b = MySlot.children) == null ? void 0 : _b.default()) || MySlot.props.label
|
|
4827
|
+
)
|
|
4828
|
+
]
|
|
4829
|
+
);
|
|
4830
|
+
};
|
|
4757
4831
|
const renderBoxs = () => {
|
|
4758
4832
|
return vue.h(
|
|
4759
4833
|
"div",
|
|
4760
4834
|
{},
|
|
4761
4835
|
slots.default().map((MySlot) => {
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
"label",
|
|
4769
|
-
{
|
|
4770
|
-
class: "radioGroup " + // @ts-ignore
|
|
4771
|
-
(trueSlot.props.class || "") + // @ts-ignore
|
|
4772
|
-
(props.modelValue == trueSlot.props.label ? " tdd-bg-wordblue" : "")
|
|
4773
|
-
},
|
|
4774
|
-
[
|
|
4775
|
-
vue.withDirectives(
|
|
4776
|
-
vue.h("input", {
|
|
4777
|
-
type: "radio",
|
|
4778
|
-
// @ts-ignore
|
|
4779
|
-
value: trueSlot.props.label,
|
|
4780
|
-
"onUpdate:modelValue": (value) => {
|
|
4781
|
-
ParentGetChangeHandle(value);
|
|
4782
|
-
emit("update:modelValue", value);
|
|
4783
|
-
},
|
|
4784
|
-
class: "hiddeninput form-tick" + // @ts-ignore
|
|
4785
|
-
(props.showinput ? "" : " tdd-hidden")
|
|
4786
|
-
}),
|
|
4787
|
-
[[vue.vModelRadio, props.modelValue]]
|
|
4788
|
-
),
|
|
4789
|
-
vue.h(
|
|
4790
|
-
"span",
|
|
4791
|
-
{
|
|
4792
|
-
class: "tdd-text-sm " + // @ts-ignore
|
|
4793
|
-
(props.modelValue == trueSlot.props.label ? " tdd-text-white" : " tdd-text-word6")
|
|
4794
|
-
},
|
|
4795
|
-
// @ts-ignore
|
|
4796
|
-
((_a2 = trueSlot.children) == null ? void 0 : _a2.default()) || trueSlot.props.label
|
|
4797
|
-
)
|
|
4798
|
-
]
|
|
4799
|
-
);
|
|
4800
|
-
});
|
|
4801
|
-
}
|
|
4836
|
+
if (typeof MySlot.children === "string")
|
|
4837
|
+
return null;
|
|
4838
|
+
if (Array.isArray(MySlot.children)) {
|
|
4839
|
+
return MySlot.children.map((slot) => {
|
|
4840
|
+
return BoxHandle(slot);
|
|
4841
|
+
});
|
|
4802
4842
|
} else {
|
|
4803
|
-
return
|
|
4804
|
-
"label",
|
|
4805
|
-
{
|
|
4806
|
-
class: "radioGroup " + (((_a = MySlot.props) == null ? void 0 : _a.class) || "") + (props.modelValue == MySlot.props.label ? " tdd-bg-wordblue" : "")
|
|
4807
|
-
},
|
|
4808
|
-
[
|
|
4809
|
-
vue.withDirectives(
|
|
4810
|
-
vue.h("input", {
|
|
4811
|
-
type: "radio",
|
|
4812
|
-
value: MySlot.props.label,
|
|
4813
|
-
"onUpdate:modelValue": (value) => {
|
|
4814
|
-
ParentGetChangeHandle(value);
|
|
4815
|
-
emit("update:modelValue", value);
|
|
4816
|
-
},
|
|
4817
|
-
class: "hiddeninput form-tick" + (props.showinput ? "" : " tdd-hidden")
|
|
4818
|
-
}),
|
|
4819
|
-
[[vue.vModelRadio, props.modelValue]]
|
|
4820
|
-
),
|
|
4821
|
-
vue.h(
|
|
4822
|
-
"span",
|
|
4823
|
-
{
|
|
4824
|
-
class: "tdd-text-sm " + (props.modelValue == MySlot.props.label ? " tdd-text-white" : " tdd-text-word6")
|
|
4825
|
-
},
|
|
4826
|
-
// @ts-ignore
|
|
4827
|
-
((_b = MySlot.children) == null ? void 0 : _b.default()) || MySlot.props.label
|
|
4828
|
-
)
|
|
4829
|
-
]
|
|
4830
|
-
);
|
|
4843
|
+
return BoxHandle(MySlot);
|
|
4831
4844
|
}
|
|
4832
4845
|
})
|
|
4833
4846
|
);
|
|
@@ -4869,72 +4882,49 @@
|
|
|
4869
4882
|
const props = __props;
|
|
4870
4883
|
const ParentGetChangeHandle = vue.inject("changHandle", () => null);
|
|
4871
4884
|
const slots = vue.useSlots();
|
|
4885
|
+
const BoxHandle = (MySlot) => {
|
|
4886
|
+
var _a;
|
|
4887
|
+
return vue.h(
|
|
4888
|
+
"label",
|
|
4889
|
+
{
|
|
4890
|
+
class: vue.normalizeClass(["checkGroup", [MySlot.props.class, props.modelValue.includes(MySlot.props.label) ? " tdd-bg-wordblue" : ""]])
|
|
4891
|
+
},
|
|
4892
|
+
[
|
|
4893
|
+
vue.withDirectives(
|
|
4894
|
+
vue.h("input", {
|
|
4895
|
+
type: "checkbox",
|
|
4896
|
+
value: MySlot.props.label,
|
|
4897
|
+
"onUpdate:modelValue": (value) => {
|
|
4898
|
+
ParentGetChangeHandle(value);
|
|
4899
|
+
emit("update:modelValue", value);
|
|
4900
|
+
},
|
|
4901
|
+
class: vue.normalizeClass(["hiddeninput form-tick", [props.showinput ? "" : " tdd-hidden"]])
|
|
4902
|
+
}),
|
|
4903
|
+
[[vue.vModelCheckbox, props.modelValue]]
|
|
4904
|
+
),
|
|
4905
|
+
vue.h(
|
|
4906
|
+
"span",
|
|
4907
|
+
{
|
|
4908
|
+
class: vue.normalizeClass(["tdd-text-sm", [props.modelValue.includes(MySlot.props.label) ? " tdd-text-white" : " tdd-text-word6"]])
|
|
4909
|
+
},
|
|
4910
|
+
((_a = MySlot.children) == null ? void 0 : _a.default()) || MySlot.props.label
|
|
4911
|
+
)
|
|
4912
|
+
]
|
|
4913
|
+
);
|
|
4914
|
+
};
|
|
4872
4915
|
const renderBoxs = () => {
|
|
4873
4916
|
return vue.h(
|
|
4874
4917
|
"div",
|
|
4875
4918
|
{},
|
|
4876
4919
|
slots.default().map((MySlot) => {
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
return
|
|
4882
|
-
"label",
|
|
4883
|
-
{
|
|
4884
|
-
class: "checkGroup " + (trueSlot.props.class || "") + (props.modelValue.includes(trueSlot.props.label) ? " tdd-bg-wordblue" : "")
|
|
4885
|
-
},
|
|
4886
|
-
[
|
|
4887
|
-
vue.withDirectives(
|
|
4888
|
-
vue.h("input", {
|
|
4889
|
-
type: "checkbox",
|
|
4890
|
-
value: trueSlot.props.label,
|
|
4891
|
-
"onUpdate:modelValue": (value) => {
|
|
4892
|
-
ParentGetChangeHandle(value);
|
|
4893
|
-
emit("update:modelValue", value);
|
|
4894
|
-
},
|
|
4895
|
-
class: "hiddeninput form-tick" + (props.showinput ? "" : " tdd-hidden")
|
|
4896
|
-
}),
|
|
4897
|
-
[[vue.vModelCheckbox, props.modelValue]]
|
|
4898
|
-
),
|
|
4899
|
-
vue.h(
|
|
4900
|
-
"span",
|
|
4901
|
-
{
|
|
4902
|
-
class: "tdd-text-sm " + (props.modelValue.includes(trueSlot.props.label) ? " tdd-text-white" : " tdd-text-word6")
|
|
4903
|
-
},
|
|
4904
|
-
((_a2 = trueSlot.children) == null ? void 0 : _a2.default()) || trueSlot.props.label
|
|
4905
|
-
)
|
|
4906
|
-
]
|
|
4907
|
-
);
|
|
4920
|
+
if (typeof MySlot.children === "string")
|
|
4921
|
+
return null;
|
|
4922
|
+
if (Array.isArray(MySlot.children)) {
|
|
4923
|
+
return MySlot.children.map((slot) => {
|
|
4924
|
+
return BoxHandle(slot);
|
|
4908
4925
|
});
|
|
4909
4926
|
} else {
|
|
4910
|
-
return
|
|
4911
|
-
"label",
|
|
4912
|
-
{
|
|
4913
|
-
class: "checkGroup " + (MySlot.props.class || "") + (props.modelValue.includes(MySlot.props.label) ? " tdd-bg-wordblue" : "")
|
|
4914
|
-
},
|
|
4915
|
-
[
|
|
4916
|
-
vue.withDirectives(
|
|
4917
|
-
vue.h("input", {
|
|
4918
|
-
type: "checkbox",
|
|
4919
|
-
value: MySlot.props.label,
|
|
4920
|
-
"onUpdate:modelValue": (value) => {
|
|
4921
|
-
ParentGetChangeHandle(value);
|
|
4922
|
-
emit("update:modelValue", value);
|
|
4923
|
-
},
|
|
4924
|
-
class: "hiddeninput form-tick" + (props.showinput ? "" : " tdd-hidden")
|
|
4925
|
-
}),
|
|
4926
|
-
[[vue.vModelCheckbox, props.modelValue]]
|
|
4927
|
-
),
|
|
4928
|
-
vue.h(
|
|
4929
|
-
"span",
|
|
4930
|
-
{
|
|
4931
|
-
class: "tdd-text-sm " + (props.modelValue.includes(MySlot.props.label) ? " tdd-text-white" : " tdd-text-word6")
|
|
4932
|
-
},
|
|
4933
|
-
// @ts-ignore
|
|
4934
|
-
((_a = MySlot.children) == null ? void 0 : _a.default()) || MySlot.props.label
|
|
4935
|
-
)
|
|
4936
|
-
]
|
|
4937
|
-
);
|
|
4927
|
+
return BoxHandle(MySlot);
|
|
4938
4928
|
}
|
|
4939
4929
|
})
|
|
4940
4930
|
);
|
|
@@ -5082,23 +5072,39 @@
|
|
|
5082
5072
|
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
5083
5073
|
__name: "tabs",
|
|
5084
5074
|
props: {
|
|
5085
|
-
active: {},
|
|
5086
|
-
default: {},
|
|
5075
|
+
active: { default: "" },
|
|
5087
5076
|
type: { default: "line" }
|
|
5088
5077
|
},
|
|
5089
5078
|
emits: ["update:active"],
|
|
5090
5079
|
setup(__props, { emit }) {
|
|
5091
5080
|
const props = __props;
|
|
5092
5081
|
const showBaseline = vue.computed(() => props.type === "line");
|
|
5093
|
-
const currentActive = vue.ref(props.default || "");
|
|
5094
|
-
const activeIndex = vue.ref(0);
|
|
5095
|
-
const arrowNum = vue.ref(8);
|
|
5096
|
-
const arrowWidth = vue.ref(0);
|
|
5097
5082
|
const changeHandle = (name) => {
|
|
5098
5083
|
emit("update:active", name);
|
|
5099
5084
|
};
|
|
5085
|
+
const noactive = vue.ref(props.active === "");
|
|
5086
|
+
const activename = vue.ref("");
|
|
5087
|
+
const currentActive = vue.computed({
|
|
5088
|
+
set(val) {
|
|
5089
|
+
if (noactive.value) {
|
|
5090
|
+
activename.value = val;
|
|
5091
|
+
} else {
|
|
5092
|
+
changeHandle(val);
|
|
5093
|
+
}
|
|
5094
|
+
},
|
|
5095
|
+
get() {
|
|
5096
|
+
if (noactive.value) {
|
|
5097
|
+
return activename.value;
|
|
5098
|
+
} else {
|
|
5099
|
+
return props.active;
|
|
5100
|
+
}
|
|
5101
|
+
}
|
|
5102
|
+
});
|
|
5103
|
+
const activeIndex = vue.ref(0);
|
|
5104
|
+
const arrowNum = vue.ref(8);
|
|
5105
|
+
const arrowWidth = vue.ref(0);
|
|
5100
5106
|
const slots = vue.useSlots();
|
|
5101
|
-
const renderBtn = (
|
|
5107
|
+
const renderBtn = (node, index2) => {
|
|
5102
5108
|
let btc = [];
|
|
5103
5109
|
let divc = [];
|
|
5104
5110
|
switch (props.type) {
|
|
@@ -5127,23 +5133,21 @@
|
|
|
5127
5133
|
"button",
|
|
5128
5134
|
{
|
|
5129
5135
|
type: "button",
|
|
5130
|
-
class:
|
|
5136
|
+
class: vue.normalizeClass(btc),
|
|
5131
5137
|
onClick: (e) => {
|
|
5132
5138
|
activeIndex.value = index2;
|
|
5133
5139
|
let aim = e.target;
|
|
5134
5140
|
arrowWidth.value = aim.offsetWidth;
|
|
5135
5141
|
arrowNum.value = aim.offsetLeft;
|
|
5136
|
-
|
|
5137
|
-
currentActive.value = name;
|
|
5142
|
+
currentActive.value = node.props.name;
|
|
5138
5143
|
}
|
|
5139
|
-
// key: index,
|
|
5140
5144
|
},
|
|
5141
5145
|
vue.h(
|
|
5142
5146
|
"span",
|
|
5143
5147
|
{
|
|
5144
5148
|
class: divc.join(" ")
|
|
5145
5149
|
},
|
|
5146
|
-
name
|
|
5150
|
+
node.props.name
|
|
5147
5151
|
)
|
|
5148
5152
|
);
|
|
5149
5153
|
};
|
|
@@ -5151,63 +5155,60 @@
|
|
|
5151
5155
|
return vue.h(
|
|
5152
5156
|
"div",
|
|
5153
5157
|
{
|
|
5154
|
-
class:
|
|
5158
|
+
class: vue.normalizeClass(["ETab", [props.type === "line" ? " tdd-px-2 tdd-pt-2" : " ETab_Card"]])
|
|
5155
5159
|
},
|
|
5156
5160
|
slots.default().map((it, index2) => {
|
|
5157
|
-
|
|
5158
|
-
|
|
5161
|
+
if (typeof it.children == "string")
|
|
5162
|
+
return null;
|
|
5163
|
+
if (Array.isArray(it.children)) {
|
|
5159
5164
|
return it.children.map((simple, i) => {
|
|
5160
|
-
return renderBtn(simple
|
|
5165
|
+
return renderBtn(simple, i);
|
|
5161
5166
|
});
|
|
5162
5167
|
} else {
|
|
5163
|
-
return renderBtn(
|
|
5168
|
+
return renderBtn(it, index2);
|
|
5164
5169
|
}
|
|
5165
5170
|
})
|
|
5166
5171
|
);
|
|
5167
5172
|
};
|
|
5173
|
+
const contentHandle = (it, i) => {
|
|
5174
|
+
if (currentActive.value === "") {
|
|
5175
|
+
activeIndex.value = i;
|
|
5176
|
+
currentActive.value = it.props.name;
|
|
5177
|
+
} else if (currentActive.value === it.props.name) {
|
|
5178
|
+
activeIndex.value = i;
|
|
5179
|
+
}
|
|
5180
|
+
return vue.withDirectives(
|
|
5181
|
+
vue.h(it, {
|
|
5182
|
+
key: it.props.name
|
|
5183
|
+
}),
|
|
5184
|
+
[[vue.vShow, currentActive.value === "" || currentActive.value === it.props.name]]
|
|
5185
|
+
);
|
|
5186
|
+
};
|
|
5168
5187
|
const renderContent = () => {
|
|
5188
|
+
let defaultindex = -1;
|
|
5169
5189
|
return vue.h(
|
|
5170
5190
|
"div",
|
|
5171
5191
|
{},
|
|
5172
|
-
slots.default().map((it,
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
} else if (currentActive.value === simple.props.name) {
|
|
5180
|
-
activeIndex.value = i;
|
|
5181
|
-
}
|
|
5182
|
-
return vue.withDirectives(
|
|
5183
|
-
vue.h(simple, {
|
|
5184
|
-
key: simple.props.name
|
|
5185
|
-
}),
|
|
5186
|
-
[[vue.vShow, currentActive.value === "" || currentActive.value === simple.props.name]]
|
|
5187
|
-
);
|
|
5192
|
+
slots.default().map((it, _) => {
|
|
5193
|
+
if (typeof it.children == "string")
|
|
5194
|
+
return null;
|
|
5195
|
+
if (Array.isArray(it.children)) {
|
|
5196
|
+
return it.children.map((itt, _i) => {
|
|
5197
|
+
defaultindex += 1;
|
|
5198
|
+
return contentHandle(itt, defaultindex);
|
|
5188
5199
|
});
|
|
5189
5200
|
} else {
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
currentActive.value = (_a = it.props) == null ? void 0 : _a.name;
|
|
5193
|
-
} else if (currentActive.value === ((_b = it.props) == null ? void 0 : _b.name)) {
|
|
5194
|
-
activeIndex.value = index2;
|
|
5195
|
-
}
|
|
5196
|
-
return vue.withDirectives(
|
|
5197
|
-
vue.h(it, {
|
|
5198
|
-
key: it.props.name
|
|
5199
|
-
}),
|
|
5200
|
-
[[vue.vShow, currentActive.value === "" || currentActive.value === it.props.name]]
|
|
5201
|
-
);
|
|
5201
|
+
defaultindex += 1;
|
|
5202
|
+
return contentHandle(it, defaultindex);
|
|
5202
5203
|
}
|
|
5203
5204
|
})
|
|
5204
5205
|
);
|
|
5205
5206
|
};
|
|
5206
5207
|
const btnBar = vue.ref();
|
|
5207
5208
|
vue.onMounted(() => {
|
|
5208
|
-
if (
|
|
5209
|
+
if (showBaseline.value) {
|
|
5209
5210
|
const aim = btnBar.value.children[activeIndex.value];
|
|
5210
|
-
arrowWidth.value = aim.children[0].innerHTML.length * 14
|
|
5211
|
+
arrowWidth.value = aim.children[0].innerHTML.length * 14;
|
|
5211
5212
|
}
|
|
5212
5213
|
});
|
|
5213
5214
|
return (_ctx, _cache) => {
|
|
@@ -5465,13 +5466,9 @@
|
|
|
5465
5466
|
class: "tdd-w-4 tdd-h-4 tdd-fill-white tdd-inline-block",
|
|
5466
5467
|
viewBox: "0 0 1024 1024",
|
|
5467
5468
|
version: "1.1",
|
|
5468
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
5469
|
-
"p-id": "613"
|
|
5469
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
5470
5470
|
}, [
|
|
5471
|
-
/* @__PURE__ */ vue.createElementVNode("path", {
|
|
5472
|
-
d: "M320 885.333333c-8.533333 0-17.066667-4.266667-23.466667-10.666666-12.8-12.8-10.666667-34.133333 2.133334-44.8L654.933333 512 298.666667 194.133333c-12.8-10.666667-14.933333-32-2.133334-44.8 10.666667-12.8 32-14.933333 44.8-2.133333l384 341.333333c6.4 6.4 10.666667 14.933333 10.666667 23.466667 0 8.533333-4.266667 17.066667-10.666667 23.466667l-384 341.333333c-6.4 6.4-12.8 8.533333-21.333333 8.533333z",
|
|
5473
|
-
"p-id": "614"
|
|
5474
|
-
})
|
|
5471
|
+
/* @__PURE__ */ vue.createElementVNode("path", { d: "M320 885.333333c-8.533333 0-17.066667-4.266667-23.466667-10.666666-12.8-12.8-10.666667-34.133333 2.133334-44.8L654.933333 512 298.666667 194.133333c-12.8-10.666667-14.933333-32-2.133334-44.8 10.666667-12.8 32-14.933333 44.8-2.133333l384 341.333333c6.4 6.4 10.666667 14.933333 10.666667 23.466667 0 8.533333-4.266667 17.066667-10.666667 23.466667l-384 341.333333c-6.4 6.4-12.8 8.533333-21.333333 8.533333z" })
|
|
5475
5472
|
], -1);
|
|
5476
5473
|
const _hoisted_2$2 = [
|
|
5477
5474
|
_hoisted_1$2
|
|
@@ -5480,13 +5477,9 @@
|
|
|
5480
5477
|
class: "tdd-w-4 tdd-h-4 tdd-fill-white tdd-inline-block",
|
|
5481
5478
|
viewBox: "0 0 1024 1024",
|
|
5482
5479
|
version: "1.1",
|
|
5483
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
5484
|
-
"p-id": "613"
|
|
5480
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
5485
5481
|
}, [
|
|
5486
|
-
/* @__PURE__ */ vue.createElementVNode("path", {
|
|
5487
|
-
d: "M320 885.333333c-8.533333 0-17.066667-4.266667-23.466667-10.666666-12.8-12.8-10.666667-34.133333 2.133334-44.8L654.933333 512 298.666667 194.133333c-12.8-10.666667-14.933333-32-2.133334-44.8 10.666667-12.8 32-14.933333 44.8-2.133333l384 341.333333c6.4 6.4 10.666667 14.933333 10.666667 23.466667 0 8.533333-4.266667 17.066667-10.666667 23.466667l-384 341.333333c-6.4 6.4-12.8 8.533333-21.333333 8.533333z",
|
|
5488
|
-
"p-id": "614"
|
|
5489
|
-
})
|
|
5482
|
+
/* @__PURE__ */ vue.createElementVNode("path", { d: "M320 885.333333c-8.533333 0-17.066667-4.266667-23.466667-10.666666-12.8-12.8-10.666667-34.133333 2.133334-44.8L654.933333 512 298.666667 194.133333c-12.8-10.666667-14.933333-32-2.133334-44.8 10.666667-12.8 32-14.933333 44.8-2.133333l384 341.333333c6.4 6.4 10.666667 14.933333 10.666667 23.466667 0 8.533333-4.266667 17.066667-10.666667 23.466667l-384 341.333333c-6.4 6.4-12.8 8.533333-21.333333 8.533333z" })
|
|
5490
5483
|
], -1);
|
|
5491
5484
|
const _hoisted_4$1 = [
|
|
5492
5485
|
_hoisted_3$2
|
|
@@ -5501,68 +5494,57 @@
|
|
|
5501
5494
|
const slots = vue.useSlots();
|
|
5502
5495
|
const activeIndex = vue.ref(0);
|
|
5503
5496
|
const totalLen = vue.computed(() => {
|
|
5504
|
-
|
|
5505
|
-
|
|
5497
|
+
return slots.default().reduce((pre, cur) => {
|
|
5498
|
+
if (typeof cur.children === "string") {
|
|
5499
|
+
return pre;
|
|
5500
|
+
}
|
|
5501
|
+
if (Array.isArray(cur.children)) {
|
|
5502
|
+
return pre += cur.children.length;
|
|
5503
|
+
} else {
|
|
5504
|
+
return pre += 1;
|
|
5505
|
+
}
|
|
5506
|
+
}, 0);
|
|
5507
|
+
});
|
|
5508
|
+
const bodyHandle = (MySlot, d) => {
|
|
5509
|
+
let between = d - activeIndex.value;
|
|
5510
|
+
let transformNum = 0;
|
|
5511
|
+
if (between < 0) {
|
|
5512
|
+
if (between == -1) {
|
|
5513
|
+
transformNum = -translatexNum.value;
|
|
5514
|
+
} else {
|
|
5515
|
+
transformNum = (totalLen.value + between) * translatexNum.value;
|
|
5516
|
+
}
|
|
5506
5517
|
} else {
|
|
5507
|
-
|
|
5518
|
+
if (activeIndex.value === 0 && d == totalLen.value - 1 && totalLen.value != 1) {
|
|
5519
|
+
transformNum = -translatexNum.value;
|
|
5520
|
+
} else {
|
|
5521
|
+
transformNum = between * translatexNum.value;
|
|
5522
|
+
}
|
|
5508
5523
|
}
|
|
5509
|
-
|
|
5524
|
+
return vue.h(
|
|
5525
|
+
"div",
|
|
5526
|
+
{
|
|
5527
|
+
class: vue.normalizeClass(["carouselBody", [activeIndex.value === d ? "tdd-z-10" : "-tdd-z-10"]]),
|
|
5528
|
+
style: {
|
|
5529
|
+
transform: `translateX(${transformNum}px)`
|
|
5530
|
+
}
|
|
5531
|
+
},
|
|
5532
|
+
vue.h(MySlot)
|
|
5533
|
+
);
|
|
5534
|
+
};
|
|
5510
5535
|
const renderBody = () => {
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
} else {
|
|
5520
|
-
transformNum = (totalLen.value + between) * translatexNum.value;
|
|
5521
|
-
}
|
|
5522
|
-
} else {
|
|
5523
|
-
if (activeIndex.value === 0 && i == totalLen.value - 1 && totalLen.value != 1) {
|
|
5524
|
-
transformNum = -translatexNum.value;
|
|
5525
|
-
} else {
|
|
5526
|
-
transformNum = between * translatexNum.value;
|
|
5527
|
-
}
|
|
5528
|
-
}
|
|
5529
|
-
return vue.h(
|
|
5530
|
-
"div",
|
|
5531
|
-
{
|
|
5532
|
-
class: "carouselBody " + (activeIndex.value === i ? "tdd-z-10" : "-tdd-z-10"),
|
|
5533
|
-
style: {
|
|
5534
|
-
transform: `translateX(${transformNum}px)`
|
|
5535
|
-
}
|
|
5536
|
-
},
|
|
5537
|
-
vue.h(trueSlot)
|
|
5538
|
-
);
|
|
5536
|
+
let indexflag = -1;
|
|
5537
|
+
return slots.default().map((MySlot, _) => {
|
|
5538
|
+
if (typeof MySlot.children == "string")
|
|
5539
|
+
return null;
|
|
5540
|
+
if (Array.isArray(MySlot.children)) {
|
|
5541
|
+
return MySlot.children.map((slot, _2) => {
|
|
5542
|
+
indexflag += 1;
|
|
5543
|
+
return bodyHandle(slot, indexflag);
|
|
5539
5544
|
});
|
|
5540
5545
|
} else {
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
if (between < 0) {
|
|
5544
|
-
if (between == -1) {
|
|
5545
|
-
transformNum = -translatexNum.value;
|
|
5546
|
-
} else {
|
|
5547
|
-
transformNum = (totalLen.value + between) * translatexNum.value;
|
|
5548
|
-
}
|
|
5549
|
-
} else {
|
|
5550
|
-
if (activeIndex.value === 0 && d == totalLen.value - 1 && totalLen.value != 1) {
|
|
5551
|
-
transformNum = -translatexNum.value;
|
|
5552
|
-
} else {
|
|
5553
|
-
transformNum = between * translatexNum.value;
|
|
5554
|
-
}
|
|
5555
|
-
}
|
|
5556
|
-
return vue.h(
|
|
5557
|
-
"div",
|
|
5558
|
-
{
|
|
5559
|
-
class: "carouselBody " + (activeIndex.value === d ? "tdd-z-10" : "-tdd-z-10"),
|
|
5560
|
-
style: {
|
|
5561
|
-
transform: `translateX(${transformNum}px)`
|
|
5562
|
-
}
|
|
5563
|
-
},
|
|
5564
|
-
vue.h(MySlot)
|
|
5565
|
-
);
|
|
5546
|
+
indexflag += 1;
|
|
5547
|
+
return bodyHandle(MySlot, indexflag);
|
|
5566
5548
|
}
|
|
5567
5549
|
});
|
|
5568
5550
|
};
|