ninemoon-ui 0.0.9 → 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/index.d.ts +17 -2
- package/dist/index.umd.js +149 -92
- package/dist/js/carousel/carousel.js +2 -2
- package/dist/js/check/checkgroup.js +4 -4
- package/dist/js/form/form.js +2 -2
- package/dist/js/index/index.js +60 -35
- package/dist/js/popover/popover.js +53 -23
- package/dist/js/radio/radiogroup.js +4 -4
- package/dist/js/select/select.js +6 -3
- package/dist/js/table/table.js +4 -2
- package/dist/js/tabs/tabs.js +20 -23
- package/package.json +1 -1
|
@@ -19,6 +19,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
19
19
|
beforeHidden: {
|
|
20
20
|
type: import("vue").PropType<Function>;
|
|
21
21
|
};
|
|
22
|
+
vIF: {
|
|
23
|
+
type: import("vue").PropType<boolean>;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
22
26
|
}, {
|
|
23
27
|
hideHandle: (disablecancelflag?: boolean | undefined) => void;
|
|
24
28
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -42,11 +46,16 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
42
46
|
beforeHidden: {
|
|
43
47
|
type: import("vue").PropType<Function>;
|
|
44
48
|
};
|
|
49
|
+
vIF: {
|
|
50
|
+
type: import("vue").PropType<boolean>;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
45
53
|
}>> & {
|
|
46
54
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
47
55
|
}, {
|
|
48
56
|
placement: "topleft" | "topmiddle" | "topright" | "bottomleft" | "bottommiddle" | "bottomright" | "centerleft" | "centerright";
|
|
49
57
|
trigger: "click" | "hover" | "native";
|
|
58
|
+
vIF: boolean;
|
|
50
59
|
}, {}>, {
|
|
51
60
|
reference?(_: {}): any;
|
|
52
61
|
default?(_: {}): any;
|
|
@@ -8,7 +8,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8
8
|
default: boolean;
|
|
9
9
|
};
|
|
10
10
|
modelValue: {
|
|
11
|
-
type: import("vue").PropType<string | number>;
|
|
11
|
+
type: import("vue").PropType<string | number | null>;
|
|
12
12
|
required: true;
|
|
13
13
|
};
|
|
14
14
|
placeHolder: {
|
|
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
25
|
default: boolean;
|
|
26
26
|
};
|
|
27
27
|
modelValue: {
|
|
28
|
-
type: import("vue").PropType<string | number>;
|
|
28
|
+
type: import("vue").PropType<string | number | null>;
|
|
29
29
|
required: true;
|
|
30
30
|
};
|
|
31
31
|
placeHolder: {
|
package/dist/index.d.ts
CHANGED
|
@@ -774,7 +774,7 @@ declare const LibSelect: import("vue").DefineComponent<{
|
|
|
774
774
|
default: boolean;
|
|
775
775
|
};
|
|
776
776
|
modelValue: {
|
|
777
|
-
type: import("vue").PropType<string | number>;
|
|
777
|
+
type: import("vue").PropType<string | number | null>;
|
|
778
778
|
required: true;
|
|
779
779
|
};
|
|
780
780
|
placeHolder: {
|
|
@@ -791,7 +791,7 @@ declare const LibSelect: import("vue").DefineComponent<{
|
|
|
791
791
|
default: boolean;
|
|
792
792
|
};
|
|
793
793
|
modelValue: {
|
|
794
|
-
type: import("vue").PropType<string | number>;
|
|
794
|
+
type: import("vue").PropType<string | number | null>;
|
|
795
795
|
required: true;
|
|
796
796
|
};
|
|
797
797
|
placeHolder: {
|
|
@@ -1539,6 +1539,7 @@ declare const LibPopover: {
|
|
|
1539
1539
|
$props: {
|
|
1540
1540
|
placement?: "topleft" | "topmiddle" | "topright" | "bottomleft" | "bottommiddle" | "bottomright" | "centerleft" | "centerright" | undefined;
|
|
1541
1541
|
trigger?: "click" | "hover" | "native" | undefined;
|
|
1542
|
+
vIF?: boolean | undefined;
|
|
1542
1543
|
style?: unknown;
|
|
1543
1544
|
class?: unknown;
|
|
1544
1545
|
key?: string | number | symbol | undefined;
|
|
@@ -1623,6 +1624,10 @@ declare const LibPopover: {
|
|
|
1623
1624
|
beforeHidden: {
|
|
1624
1625
|
type: import("vue").PropType<Function>;
|
|
1625
1626
|
};
|
|
1627
|
+
vIF: {
|
|
1628
|
+
type: import("vue").PropType<boolean>;
|
|
1629
|
+
default: boolean;
|
|
1630
|
+
};
|
|
1626
1631
|
}>> & {
|
|
1627
1632
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
1628
1633
|
}, {
|
|
@@ -1630,6 +1635,7 @@ declare const LibPopover: {
|
|
|
1630
1635
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], string, {
|
|
1631
1636
|
placement: "topleft" | "topmiddle" | "topright" | "bottomleft" | "bottommiddle" | "bottomright" | "centerleft" | "centerright";
|
|
1632
1637
|
trigger: "click" | "hover" | "native";
|
|
1638
|
+
vIF: boolean;
|
|
1633
1639
|
}, {}, string, {}> & {
|
|
1634
1640
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
1635
1641
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -1671,6 +1677,10 @@ declare const LibPopover: {
|
|
|
1671
1677
|
beforeHidden: {
|
|
1672
1678
|
type: import("vue").PropType<Function>;
|
|
1673
1679
|
};
|
|
1680
|
+
vIF: {
|
|
1681
|
+
type: import("vue").PropType<boolean>;
|
|
1682
|
+
default: boolean;
|
|
1683
|
+
};
|
|
1674
1684
|
}>> & {
|
|
1675
1685
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
1676
1686
|
} & import("vue").ShallowUnwrapRef<{
|
|
@@ -1700,6 +1710,10 @@ declare const LibPopover: {
|
|
|
1700
1710
|
beforeHidden: {
|
|
1701
1711
|
type: import("vue").PropType<Function>;
|
|
1702
1712
|
};
|
|
1713
|
+
vIF: {
|
|
1714
|
+
type: import("vue").PropType<boolean>;
|
|
1715
|
+
default: boolean;
|
|
1716
|
+
};
|
|
1703
1717
|
}>> & {
|
|
1704
1718
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
1705
1719
|
}, {
|
|
@@ -1707,6 +1721,7 @@ declare const LibPopover: {
|
|
|
1707
1721
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", {
|
|
1708
1722
|
placement: "topleft" | "topmiddle" | "topright" | "bottomleft" | "bottommiddle" | "bottomright" | "centerleft" | "centerright";
|
|
1709
1723
|
trigger: "click" | "hover" | "native";
|
|
1724
|
+
vIF: boolean;
|
|
1710
1725
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
1711
1726
|
$slots: {
|
|
1712
1727
|
reference?(_: {}): any;
|
package/dist/index.umd.js
CHANGED
|
@@ -1726,49 +1726,74 @@
|
|
|
1726
1726
|
};
|
|
1727
1727
|
};
|
|
1728
1728
|
const usePotion = (baseDom, aimDom, set) => {
|
|
1729
|
-
let
|
|
1730
|
-
let
|
|
1731
|
-
let
|
|
1732
|
-
let
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
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;
|
|
1736
1743
|
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
1737
1744
|
const scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
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;
|
|
1747
1760
|
}
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
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;
|
|
1755
1780
|
}
|
|
1756
|
-
if (
|
|
1757
|
-
|
|
1781
|
+
if (top + aimHeight > window.innerHeight) {
|
|
1782
|
+
top = scrollTop + window.innerHeight - aimHeight - 10;
|
|
1758
1783
|
}
|
|
1759
|
-
if (
|
|
1760
|
-
|
|
1784
|
+
if (top < 0) {
|
|
1785
|
+
top = 10;
|
|
1761
1786
|
}
|
|
1762
|
-
if (
|
|
1763
|
-
|
|
1787
|
+
if (left + aimWidth > window.innerWidth) {
|
|
1788
|
+
left = scrollLeft + right - aimWidth;
|
|
1764
1789
|
}
|
|
1765
|
-
|
|
1766
|
-
|
|
1790
|
+
width = aimWidth;
|
|
1791
|
+
height = aimHeight;
|
|
1767
1792
|
return {
|
|
1768
|
-
Top,
|
|
1769
|
-
Left,
|
|
1770
|
-
Width,
|
|
1771
|
-
Height
|
|
1793
|
+
Top: top,
|
|
1794
|
+
Left: left,
|
|
1795
|
+
Width: width,
|
|
1796
|
+
Height: height
|
|
1772
1797
|
};
|
|
1773
1798
|
};
|
|
1774
1799
|
function getNewArray(array, subGroupLength) {
|
|
@@ -2095,14 +2120,14 @@
|
|
|
2095
2120
|
};
|
|
2096
2121
|
const validate = async (callBack) => {
|
|
2097
2122
|
let passflag = true;
|
|
2098
|
-
|
|
2123
|
+
checkList.value.forEach(async (rule) => {
|
|
2099
2124
|
await rule.fc((msg) => {
|
|
2100
2125
|
if (msg !== null && msg !== void 0) {
|
|
2101
2126
|
passflag = false;
|
|
2102
2127
|
console.warn(msg);
|
|
2103
2128
|
}
|
|
2104
2129
|
});
|
|
2105
|
-
}
|
|
2130
|
+
});
|
|
2106
2131
|
if (passflag === true) {
|
|
2107
2132
|
callBack(passflag);
|
|
2108
2133
|
}
|
|
@@ -2443,6 +2468,8 @@
|
|
|
2443
2468
|
const isThis = optionList.value.filter((v) => v.value === props.modelValue);
|
|
2444
2469
|
if (isThis.length > 0) {
|
|
2445
2470
|
return isThis[0].label;
|
|
2471
|
+
} else if (props.modelValue) {
|
|
2472
|
+
return;
|
|
2446
2473
|
} else {
|
|
2447
2474
|
emit("update:modelValue", null);
|
|
2448
2475
|
ParentGetChangeHandle && ParentGetChangeHandle(null);
|
|
@@ -2459,7 +2486,7 @@
|
|
|
2459
2486
|
return vue.h(
|
|
2460
2487
|
"div",
|
|
2461
2488
|
{
|
|
2462
|
-
class:
|
|
2489
|
+
class: vue.normalizeClass(["label", [props.modelValue === it.props.value ? "labelselect" : ""]]),
|
|
2463
2490
|
key: it.props.key,
|
|
2464
2491
|
onClick: () => {
|
|
2465
2492
|
emit("update:modelValue", it.props.value);
|
|
@@ -2477,7 +2504,7 @@
|
|
|
2477
2504
|
{
|
|
2478
2505
|
class: "selectOption"
|
|
2479
2506
|
},
|
|
2480
|
-
slots.default().map((i,
|
|
2507
|
+
slots.default().map((i, _j) => {
|
|
2481
2508
|
if (typeof i.children == "string")
|
|
2482
2509
|
return null;
|
|
2483
2510
|
if (Array.isArray(i.children)) {
|
|
@@ -2492,6 +2519,7 @@
|
|
|
2492
2519
|
};
|
|
2493
2520
|
return (_ctx, _cache) => {
|
|
2494
2521
|
return vue.openBlock(), vue.createBlock(vue.unref(Pop), {
|
|
2522
|
+
vIF: false,
|
|
2495
2523
|
trigger: "native",
|
|
2496
2524
|
modelValue: showOption.value,
|
|
2497
2525
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showOption.value = $event),
|
|
@@ -2589,7 +2617,9 @@
|
|
|
2589
2617
|
const renderHead = () => {
|
|
2590
2618
|
return vue.h(
|
|
2591
2619
|
"thead",
|
|
2592
|
-
{
|
|
2620
|
+
{
|
|
2621
|
+
class: vue.normalizeClass(["tdd-text-word6", [props.headclass]])
|
|
2622
|
+
},
|
|
2593
2623
|
slots.default().map((it) => {
|
|
2594
2624
|
if (typeof it.children == "string")
|
|
2595
2625
|
return null;
|
|
@@ -2703,7 +2733,7 @@
|
|
|
2703
2733
|
return vue.h(
|
|
2704
2734
|
"td",
|
|
2705
2735
|
{
|
|
2706
|
-
class:
|
|
2736
|
+
class: vue.normalizeClass(["tdd-text-center tdd-py-2", [props.cellclass]])
|
|
2707
2737
|
},
|
|
2708
2738
|
((_a = it.props) == null ? void 0 : _a.type) && it.props.type === "selection" ? vue.h(
|
|
2709
2739
|
"label",
|
|
@@ -4411,7 +4441,8 @@
|
|
|
4411
4441
|
placement: { default: "topleft" },
|
|
4412
4442
|
insertClass: {},
|
|
4413
4443
|
beforeHidden: {},
|
|
4414
|
-
modelValue: { type: Boolean }
|
|
4444
|
+
modelValue: { type: Boolean },
|
|
4445
|
+
vIF: { type: Boolean, default: true }
|
|
4415
4446
|
},
|
|
4416
4447
|
emits: ["update:modelValue"],
|
|
4417
4448
|
setup(__props, { expose: __expose, emit: emitAct }) {
|
|
@@ -4419,7 +4450,15 @@
|
|
|
4419
4450
|
const base = vue.ref();
|
|
4420
4451
|
const pop = vue.ref();
|
|
4421
4452
|
const showPop = vue.ref(false);
|
|
4422
|
-
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
|
+
}
|
|
4423
4462
|
if (props.trigger === "native") {
|
|
4424
4463
|
return props.modelValue;
|
|
4425
4464
|
} else {
|
|
@@ -4458,29 +4497,23 @@
|
|
|
4458
4497
|
};
|
|
4459
4498
|
const Left = vue.ref(0);
|
|
4460
4499
|
const Top = vue.ref(0);
|
|
4461
|
-
vue.watch(showPopFlag, (n) => {
|
|
4462
|
-
if (n === true) {
|
|
4463
|
-
vue.nextTick(() => {
|
|
4464
|
-
setPosition();
|
|
4465
|
-
if (props.trigger === "hover")
|
|
4466
|
-
return;
|
|
4467
|
-
window.addEventListener("resize", setPosition);
|
|
4468
|
-
window.addEventListener("scroll", setPosition, true);
|
|
4469
|
-
});
|
|
4470
|
-
}
|
|
4471
|
-
});
|
|
4472
4500
|
const setPosition = () => {
|
|
4473
|
-
|
|
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();
|
|
4474
4507
|
if (top < 0 || bottom > window.innerHeight) {
|
|
4475
4508
|
if (props.trigger === "native") {
|
|
4476
4509
|
emitAct("update:modelValue", false);
|
|
4477
4510
|
} else {
|
|
4478
4511
|
showPop.value = false;
|
|
4479
4512
|
}
|
|
4480
|
-
window.removeEventListener("resize", setPosition);
|
|
4481
|
-
window.removeEventListener("scroll", setPosition, true);
|
|
4482
4513
|
return;
|
|
4483
4514
|
}
|
|
4515
|
+
window.addEventListener("resize", setPosition);
|
|
4516
|
+
window.addEventListener("scroll", setPosition, true);
|
|
4484
4517
|
const position = usePotion(base.value, pop.value, {
|
|
4485
4518
|
position: props.placement
|
|
4486
4519
|
});
|
|
@@ -4489,6 +4522,10 @@
|
|
|
4489
4522
|
};
|
|
4490
4523
|
const vClickoutside = {
|
|
4491
4524
|
mounted(el, binding) {
|
|
4525
|
+
if (!(el instanceof HTMLElement)) {
|
|
4526
|
+
console.error("el must be an instance of HTMLElement");
|
|
4527
|
+
return;
|
|
4528
|
+
}
|
|
4492
4529
|
function documentHandler(e) {
|
|
4493
4530
|
if ((el == null ? void 0 : el.contains) && (el == null ? void 0 : el.contains(e.target))) {
|
|
4494
4531
|
return false;
|
|
@@ -4507,6 +4544,10 @@
|
|
|
4507
4544
|
}
|
|
4508
4545
|
},
|
|
4509
4546
|
beforeUnmount(el) {
|
|
4547
|
+
if (!(el instanceof HTMLElement)) {
|
|
4548
|
+
console.error("el must be an instance of HTMLElement");
|
|
4549
|
+
return;
|
|
4550
|
+
}
|
|
4510
4551
|
document.removeEventListener("click", el._vueClickOutside_);
|
|
4511
4552
|
switch (props.trigger) {
|
|
4512
4553
|
case "hover":
|
|
@@ -4527,8 +4568,6 @@
|
|
|
4527
4568
|
if (disablecancelflag === true) {
|
|
4528
4569
|
return;
|
|
4529
4570
|
} else {
|
|
4530
|
-
window.removeEventListener("resize", setPosition);
|
|
4531
|
-
window.removeEventListener("scroll", setPosition, true);
|
|
4532
4571
|
if (props.trigger === "native") {
|
|
4533
4572
|
emitAct("update:modelValue", false);
|
|
4534
4573
|
} else {
|
|
@@ -4570,11 +4609,14 @@
|
|
|
4570
4609
|
vue.renderSlot(_ctx.$slots, "reference"),
|
|
4571
4610
|
(vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
4572
4611
|
to: "body",
|
|
4573
|
-
disabled: !
|
|
4612
|
+
disabled: !trueFlag.value
|
|
4574
4613
|
}, [
|
|
4575
|
-
vue.
|
|
4614
|
+
_ctx.vIF ? (vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
4615
|
+
key: 0,
|
|
4616
|
+
name: "opecity"
|
|
4617
|
+
}, {
|
|
4576
4618
|
default: vue.withCtx(() => [
|
|
4577
|
-
|
|
4619
|
+
trueFlag.value ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
4578
4620
|
key: 0,
|
|
4579
4621
|
ref_key: "pop",
|
|
4580
4622
|
ref: pop,
|
|
@@ -4587,7 +4629,25 @@
|
|
|
4587
4629
|
]) : vue.createCommentVNode("", true)
|
|
4588
4630
|
]),
|
|
4589
4631
|
_: 3
|
|
4590
|
-
})
|
|
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
|
+
}))
|
|
4591
4651
|
], 8, ["disabled"]))
|
|
4592
4652
|
], 40, _hoisted_1$7);
|
|
4593
4653
|
};
|
|
@@ -4743,7 +4803,7 @@
|
|
|
4743
4803
|
return vue.h(
|
|
4744
4804
|
"label",
|
|
4745
4805
|
{
|
|
4746
|
-
class: "radioGroup
|
|
4806
|
+
class: vue.normalizeClass(["radioGroup", [(_a = MySlot.props) == null ? void 0 : _a.class, props.modelValue == MySlot.props.label ? " tdd-bg-wordblue" : ""]])
|
|
4747
4807
|
},
|
|
4748
4808
|
[
|
|
4749
4809
|
vue.withDirectives(
|
|
@@ -4754,14 +4814,14 @@
|
|
|
4754
4814
|
ParentGetChangeHandle(value);
|
|
4755
4815
|
emit("update:modelValue", value);
|
|
4756
4816
|
},
|
|
4757
|
-
class: "hiddeninput form-tick"
|
|
4817
|
+
class: vue.normalizeClass(["hiddeninput form-tick", [props.showinput ? "" : " tdd-hidden"]])
|
|
4758
4818
|
}),
|
|
4759
4819
|
[[vue.vModelRadio, props.modelValue]]
|
|
4760
4820
|
),
|
|
4761
4821
|
vue.h(
|
|
4762
4822
|
"span",
|
|
4763
4823
|
{
|
|
4764
|
-
class: "tdd-text-sm
|
|
4824
|
+
class: vue.normalizeClass(["tdd-text-sm", [props.modelValue == MySlot.props.label ? " tdd-text-white" : " tdd-text-word6"]])
|
|
4765
4825
|
},
|
|
4766
4826
|
((_b = MySlot.children) == null ? void 0 : _b.default()) || MySlot.props.label
|
|
4767
4827
|
)
|
|
@@ -4827,7 +4887,7 @@
|
|
|
4827
4887
|
return vue.h(
|
|
4828
4888
|
"label",
|
|
4829
4889
|
{
|
|
4830
|
-
class: "checkGroup
|
|
4890
|
+
class: vue.normalizeClass(["checkGroup", [MySlot.props.class, props.modelValue.includes(MySlot.props.label) ? " tdd-bg-wordblue" : ""]])
|
|
4831
4891
|
},
|
|
4832
4892
|
[
|
|
4833
4893
|
vue.withDirectives(
|
|
@@ -4838,14 +4898,14 @@
|
|
|
4838
4898
|
ParentGetChangeHandle(value);
|
|
4839
4899
|
emit("update:modelValue", value);
|
|
4840
4900
|
},
|
|
4841
|
-
class: "hiddeninput form-tick"
|
|
4901
|
+
class: vue.normalizeClass(["hiddeninput form-tick", [props.showinput ? "" : " tdd-hidden"]])
|
|
4842
4902
|
}),
|
|
4843
4903
|
[[vue.vModelCheckbox, props.modelValue]]
|
|
4844
4904
|
),
|
|
4845
4905
|
vue.h(
|
|
4846
4906
|
"span",
|
|
4847
4907
|
{
|
|
4848
|
-
class: "tdd-text-sm
|
|
4908
|
+
class: vue.normalizeClass(["tdd-text-sm", [props.modelValue.includes(MySlot.props.label) ? " tdd-text-white" : " tdd-text-word6"]])
|
|
4849
4909
|
},
|
|
4850
4910
|
((_a = MySlot.children) == null ? void 0 : _a.default()) || MySlot.props.label
|
|
4851
4911
|
)
|
|
@@ -5073,7 +5133,7 @@
|
|
|
5073
5133
|
"button",
|
|
5074
5134
|
{
|
|
5075
5135
|
type: "button",
|
|
5076
|
-
class:
|
|
5136
|
+
class: vue.normalizeClass(btc),
|
|
5077
5137
|
onClick: (e) => {
|
|
5078
5138
|
activeIndex.value = index2;
|
|
5079
5139
|
let aim = e.target;
|
|
@@ -5095,7 +5155,7 @@
|
|
|
5095
5155
|
return vue.h(
|
|
5096
5156
|
"div",
|
|
5097
5157
|
{
|
|
5098
|
-
class:
|
|
5158
|
+
class: vue.normalizeClass(["ETab", [props.type === "line" ? " tdd-px-2 tdd-pt-2" : " ETab_Card"]])
|
|
5099
5159
|
},
|
|
5100
5160
|
slots.default().map((it, index2) => {
|
|
5101
5161
|
if (typeof it.children == "string")
|
|
@@ -5152,27 +5212,24 @@
|
|
|
5152
5212
|
}
|
|
5153
5213
|
});
|
|
5154
5214
|
return (_ctx, _cache) => {
|
|
5155
|
-
return vue.openBlock(), vue.createElementBlock(
|
|
5156
|
-
vue.
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
vue.
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
vue.createElementVNode("div", _hoisted_3$3, [
|
|
5172
|
-
vue.createVNode(renderContent)
|
|
5173
|
-
])
|
|
5215
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
|
|
5216
|
+
vue.createVNode(renderBar, {
|
|
5217
|
+
ref_key: "btnBar",
|
|
5218
|
+
ref: btnBar
|
|
5219
|
+
}, null, 512),
|
|
5220
|
+
showBaseline.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$3, [
|
|
5221
|
+
vue.createElementVNode("div", {
|
|
5222
|
+
class: "tdd-absolute tdd-bottom-0 tdd-border-t-2 tdd-border-solid tdd-border-blue-brand tdd-transition",
|
|
5223
|
+
style: vue.normalizeStyle({
|
|
5224
|
+
transform: `translateX(${arrowNum.value}px`,
|
|
5225
|
+
width: `${arrowWidth.value}px`
|
|
5226
|
+
})
|
|
5227
|
+
}, null, 4)
|
|
5228
|
+
])) : vue.createCommentVNode("", true),
|
|
5229
|
+
vue.createElementVNode("div", _hoisted_3$3, [
|
|
5230
|
+
vue.createVNode(renderContent)
|
|
5174
5231
|
])
|
|
5175
|
-
]
|
|
5232
|
+
]);
|
|
5176
5233
|
};
|
|
5177
5234
|
}
|
|
5178
5235
|
});
|
|
@@ -5467,7 +5524,7 @@
|
|
|
5467
5524
|
return vue.h(
|
|
5468
5525
|
"div",
|
|
5469
5526
|
{
|
|
5470
|
-
class: "carouselBody
|
|
5527
|
+
class: vue.normalizeClass(["carouselBody", [activeIndex.value === d ? "tdd-z-10" : "-tdd-z-10"]]),
|
|
5471
5528
|
style: {
|
|
5472
5529
|
transform: `translateX(${transformNum}px)`
|
|
5473
5530
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useSlots, ref, computed, onMounted, watch, onUnmounted, openBlock, createElementBlock, normalizeStyle, createElementVNode, createVNode, h } from "vue";
|
|
1
|
+
import { defineComponent, useSlots, ref, computed, onMounted, watch, onUnmounted, openBlock, createElementBlock, normalizeStyle, createElementVNode, createVNode, h, normalizeClass } from "vue";
|
|
2
2
|
const _hoisted_1 = /* @__PURE__ */ createElementVNode("svg", {
|
|
3
3
|
class: "tdd-w-4 tdd-h-4 tdd-fill-white tdd-inline-block",
|
|
4
4
|
viewBox: "0 0 1024 1024",
|
|
@@ -61,7 +61,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
61
|
return h(
|
|
62
62
|
"div",
|
|
63
63
|
{
|
|
64
|
-
class: "carouselBody
|
|
64
|
+
class: normalizeClass(["carouselBody", [activeIndex.value === d ? "tdd-z-10" : "-tdd-z-10"]]),
|
|
65
65
|
style: {
|
|
66
66
|
transform: `translateX(${transformNum}px)`
|
|
67
67
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, inject, useSlots, openBlock, createBlock, h, withDirectives, vModelCheckbox } from "vue";
|
|
1
|
+
import { defineComponent, inject, useSlots, openBlock, createBlock, h, normalizeClass, withDirectives, vModelCheckbox } from "vue";
|
|
2
2
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3
3
|
__name: "checkgroup",
|
|
4
4
|
props: {
|
|
@@ -15,7 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
return h(
|
|
16
16
|
"label",
|
|
17
17
|
{
|
|
18
|
-
class: "checkGroup
|
|
18
|
+
class: normalizeClass(["checkGroup", [MySlot.props.class, props.modelValue.includes(MySlot.props.label) ? " tdd-bg-wordblue" : ""]])
|
|
19
19
|
},
|
|
20
20
|
[
|
|
21
21
|
withDirectives(
|
|
@@ -26,14 +26,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
ParentGetChangeHandle(value);
|
|
27
27
|
emit("update:modelValue", value);
|
|
28
28
|
},
|
|
29
|
-
class: "hiddeninput form-tick"
|
|
29
|
+
class: normalizeClass(["hiddeninput form-tick", [props.showinput ? "" : " tdd-hidden"]])
|
|
30
30
|
}),
|
|
31
31
|
[[vModelCheckbox, props.modelValue]]
|
|
32
32
|
),
|
|
33
33
|
h(
|
|
34
34
|
"span",
|
|
35
35
|
{
|
|
36
|
-
class: "tdd-text-sm
|
|
36
|
+
class: normalizeClass(["tdd-text-sm", [props.modelValue.includes(MySlot.props.label) ? " tdd-text-white" : " tdd-text-word6"]])
|
|
37
37
|
},
|
|
38
38
|
((_a = MySlot.children) == null ? void 0 : _a.default()) || MySlot.props.label
|
|
39
39
|
)
|
package/dist/js/form/form.js
CHANGED
|
@@ -24,14 +24,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
};
|
|
25
25
|
const validate = async (callBack) => {
|
|
26
26
|
let passflag = true;
|
|
27
|
-
|
|
27
|
+
checkList.value.forEach(async (rule) => {
|
|
28
28
|
await rule.fc((msg) => {
|
|
29
29
|
if (msg !== null && msg !== void 0) {
|
|
30
30
|
passflag = false;
|
|
31
31
|
console.warn(msg);
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
}
|
|
34
|
+
});
|
|
35
35
|
if (passflag === true) {
|
|
36
36
|
callBack(passflag);
|
|
37
37
|
}
|
package/dist/js/index/index.js
CHANGED
|
@@ -552,49 +552,74 @@ const throttle = (fn, delay) => {
|
|
|
552
552
|
};
|
|
553
553
|
};
|
|
554
554
|
const usePotion = (baseDom, aimDom, set) => {
|
|
555
|
-
let
|
|
556
|
-
let
|
|
557
|
-
let
|
|
558
|
-
let
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
555
|
+
let left = 0;
|
|
556
|
+
let top = 0;
|
|
557
|
+
let width = 0;
|
|
558
|
+
let height = 0;
|
|
559
|
+
if (!baseDom || !aimDom) {
|
|
560
|
+
return {
|
|
561
|
+
Top: top,
|
|
562
|
+
Left: left,
|
|
563
|
+
Width: width,
|
|
564
|
+
Height: height
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
const { left: baseLeft, right, bottom, top: baseTop } = baseDom.getBoundingClientRect();
|
|
568
|
+
const { clientHeight: aimHeight, clientWidth: aimWidth } = aimDom;
|
|
562
569
|
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
563
570
|
const scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
571
|
+
switch (set == null ? void 0 : set.position) {
|
|
572
|
+
case "bottomleft":
|
|
573
|
+
case "bottommiddle":
|
|
574
|
+
case "bottomright":
|
|
575
|
+
top = scrollTop + bottom;
|
|
576
|
+
break;
|
|
577
|
+
case "topleft":
|
|
578
|
+
case "topmiddle":
|
|
579
|
+
case "topright":
|
|
580
|
+
top = scrollTop + baseTop - aimHeight;
|
|
581
|
+
break;
|
|
582
|
+
case "centerleft":
|
|
583
|
+
case "centerright":
|
|
584
|
+
top = scrollTop + baseTop + (bottom - baseTop - aimHeight) / 2;
|
|
585
|
+
break;
|
|
570
586
|
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
587
|
+
switch (set == null ? void 0 : set.position) {
|
|
588
|
+
case "topleft":
|
|
589
|
+
case "bottomleft":
|
|
590
|
+
left = scrollLeft + baseLeft;
|
|
591
|
+
break;
|
|
592
|
+
case "topmiddle":
|
|
593
|
+
case "bottommiddle":
|
|
594
|
+
left = scrollLeft + baseLeft + (right - baseLeft - aimWidth) / 2;
|
|
595
|
+
break;
|
|
596
|
+
case "topright":
|
|
597
|
+
case "bottomright":
|
|
598
|
+
left = scrollLeft + right - aimWidth;
|
|
599
|
+
break;
|
|
600
|
+
case "centerleft":
|
|
601
|
+
left = scrollLeft + baseLeft - aimWidth;
|
|
602
|
+
break;
|
|
603
|
+
case "centerright":
|
|
604
|
+
left = scrollLeft + right;
|
|
605
|
+
break;
|
|
581
606
|
}
|
|
582
|
-
if (
|
|
583
|
-
|
|
607
|
+
if (top + aimHeight > window.innerHeight) {
|
|
608
|
+
top = scrollTop + window.innerHeight - aimHeight - 10;
|
|
584
609
|
}
|
|
585
|
-
if (
|
|
586
|
-
|
|
610
|
+
if (top < 0) {
|
|
611
|
+
top = 10;
|
|
587
612
|
}
|
|
588
|
-
if (
|
|
589
|
-
|
|
613
|
+
if (left + aimWidth > window.innerWidth) {
|
|
614
|
+
left = scrollLeft + right - aimWidth;
|
|
590
615
|
}
|
|
591
|
-
|
|
592
|
-
|
|
616
|
+
width = aimWidth;
|
|
617
|
+
height = aimHeight;
|
|
593
618
|
return {
|
|
594
|
-
Top,
|
|
595
|
-
Left,
|
|
596
|
-
Width,
|
|
597
|
-
Height
|
|
619
|
+
Top: top,
|
|
620
|
+
Left: left,
|
|
621
|
+
Width: width,
|
|
622
|
+
Height: height
|
|
598
623
|
};
|
|
599
624
|
};
|
|
600
625
|
function getNewArray(array, subGroupLength) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed,
|
|
1
|
+
import { defineComponent, ref, computed, nextTick, onUnmounted, openBlock, createElementBlock, withModifiers, renderSlot, createBlock, Teleport, Transition, withCtx, withDirectives, normalizeClass, normalizeStyle, createCommentVNode, vShow } from "vue";
|
|
2
2
|
import { u as usePotion, t as throttle } from "../index/index.js";
|
|
3
3
|
const _hoisted_1 = ["onMouseenter"];
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -9,7 +9,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
9
|
placement: { default: "topleft" },
|
|
10
10
|
insertClass: {},
|
|
11
11
|
beforeHidden: {},
|
|
12
|
-
modelValue: { type: Boolean }
|
|
12
|
+
modelValue: { type: Boolean },
|
|
13
|
+
vIF: { type: Boolean, default: true }
|
|
13
14
|
},
|
|
14
15
|
emits: ["update:modelValue"],
|
|
15
16
|
setup(__props, { expose: __expose, emit: emitAct }) {
|
|
@@ -17,7 +18,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
18
|
const base = ref();
|
|
18
19
|
const pop = ref();
|
|
19
20
|
const showPop = ref(false);
|
|
20
|
-
const
|
|
21
|
+
const trueFlag = computed(() => {
|
|
22
|
+
if (showPop.value || props.trigger === "native" && props.modelValue) {
|
|
23
|
+
nextTick(() => {
|
|
24
|
+
setPosition();
|
|
25
|
+
});
|
|
26
|
+
} else {
|
|
27
|
+
window.removeEventListener("resize", setPosition);
|
|
28
|
+
window.removeEventListener("scroll", setPosition, true);
|
|
29
|
+
}
|
|
21
30
|
if (props.trigger === "native") {
|
|
22
31
|
return props.modelValue;
|
|
23
32
|
} else {
|
|
@@ -56,29 +65,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
65
|
};
|
|
57
66
|
const Left = ref(0);
|
|
58
67
|
const Top = ref(0);
|
|
59
|
-
watch(showPopFlag, (n) => {
|
|
60
|
-
if (n === true) {
|
|
61
|
-
nextTick(() => {
|
|
62
|
-
setPosition();
|
|
63
|
-
if (props.trigger === "hover")
|
|
64
|
-
return;
|
|
65
|
-
window.addEventListener("resize", setPosition);
|
|
66
|
-
window.addEventListener("scroll", setPosition, true);
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
68
|
const setPosition = () => {
|
|
71
|
-
|
|
69
|
+
if (!pop.value) {
|
|
70
|
+
window.removeEventListener("resize", setPosition);
|
|
71
|
+
window.removeEventListener("scroll", setPosition, true);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const { top, bottom } = base.value.getBoundingClientRect();
|
|
72
75
|
if (top < 0 || bottom > window.innerHeight) {
|
|
73
76
|
if (props.trigger === "native") {
|
|
74
77
|
emitAct("update:modelValue", false);
|
|
75
78
|
} else {
|
|
76
79
|
showPop.value = false;
|
|
77
80
|
}
|
|
78
|
-
window.removeEventListener("resize", setPosition);
|
|
79
|
-
window.removeEventListener("scroll", setPosition, true);
|
|
80
81
|
return;
|
|
81
82
|
}
|
|
83
|
+
window.addEventListener("resize", setPosition);
|
|
84
|
+
window.addEventListener("scroll", setPosition, true);
|
|
82
85
|
const position = usePotion(base.value, pop.value, {
|
|
83
86
|
position: props.placement
|
|
84
87
|
});
|
|
@@ -87,6 +90,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
87
90
|
};
|
|
88
91
|
const vClickoutside = {
|
|
89
92
|
mounted(el, binding) {
|
|
93
|
+
if (!(el instanceof HTMLElement)) {
|
|
94
|
+
console.error("el must be an instance of HTMLElement");
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
90
97
|
function documentHandler(e) {
|
|
91
98
|
if ((el == null ? void 0 : el.contains) && (el == null ? void 0 : el.contains(e.target))) {
|
|
92
99
|
return false;
|
|
@@ -105,6 +112,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
105
112
|
}
|
|
106
113
|
},
|
|
107
114
|
beforeUnmount(el) {
|
|
115
|
+
if (!(el instanceof HTMLElement)) {
|
|
116
|
+
console.error("el must be an instance of HTMLElement");
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
108
119
|
document.removeEventListener("click", el._vueClickOutside_);
|
|
109
120
|
switch (props.trigger) {
|
|
110
121
|
case "hover":
|
|
@@ -125,8 +136,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
125
136
|
if (disablecancelflag === true) {
|
|
126
137
|
return;
|
|
127
138
|
} else {
|
|
128
|
-
window.removeEventListener("resize", setPosition);
|
|
129
|
-
window.removeEventListener("scroll", setPosition, true);
|
|
130
139
|
if (props.trigger === "native") {
|
|
131
140
|
emitAct("update:modelValue", false);
|
|
132
141
|
} else {
|
|
@@ -168,11 +177,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
168
177
|
renderSlot(_ctx.$slots, "reference"),
|
|
169
178
|
(openBlock(), createBlock(Teleport, {
|
|
170
179
|
to: "body",
|
|
171
|
-
disabled: !
|
|
180
|
+
disabled: !trueFlag.value
|
|
172
181
|
}, [
|
|
173
|
-
|
|
182
|
+
_ctx.vIF ? (openBlock(), createBlock(Transition, {
|
|
183
|
+
key: 0,
|
|
184
|
+
name: "opecity"
|
|
185
|
+
}, {
|
|
174
186
|
default: withCtx(() => [
|
|
175
|
-
|
|
187
|
+
trueFlag.value ? withDirectives((openBlock(), createElementBlock("div", {
|
|
176
188
|
key: 0,
|
|
177
189
|
ref_key: "pop",
|
|
178
190
|
ref: pop,
|
|
@@ -185,7 +197,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
185
197
|
]) : createCommentVNode("", true)
|
|
186
198
|
]),
|
|
187
199
|
_: 3
|
|
188
|
-
})
|
|
200
|
+
})) : (openBlock(), createBlock(Transition, {
|
|
201
|
+
key: 1,
|
|
202
|
+
name: "opecity"
|
|
203
|
+
}, {
|
|
204
|
+
default: withCtx(() => [
|
|
205
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
206
|
+
ref_key: "pop",
|
|
207
|
+
ref: pop,
|
|
208
|
+
class: normalizeClass(["tdd-absolute tdd-z-1000 tdd-rounded tdd-bg-white tdd-p-4 tdd-drop-shadow", [marginClass.value, _ctx.insertClass]]),
|
|
209
|
+
style: normalizeStyle({ width: widthNum.value, top: `${Top.value}px`, left: `${Left.value}px` })
|
|
210
|
+
}, [
|
|
211
|
+
renderSlot(_ctx.$slots, "default")
|
|
212
|
+
], 6)), [
|
|
213
|
+
[vShow, trueFlag.value],
|
|
214
|
+
[vClickoutside, closeCenter]
|
|
215
|
+
])
|
|
216
|
+
]),
|
|
217
|
+
_: 3
|
|
218
|
+
}))
|
|
189
219
|
], 8, ["disabled"]))
|
|
190
220
|
], 40, _hoisted_1);
|
|
191
221
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, inject, useSlots, openBlock, createBlock, h, withDirectives, vModelRadio } from "vue";
|
|
1
|
+
import { defineComponent, inject, useSlots, openBlock, createBlock, h, normalizeClass, withDirectives, vModelRadio } from "vue";
|
|
2
2
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3
3
|
__name: "radiogroup",
|
|
4
4
|
props: {
|
|
@@ -15,7 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
return h(
|
|
16
16
|
"label",
|
|
17
17
|
{
|
|
18
|
-
class: "radioGroup
|
|
18
|
+
class: normalizeClass(["radioGroup", [(_a = MySlot.props) == null ? void 0 : _a.class, props.modelValue == MySlot.props.label ? " tdd-bg-wordblue" : ""]])
|
|
19
19
|
},
|
|
20
20
|
[
|
|
21
21
|
withDirectives(
|
|
@@ -26,14 +26,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
26
|
ParentGetChangeHandle(value);
|
|
27
27
|
emit("update:modelValue", value);
|
|
28
28
|
},
|
|
29
|
-
class: "hiddeninput form-tick"
|
|
29
|
+
class: normalizeClass(["hiddeninput form-tick", [props.showinput ? "" : " tdd-hidden"]])
|
|
30
30
|
}),
|
|
31
31
|
[[vModelRadio, props.modelValue]]
|
|
32
32
|
),
|
|
33
33
|
h(
|
|
34
34
|
"span",
|
|
35
35
|
{
|
|
36
|
-
class: "tdd-text-sm
|
|
36
|
+
class: normalizeClass(["tdd-text-sm", [props.modelValue == MySlot.props.label ? " tdd-text-white" : " tdd-text-word6"]])
|
|
37
37
|
},
|
|
38
38
|
((_b = MySlot.children) == null ? void 0 : _b.default()) || MySlot.props.label
|
|
39
39
|
)
|
package/dist/js/select/select.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, defineAsyncComponent, inject, useSlots, ref, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, h } from "vue";
|
|
1
|
+
import { defineComponent, defineAsyncComponent, inject, useSlots, ref, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, h, normalizeClass } from "vue";
|
|
2
2
|
const _hoisted_1 = ["value", "disabled", "readonly", "placeholder"];
|
|
3
3
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
__name: "select",
|
|
@@ -29,6 +29,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
const isThis = optionList.value.filter((v) => v.value === props.modelValue);
|
|
30
30
|
if (isThis.length > 0) {
|
|
31
31
|
return isThis[0].label;
|
|
32
|
+
} else if (props.modelValue) {
|
|
33
|
+
return;
|
|
32
34
|
} else {
|
|
33
35
|
emit("update:modelValue", null);
|
|
34
36
|
ParentGetChangeHandle && ParentGetChangeHandle(null);
|
|
@@ -45,7 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
47
|
return h(
|
|
46
48
|
"div",
|
|
47
49
|
{
|
|
48
|
-
class:
|
|
50
|
+
class: normalizeClass(["label", [props.modelValue === it.props.value ? "labelselect" : ""]]),
|
|
49
51
|
key: it.props.key,
|
|
50
52
|
onClick: () => {
|
|
51
53
|
emit("update:modelValue", it.props.value);
|
|
@@ -63,7 +65,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
63
65
|
{
|
|
64
66
|
class: "selectOption"
|
|
65
67
|
},
|
|
66
|
-
slots.default().map((i,
|
|
68
|
+
slots.default().map((i, _j) => {
|
|
67
69
|
if (typeof i.children == "string")
|
|
68
70
|
return null;
|
|
69
71
|
if (Array.isArray(i.children)) {
|
|
@@ -78,6 +80,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
78
80
|
};
|
|
79
81
|
return (_ctx, _cache) => {
|
|
80
82
|
return openBlock(), createBlock(unref(Pop), {
|
|
83
|
+
vIF: false,
|
|
81
84
|
trigger: "native",
|
|
82
85
|
modelValue: showOption.value,
|
|
83
86
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showOption.value = $event),
|
package/dist/js/table/table.js
CHANGED
|
@@ -41,7 +41,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
41
|
const renderHead = () => {
|
|
42
42
|
return h(
|
|
43
43
|
"thead",
|
|
44
|
-
{
|
|
44
|
+
{
|
|
45
|
+
class: normalizeClass(["tdd-text-word6", [props.headclass]])
|
|
46
|
+
},
|
|
45
47
|
slots.default().map((it) => {
|
|
46
48
|
if (typeof it.children == "string")
|
|
47
49
|
return null;
|
|
@@ -155,7 +157,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
155
157
|
return h(
|
|
156
158
|
"td",
|
|
157
159
|
{
|
|
158
|
-
class:
|
|
160
|
+
class: normalizeClass(["tdd-text-center tdd-py-2", [props.cellclass]])
|
|
159
161
|
},
|
|
160
162
|
((_a = it.props) == null ? void 0 : _a.type) && it.props.type === "selection" ? h(
|
|
161
163
|
"label",
|
package/dist/js/tabs/tabs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, useSlots, onMounted, openBlock, createElementBlock,
|
|
1
|
+
import { defineComponent, computed, ref, useSlots, onMounted, openBlock, createElementBlock, createVNode, createElementVNode, normalizeStyle, createCommentVNode, h, normalizeClass, withDirectives, vShow } from "vue";
|
|
2
2
|
const _hoisted_1 = { class: "tdd-relative tdd-w-full tdd-overflow-hidden" };
|
|
3
3
|
const _hoisted_2 = {
|
|
4
4
|
key: 0,
|
|
@@ -69,7 +69,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
69
|
"button",
|
|
70
70
|
{
|
|
71
71
|
type: "button",
|
|
72
|
-
class: btc
|
|
72
|
+
class: normalizeClass(btc),
|
|
73
73
|
onClick: (e) => {
|
|
74
74
|
activeIndex.value = index;
|
|
75
75
|
let aim = e.target;
|
|
@@ -91,7 +91,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
91
91
|
return h(
|
|
92
92
|
"div",
|
|
93
93
|
{
|
|
94
|
-
class:
|
|
94
|
+
class: normalizeClass(["ETab", [props.type === "line" ? " tdd-px-2 tdd-pt-2" : " ETab_Card"]])
|
|
95
95
|
},
|
|
96
96
|
slots.default().map((it, index) => {
|
|
97
97
|
if (typeof it.children == "string")
|
|
@@ -148,27 +148,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
148
148
|
}
|
|
149
149
|
});
|
|
150
150
|
return (_ctx, _cache) => {
|
|
151
|
-
return openBlock(), createElementBlock(
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
createElementVNode("div", _hoisted_3, [
|
|
168
|
-
createVNode(renderContent)
|
|
169
|
-
])
|
|
151
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
152
|
+
createVNode(renderBar, {
|
|
153
|
+
ref_key: "btnBar",
|
|
154
|
+
ref: btnBar
|
|
155
|
+
}, null, 512),
|
|
156
|
+
showBaseline.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
157
|
+
createElementVNode("div", {
|
|
158
|
+
class: "tdd-absolute tdd-bottom-0 tdd-border-t-2 tdd-border-solid tdd-border-blue-brand tdd-transition",
|
|
159
|
+
style: normalizeStyle({
|
|
160
|
+
transform: `translateX(${arrowNum.value}px`,
|
|
161
|
+
width: `${arrowWidth.value}px`
|
|
162
|
+
})
|
|
163
|
+
}, null, 4)
|
|
164
|
+
])) : createCommentVNode("", true),
|
|
165
|
+
createElementVNode("div", _hoisted_3, [
|
|
166
|
+
createVNode(renderContent)
|
|
170
167
|
])
|
|
171
|
-
]
|
|
168
|
+
]);
|
|
172
169
|
};
|
|
173
170
|
}
|
|
174
171
|
});
|