@cldemo/ui-kit 1.1.3 → 1.1.4
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/buildLibs/all/index.cjs +8 -8
- package/buildLibs/all/index.js +12157 -12048
- package/buildLibs/common/globalConfig.cjs +1 -1
- package/buildLibs/common/globalConfig.js +29 -15
- package/buildLibs/common/i18n/en.cjs +1 -1
- package/buildLibs/common/i18n/en.js +3 -1
- package/buildLibs/common/i18n/zh_CN.cjs +1 -1
- package/buildLibs/common/i18n/zh_CN.js +3 -1
- package/buildLibs/common/index.cjs +1 -1
- package/buildLibs/common/index.js +26 -24
- package/buildLibs/mobile/index.cjs +5 -5
- package/buildLibs/mobile/index.js +5902 -5852
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CKoVf-v1.js → Index.vue_vue_type_script_setup_true_lang-88gNFuK4.js} +2 -2
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-BQXxDHbe.js +254 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-D0g1xGPL.js → Index.vue_vue_type_script_setup_true_lang-BR0S3Sfl.js} +3 -3
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-RRUPY9bd.js → Index.vue_vue_type_script_setup_true_lang-BrfAVhNV.js} +153 -145
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DdLVG0R0.js → Index.vue_vue_type_script_setup_true_lang-Bw_jRoEX.js} +67 -59
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-C6Zd584S.js +2536 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BOcOO9-n.js → Index.vue_vue_type_script_setup_true_lang-CD66oCaI.js} +386 -375
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-CEBiLDTm.js +310 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-C0DgaU5I.js → Index.vue_vue_type_script_setup_true_lang-CRlBvcCg.js} +53 -47
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DqZBB8fM.js → Index.vue_vue_type_script_setup_true_lang-CdYh3Pzs.js} +1 -1
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-XiSSYx4X.js → Index.vue_vue_type_script_setup_true_lang-D7YeNBdk.js} +120 -113
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-DKMVQrVU.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-D9sq4n9i.js} +66 -60
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CRKrLCa6.js → Index.vue_vue_type_script_setup_true_lang-DFeBj9IN.js} +209 -201
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-D7bJ5UAn.js → Index.vue_vue_type_script_setup_true_lang-DY3tZQZe.js} +63 -55
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-D_73B6av.js +1533 -0
- package/buildLibs/modules/shared/{Validate.vue_vue_type_script_setup_true_lang-3s_3ut9M.js → Validate.vue_vue_type_script_setup_true_lang-hn1Tat7L.js} +102 -92
- package/buildLibs/types/All/index.d.ts +1 -1
- package/buildLibs/types/Common/globalConfig.d.ts +29 -0
- package/buildLibs/types/Common/globalTypes.d.ts +11 -0
- package/buildLibs/types/Common/i18n/en.d.ts +2 -0
- package/buildLibs/types/Common/i18n/zh_CN.d.ts +2 -0
- package/buildLibs/types/Common/index.d.ts +1 -1
- package/buildLibs/types/Element/CheckBox/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/Input/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/InputNumber/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/InputNumberStepper/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/InputTextarea/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/Radio/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/DateTime/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/FileUpload/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/Select/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectCascade/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectMove/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectTag/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectTree/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/Tree/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/componentsInstalls.d.ts +90 -0
- package/buildLibs/utils/Element/ClCheckbox.cjs +1 -1
- package/buildLibs/utils/Element/ClCheckbox.js +1 -1
- package/buildLibs/utils/Element/ClInput.cjs +1 -1
- package/buildLibs/utils/Element/ClInput.js +1 -1
- package/buildLibs/utils/Element/ClInputCaptcha.cjs +1 -1
- package/buildLibs/utils/Element/ClInputCaptcha.js +1 -1
- package/buildLibs/utils/Element/ClInputNumber.cjs +1 -1
- package/buildLibs/utils/Element/ClInputNumber.js +1 -1
- package/buildLibs/utils/Element/ClInputNumberStepper.cjs +1 -1
- package/buildLibs/utils/Element/ClInputNumberStepper.js +1 -1
- package/buildLibs/utils/Element/ClInputPassword.cjs +1 -1
- package/buildLibs/utils/Element/ClInputPassword.js +1 -1
- package/buildLibs/utils/Element/ClInputSearch.cjs +1 -1
- package/buildLibs/utils/Element/ClInputSearch.js +1 -1
- package/buildLibs/utils/Element/ClInputTextarea.cjs +1 -1
- package/buildLibs/utils/Element/ClInputTextarea.js +1 -1
- package/buildLibs/utils/Element/ClRadio.cjs +1 -1
- package/buildLibs/utils/Element/ClRadio.js +1 -1
- package/buildLibs/utils/Element/__provide__/Validate.cjs +1 -1
- package/buildLibs/utils/Element/__provide__/Validate.js +13 -3
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C1OgPpoJ.js → Index.vue_vue_type_script_setup_true_lang-0S6ab-Lp.js} +120 -113
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-neC9NxKi.js → Index.vue_vue_type_script_setup_true_lang-2Fe9SkjL.js} +209 -201
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-2THK822S.js +254 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BO4cal3i.js → Index.vue_vue_type_script_setup_true_lang-2dwwjiTV.js} +386 -375
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5itnjwU_.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-ChnRq_PS.js → Index.vue_vue_type_script_setup_true_lang-B0MJO0JM.js} +2 -2
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BIO6Me43.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BN9ybiKv.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BpG7AHvM.js +1 -0
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-CAe8mhTl.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-CATwJnes.js} +66 -60
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CW4fM0by.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DxYJbPyJ.js → Index.vue_vue_type_script_setup_true_lang-C_exHzjc.js} +3 -3
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CsCn637u.js +2 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D_XMW7K4.js → Index.vue_vue_type_script_setup_true_lang-D4a5Iaue.js} +153 -145
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DXPZYc0c.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DY4m6Xyj.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DZCt32jb.js +1533 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DZF2gj7X.js +2536 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-De1eNjwC.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C6Evk0-z.js → Index.vue_vue_type_script_setup_true_lang-DtAy8lm9.js} +53 -47
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DvN-fBNd.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DwBf338f.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Cg_benGj.js → Index.vue_vue_type_script_setup_true_lang-F9tBnc_7.js} +63 -55
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-HfnOtuMz.js +310 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dwkuei2j.js → Index.vue_vue_type_script_setup_true_lang-VjIva6RM.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-j7gxlOeM.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CgdGs-U2.js → Index.vue_vue_type_script_setup_true_lang-lKDQFZtY.js} +67 -59
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dzm58mMQ.js → Index.vue_vue_type_script_setup_true_lang-nAMiORzN.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CizRrQsH.js → Index.vue_vue_type_script_setup_true_lang-oovIcT38.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BIFHYrzc.js → Index.vue_vue_type_script_setup_true_lang-qqnmaRnk.js} +1 -1
- package/buildLibs/utils/Web/ClColorPicker.cjs +1 -1
- package/buildLibs/utils/Web/ClColorPicker.js +1 -1
- package/buildLibs/utils/Web/ClCropperPreview.cjs +1 -1
- package/buildLibs/utils/Web/ClCropperPreview.js +1 -1
- package/buildLibs/utils/Web/ClDateTime.cjs +1 -1
- package/buildLibs/utils/Web/ClDateTime.js +1 -1
- package/buildLibs/utils/Web/ClFileUpload.cjs +1 -1
- package/buildLibs/utils/Web/ClFileUpload.js +1 -1
- package/buildLibs/utils/Web/ClInputTag.cjs +1 -1
- package/buildLibs/utils/Web/ClInputTag.js +1 -1
- package/buildLibs/utils/Web/ClPaginate.cjs +1 -1
- package/buildLibs/utils/Web/ClPaginate.js +1 -1
- package/buildLibs/utils/Web/ClSelect.cjs +1 -1
- package/buildLibs/utils/Web/ClSelect.js +1 -1
- package/buildLibs/utils/Web/ClSelectCascade.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectCascade.js +1 -1
- package/buildLibs/utils/Web/ClSelectMove.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectMove.js +655 -647
- package/buildLibs/utils/Web/ClSelectTag.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectTag.js +1 -1
- package/buildLibs/utils/Web/ClSelectTree.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectTree.js +71 -63
- package/buildLibs/utils/Web/ClTable.cjs +1 -1
- package/buildLibs/utils/Web/ClTable.js +1 -1
- package/buildLibs/utils/Web/ClTree.cjs +1 -1
- package/buildLibs/utils/Web/ClTree.js +1 -1
- package/buildLibs/utils/Web/ClXEditable.cjs +1 -1
- package/buildLibs/utils/Web/ClXEditable.js +10 -10
- package/buildLibs/web/index.cjs +7 -7
- package/buildLibs/web/index.js +10792 -10685
- package/docs/components/Element/Checkbox.md +2 -1
- package/docs/components/Element/Form.md +15 -0
- package/docs/components/Element/Input.md +2 -1
- package/docs/components/Element/InputNumber.md +2 -1
- package/docs/components/Element/InputNumberStepper.md +2 -1
- package/docs/components/Element/InputTextarea.md +2 -1
- package/docs/components/Element/Radio.md +2 -1
- package/docs/components/Web/DateTime.md +2 -1
- package/docs/components/Web/FileUpload.md +2 -1
- package/docs/components/Web/Select.md +2 -1
- package/docs/components/Web/SelectCascade.md +1 -0
- package/docs/components/Web/SelectMove.md +2 -1
- package/docs/components/Web/SelectTag.md +1 -0
- package/docs/components/Web/SelectTree.md +2 -1
- package/docs/components/Web/Tree.md +2 -1
- package/package.json +1 -1
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-CiNidFJt.js +0 -246
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-DC6727pS.js +0 -2528
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-EXqjkKwS.js +0 -302
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-Hg16dgRQ.js +0 -1527
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5aX79Fcf.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BRvOcf4B.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Ba8Z8fOP.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BjNP5odR.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CQ3RGLek.js +0 -302
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CY5fRV6o.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CYN4r-Mx.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-C_7ArHlU.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CuJjJvft.js +0 -2
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CwjigRBx.js +0 -2528
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-D6cmq0Tf.js +0 -1527
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Dbf-3Nik.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DgD_gHit.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-FowII7_3.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-c7oxeU_j.js +0 -246
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-vLqCsSbV.js +0 -1
|
@@ -3,18 +3,19 @@ import '../../styles/Common/IconFont-base.css';
|
|
|
3
3
|
import '../../styles/Common/Input-base.css';
|
|
4
4
|
import '../../styles/Common/Fade-base.css';
|
|
5
5
|
import '../../styles/Web/ClSelectMove.css';
|
|
6
|
-
import { defineComponent as
|
|
6
|
+
import { defineComponent as ae, resolveComponent as Me, openBlock as C, createElementBlock as K, Fragment as q, renderList as ue, createElementVNode as N, withModifiers as Le, normalizeClass as ie, createVNode as ne, createBlock as se, inject as le, reactive as pe, ref as ce, computed as ee, onUnmounted as ke, watch as z, normalizeStyle as ye, toDisplayString as fe, unref as oe, onMounted as Ce, nextTick as ge, withDirectives as Ae, vShow as Je, renderSlot as he, onBeforeUnmount as Ke, provide as Te, withCtx as re, useSlots as Pe, useTemplateRef as Ve, mergeProps as ve } from "vue";
|
|
7
7
|
import e from "@cldemo/ui-kit/common/base";
|
|
8
|
-
import {
|
|
9
|
-
import { _ as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { _ as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
8
|
+
import { getPlaintextOutText as $e } from "@cldemo/ui-kit/common/globalConfig";
|
|
9
|
+
import { _ as De } from "../Shared/Index.vue_vue_type_script_setup_true_lang-cOsTL39H.js";
|
|
10
|
+
import { _ as Oe } from "../Shared/List.vue_vue_type_script_setup_true_lang-CRkZfB8a.js";
|
|
11
|
+
import me from "@cldemo/ui-kit/common/log";
|
|
12
|
+
import we from "@cldemo/ui-kit/common/Element";
|
|
13
|
+
import { _ as Fe } from "../Shared/Index.vue_vue_type_script_setup_true_lang-VjIva6RM.js";
|
|
14
|
+
import { _ as Se } from "../Shared/One.vue_vue_type_script_setup_true_lang-cviYcHLZ.js";
|
|
15
|
+
import { a as _e } from "../Shared/language-CZZEj4e3.js";
|
|
16
|
+
import { _ as be } from "../Shared/Index.vue_vue_type_script_setup_true_lang-C2LGy18j.js";
|
|
16
17
|
/* empty css */
|
|
17
|
-
const
|
|
18
|
+
const Ue = ["onClick"], Ne = ["innerHTML"], Be = /* @__PURE__ */ ae({
|
|
18
19
|
name: "ClSelectMoveSearchUl",
|
|
19
20
|
__name: "SearchTree",
|
|
20
21
|
props: {
|
|
@@ -25,44 +26,44 @@ const Oe = ["onClick"], Fe = ["innerHTML"], Ue = /* @__PURE__ */ le({
|
|
|
25
26
|
}
|
|
26
27
|
},
|
|
27
28
|
emits: {
|
|
28
|
-
onClick: (
|
|
29
|
+
onClick: (c) => !0
|
|
29
30
|
// desc: 点击节点选中
|
|
30
31
|
},
|
|
31
|
-
setup(
|
|
32
|
-
const
|
|
33
|
-
e.isUndefined(A) ||
|
|
32
|
+
setup(c, { emit: X }) {
|
|
33
|
+
const n = X, a = `selectmove-search-tree-${e.getRandom(5)}`, P = (A) => {
|
|
34
|
+
e.isUndefined(A) || n("onClick", A.toString());
|
|
34
35
|
};
|
|
35
|
-
return (A,
|
|
36
|
-
const h =
|
|
37
|
-
return
|
|
38
|
-
(
|
|
39
|
-
key: `${
|
|
36
|
+
return (A, V) => {
|
|
37
|
+
const h = Me("cl-select-move-search-ul");
|
|
38
|
+
return C(), K("ul", null, [
|
|
39
|
+
(C(!0), K(q, null, ue(c.list, (s, M) => (C(), K("li", {
|
|
40
|
+
key: `${a}-${s.id}-${M}`
|
|
40
41
|
}, [
|
|
41
42
|
N("a", {
|
|
42
43
|
href: "javascript:",
|
|
43
44
|
tabindex: "-1",
|
|
44
|
-
class:
|
|
45
|
-
onClick:
|
|
45
|
+
class: ie({ "tree-hig": s.isHig, "tree-active": s.isSelected }),
|
|
46
|
+
onClick: Le((D) => P(s.id), ["stop"])
|
|
46
47
|
}, [
|
|
47
|
-
|
|
48
|
+
ne(Se, {
|
|
48
49
|
value: s.isSelected,
|
|
49
50
|
indeterminate: s.isIndeterminate
|
|
50
51
|
}, null, 8, ["value", "indeterminate"]),
|
|
51
52
|
N("span", {
|
|
52
53
|
class: "tree-text",
|
|
53
54
|
innerHTML: s.showTextLabel
|
|
54
|
-
}, null, 8,
|
|
55
|
-
], 10,
|
|
56
|
-
s.list && s.list.length > 0 ? (
|
|
55
|
+
}, null, 8, Ne)
|
|
56
|
+
], 10, Ue),
|
|
57
|
+
s.list && s.list.length > 0 ? (C(), se(h, {
|
|
57
58
|
key: 0,
|
|
58
59
|
list: s.list,
|
|
59
|
-
onOnClick:
|
|
60
|
-
}, null, 8, ["list"])) : (
|
|
60
|
+
onOnClick: P
|
|
61
|
+
}, null, 8, ["list"])) : (C(), K(q, { key: 1 }, [], 64))
|
|
61
62
|
]))), 128))
|
|
62
63
|
]);
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
|
-
}),
|
|
66
|
+
}), He = { class: "selectmove-search-list" }, Re = { key: 1 }, je = { class: "selectmove-search-empty" }, We = 1e3, Ge = /* @__PURE__ */ ae({
|
|
66
67
|
name: "ClSelectMoveSearch",
|
|
67
68
|
__name: "Search",
|
|
68
69
|
props: {
|
|
@@ -111,23 +112,23 @@ const Oe = ["onClick"], Fe = ["innerHTML"], Ue = /* @__PURE__ */ le({
|
|
|
111
112
|
}
|
|
112
113
|
},
|
|
113
114
|
emits: {
|
|
114
|
-
onChange: (
|
|
115
|
+
onChange: (c) => !0
|
|
115
116
|
// desc: 搜索选中值变更
|
|
116
117
|
},
|
|
117
|
-
setup(
|
|
118
|
-
const
|
|
118
|
+
setup(c, { emit: X }) {
|
|
119
|
+
const n = c, a = X, { optPageLanguage: P, getPageLanguage: A } = _e();
|
|
119
120
|
A("common");
|
|
120
|
-
const
|
|
121
|
-
if (e.isUndefined(
|
|
121
|
+
const V = le("$SelectmoveTop"), h = le("$SelectmoveBase");
|
|
122
|
+
if (e.isUndefined(V) || e.isUndefined(h))
|
|
122
123
|
throw new Error(
|
|
123
124
|
"SelectMove.Search 缺少容器依赖($SelectmoveTop/$SelectmoveBase),请确保在 ClSelectMove 内使用"
|
|
124
125
|
);
|
|
125
|
-
const s =
|
|
126
|
+
const s = pe({
|
|
126
127
|
isOpen: !1,
|
|
127
128
|
isInitSelect: !1
|
|
128
|
-
}), M =
|
|
129
|
-
let
|
|
130
|
-
const
|
|
129
|
+
}), M = ce([]), D = ce([]);
|
|
130
|
+
let O = "", H = [];
|
|
131
|
+
const R = {
|
|
131
132
|
jsonSelectIds: {},
|
|
132
133
|
jsonSelectHalfIds: {}
|
|
133
134
|
}, G = ee(() => ({
|
|
@@ -136,184 +137,184 @@ const Oe = ["onClick"], Fe = ["innerHTML"], Ue = /* @__PURE__ */ le({
|
|
|
136
137
|
})), Y = ee(() => ({
|
|
137
138
|
"selectmove-search-dropdown": !0,
|
|
138
139
|
"selectmove-search-open": s.isOpen
|
|
139
|
-
})),
|
|
140
|
-
const
|
|
141
|
-
return
|
|
140
|
+
})), l = ee(() => {
|
|
141
|
+
const d = {};
|
|
142
|
+
return n.width && n.width > 0 && (d.width = `${n.width}px`), d;
|
|
142
143
|
}), f = () => {
|
|
143
|
-
|
|
144
|
-
},
|
|
144
|
+
a("onChange", D.value.join(","));
|
|
145
|
+
}, g = () => {
|
|
145
146
|
s.isOpen = !1, M.value = [];
|
|
146
|
-
},
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
152
|
-
return
|
|
153
|
-
const
|
|
154
|
-
if (e.isEmpty(
|
|
155
|
-
return
|
|
156
|
-
const w = e.isNonEmptyString(
|
|
157
|
-
return e.isArray(
|
|
158
|
-
if (e.isUndefined(
|
|
147
|
+
}, I = (d) => {
|
|
148
|
+
const y = h.convertSelectHalf(d);
|
|
149
|
+
D.value = d, R.jsonSelectHalfIds = e.getArrConvertJson(y), R.jsonSelectIds = e.getArrConvertJson(d);
|
|
150
|
+
}, x = (d) => {
|
|
151
|
+
const y = d.toLowerCase().trim();
|
|
152
|
+
if (y === O)
|
|
153
|
+
return H;
|
|
154
|
+
const b = [];
|
|
155
|
+
if (e.isEmpty(n.searchKey))
|
|
156
|
+
return me.warn("ClSelectMoveSearch", "SelectMove.Search searchKey 为空,搜索将无结果"), O = y, H = b, b;
|
|
157
|
+
const w = e.isNonEmptyString(n.searchMultipleJoin) ? n.searchMultipleJoin : ",", k = n.searchIsMultiple ? y.split(w).map((B) => B.trim()) : [y], j = n.searchKey.length, Z = n.searchKey, F = V.getDataList();
|
|
158
|
+
return e.isArray(F) ? (F.forEach((B) => {
|
|
159
|
+
if (e.isUndefined(B) || e.isUndefined(B.id) || !e.isString(B.id) && !e.isNumber(B.id))
|
|
159
160
|
return;
|
|
160
|
-
const
|
|
161
|
-
let
|
|
162
|
-
for (let
|
|
163
|
-
const
|
|
164
|
-
if (!e.isString(
|
|
165
|
-
|
|
161
|
+
const t = B.id.toString(), u = [];
|
|
162
|
+
let m = 0;
|
|
163
|
+
for (let E = 0; E < j; E++) {
|
|
164
|
+
const T = B[Z[E]];
|
|
165
|
+
if (!e.isString(T)) {
|
|
166
|
+
m++;
|
|
166
167
|
continue;
|
|
167
168
|
}
|
|
168
|
-
const
|
|
169
|
-
let
|
|
170
|
-
for (let
|
|
171
|
-
if (k[
|
|
172
|
-
|
|
169
|
+
const $ = T.toLowerCase();
|
|
170
|
+
let U = !1;
|
|
171
|
+
for (let W = 0; W < k.length; W++)
|
|
172
|
+
if (k[W].length > 0 && $.indexOf(k[W]) > -1) {
|
|
173
|
+
U = !0;
|
|
173
174
|
break;
|
|
174
175
|
}
|
|
175
|
-
|
|
176
|
+
U && u.push(!0);
|
|
176
177
|
}
|
|
177
|
-
if (
|
|
178
|
-
switch (
|
|
178
|
+
if (u.length > 0)
|
|
179
|
+
switch (n.searchKeyType) {
|
|
179
180
|
case "||":
|
|
180
|
-
|
|
181
|
+
b.push(t);
|
|
181
182
|
break;
|
|
182
183
|
case "&&":
|
|
183
|
-
|
|
184
|
+
u.length === j - m && b.push(t);
|
|
184
185
|
break;
|
|
185
186
|
default:
|
|
186
|
-
|
|
187
|
+
me.warn(
|
|
187
188
|
"ClSelectMoveSearch",
|
|
188
|
-
`SelectMove.Search searchKeyType 未知值「${
|
|
189
|
-
),
|
|
189
|
+
`SelectMove.Search searchKeyType 未知值「${n.searchKeyType}」,按 || 兜底`
|
|
190
|
+
), b.push(t);
|
|
190
191
|
break;
|
|
191
192
|
}
|
|
192
|
-
}),
|
|
193
|
-
}, v = (
|
|
194
|
-
const j = [],
|
|
195
|
-
return e.isExistJsonKey(
|
|
196
|
-
if (
|
|
193
|
+
}), O = y, H = b, b) : (O = y, H = b, b);
|
|
194
|
+
}, v = (d, y, b, w, k) => {
|
|
195
|
+
const j = [], Z = k || [];
|
|
196
|
+
return e.isExistJsonKey(y, d) && y[d].forEach((F) => {
|
|
197
|
+
if (Z.indexOf(F) > -1)
|
|
197
198
|
return;
|
|
198
|
-
const
|
|
199
|
-
if (e.isEmpty(
|
|
199
|
+
const B = Z.concat([F]), t = e.getJsonClone(V.getDataInfo(F));
|
|
200
|
+
if (e.isEmpty(t))
|
|
200
201
|
return;
|
|
201
|
-
let
|
|
202
|
-
const
|
|
203
|
-
if (
|
|
204
|
-
let
|
|
205
|
-
e.isArray(
|
|
202
|
+
let u = e.isNonEmptyString(t.name) ? e.encodeHTML(t.name) : "";
|
|
203
|
+
const m = n.searchTextFormat;
|
|
204
|
+
if (m && m.length > 0) {
|
|
205
|
+
let $ = "";
|
|
206
|
+
e.isArray(m) ? m.length > b && ($ = m[b]) : e.isString(m) && ($ = m), e.isEmpty($) || (u = e.convertStringFormatEncodeHTML($, t));
|
|
206
207
|
}
|
|
207
|
-
|
|
208
|
-
let
|
|
209
|
-
|
|
208
|
+
t.showTextLabel = u;
|
|
209
|
+
let E = !1, T = e.isExistJsonKey(y, F);
|
|
210
|
+
T ? t.list = v(F, y, b + 1, w, B) : (E = !0, t.list = [], V.getDataGroup(F).length > 0 && (T = !0, E = !1)), t.isIndeterminate = e.isExistJsonKey(R.jsonSelectHalfIds, F), t.isSelected = e.isExistJsonKey(R.jsonSelectIds, F), t.isChild = T, t.isLast = E, t.treeLevel = b, t.isHig = e.isExistJsonKey(w, F), j.push(t);
|
|
210
211
|
}), j;
|
|
211
|
-
},
|
|
212
|
-
if (
|
|
212
|
+
}, _ = (d) => {
|
|
213
|
+
if (d.length === 0)
|
|
213
214
|
return [];
|
|
214
|
-
const { parentKey:
|
|
215
|
+
const { parentKey: y, topParentValue: b } = n, w = {};
|
|
215
216
|
let k = [];
|
|
216
|
-
|
|
217
|
-
w[
|
|
218
|
-
const
|
|
219
|
-
k.push(...
|
|
217
|
+
d.forEach((F) => {
|
|
218
|
+
w[F] = !0;
|
|
219
|
+
const B = h.getParentIds(F);
|
|
220
|
+
k.push(...B), k.push(F);
|
|
220
221
|
}), k = e.getArrUnique(k);
|
|
221
222
|
const j = {};
|
|
222
|
-
k.forEach((
|
|
223
|
-
const
|
|
224
|
-
if (e.isUndefined(
|
|
223
|
+
k.forEach((F) => {
|
|
224
|
+
const B = V.getDataInfo(F);
|
|
225
|
+
if (e.isUndefined(B))
|
|
225
226
|
return;
|
|
226
|
-
const
|
|
227
|
-
e.isExistJsonKey(j,
|
|
227
|
+
const t = B[y], u = e.isEmpty(t) ? b : t.toString(), m = u === b ? V.getTopParentValue() : u;
|
|
228
|
+
e.isExistJsonKey(j, m) || (j[m] = []), j[m].push(F);
|
|
228
229
|
});
|
|
229
|
-
const
|
|
230
|
-
return e.isExistJsonKey(j,
|
|
231
|
-
},
|
|
232
|
-
if (s.isInitSelect = !1, !e.isEqualArr(
|
|
233
|
-
const
|
|
234
|
-
y
|
|
230
|
+
const Z = V.getTopParentValue();
|
|
231
|
+
return e.isExistJsonKey(j, Z) || me.warn("ClSelectMoveSearch", "SelectMove.Search 数据存在环或祖先链断裂,搜索结果可能为空"), v(Z, j, 0, w);
|
|
232
|
+
}, r = () => {
|
|
233
|
+
if (s.isInitSelect = !1, !e.isEqualArr(n.selectId, D.value)) {
|
|
234
|
+
const y = h.convertSelectedValue(n.selectId, !0, []);
|
|
235
|
+
I(y);
|
|
235
236
|
}
|
|
236
|
-
}, p = (
|
|
237
|
-
if (e.isNonEmptyString(
|
|
238
|
-
s.isInitSelect &&
|
|
239
|
-
const
|
|
240
|
-
M.value =
|
|
237
|
+
}, p = (d) => {
|
|
238
|
+
if (e.isNonEmptyString(d)) {
|
|
239
|
+
s.isInitSelect && r();
|
|
240
|
+
const y = x(d), b = _(y);
|
|
241
|
+
M.value = b, s.isOpen = !0;
|
|
241
242
|
} else
|
|
242
|
-
|
|
243
|
-
},
|
|
244
|
-
const
|
|
245
|
-
return
|
|
246
|
-
const w = e.getJsonClone(
|
|
243
|
+
g();
|
|
244
|
+
}, i = (d) => {
|
|
245
|
+
const y = [];
|
|
246
|
+
return d.forEach((b) => {
|
|
247
|
+
const w = e.getJsonClone(b);
|
|
247
248
|
if (e.isUndefined(w) || e.isUndefined(w.id))
|
|
248
249
|
return;
|
|
249
250
|
const k = w.id.toString();
|
|
250
|
-
w.isIndeterminate = e.isExistJsonKey(
|
|
251
|
-
}),
|
|
252
|
-
},
|
|
251
|
+
w.isIndeterminate = e.isExistJsonKey(R.jsonSelectHalfIds, k), w.isSelected = e.isExistJsonKey(R.jsonSelectIds, k), w.list && w.list.length > 0 && (w.list = i(w.list)), y.push(w);
|
|
252
|
+
}), y;
|
|
253
|
+
}, o = (d) => {
|
|
253
254
|
if (s.isOpen) {
|
|
254
|
-
const
|
|
255
|
-
e.isUndefined(
|
|
255
|
+
const y = we.getParent(d.target, ".selectmove-search");
|
|
256
|
+
e.isUndefined(y) && (s.isOpen = !1);
|
|
256
257
|
}
|
|
257
258
|
};
|
|
258
|
-
|
|
259
|
-
document.body.removeEventListener("click",
|
|
259
|
+
ke(() => {
|
|
260
|
+
document.body.removeEventListener("click", o);
|
|
260
261
|
}), z(
|
|
261
262
|
() => s.isOpen,
|
|
262
|
-
(
|
|
263
|
-
|
|
263
|
+
(d) => {
|
|
264
|
+
d ? document.body.addEventListener("click", o) : document.body.removeEventListener("click", o);
|
|
264
265
|
}
|
|
265
266
|
), z(
|
|
266
|
-
() =>
|
|
267
|
+
() => n.selectId,
|
|
267
268
|
() => {
|
|
268
|
-
s.isInitSelect = !0, s.isOpen && (
|
|
269
|
+
s.isInitSelect = !0, s.isOpen && (r(), M.value = i(M.value));
|
|
269
270
|
},
|
|
270
271
|
{ immediate: !0 }
|
|
271
272
|
), z(
|
|
272
|
-
() => [
|
|
273
|
+
() => [n.searchKey, n.searchKeyType, n.searchIsMultiple, n.searchMultipleJoin],
|
|
273
274
|
() => {
|
|
274
|
-
|
|
275
|
+
O = "", H = [];
|
|
275
276
|
}
|
|
276
277
|
);
|
|
277
|
-
const
|
|
278
|
-
p(
|
|
279
|
-
}, L = (
|
|
280
|
-
s.isOpen || p(
|
|
281
|
-
}, J = (
|
|
282
|
-
const
|
|
283
|
-
|
|
278
|
+
const S = (d) => {
|
|
279
|
+
p(d);
|
|
280
|
+
}, L = (d) => {
|
|
281
|
+
s.isOpen || p(d);
|
|
282
|
+
}, J = (d) => {
|
|
283
|
+
const y = e.isExistJsonKey(R.jsonSelectIds, d), b = h.convertSelectedValue(d, !y, D.value);
|
|
284
|
+
I(b), M.value = i(M.value), f();
|
|
284
285
|
};
|
|
285
|
-
return (
|
|
286
|
+
return (d, y) => (C(), K("div", {
|
|
286
287
|
class: "selectmove-search",
|
|
287
|
-
style:
|
|
288
|
+
style: ye(l.value)
|
|
288
289
|
}, [
|
|
289
290
|
N("div", {
|
|
290
|
-
class:
|
|
291
|
+
class: ie(G.value)
|
|
291
292
|
}, [
|
|
292
|
-
|
|
293
|
-
placeholder:
|
|
294
|
-
disabled:
|
|
295
|
-
changeDelayTime:
|
|
296
|
-
onOnChange:
|
|
293
|
+
ne(Fe, {
|
|
294
|
+
placeholder: c.placeholder,
|
|
295
|
+
disabled: c.disabled,
|
|
296
|
+
changeDelayTime: We,
|
|
297
|
+
onOnChange: S,
|
|
297
298
|
onOnFocus: L
|
|
298
299
|
}, null, 8, ["placeholder", "disabled"])
|
|
299
300
|
], 2),
|
|
300
|
-
s.isOpen ? (
|
|
301
|
+
s.isOpen ? (C(), K("div", {
|
|
301
302
|
key: 0,
|
|
302
|
-
class:
|
|
303
|
+
class: ie(Y.value)
|
|
303
304
|
}, [
|
|
304
|
-
N("div",
|
|
305
|
-
M.value.length > 0 ? (
|
|
305
|
+
N("div", He, [
|
|
306
|
+
M.value.length > 0 ? (C(), se(Be, {
|
|
306
307
|
key: 0,
|
|
307
308
|
list: M.value,
|
|
308
309
|
onOnClick: J
|
|
309
|
-
}, null, 8, ["list"])) : (
|
|
310
|
-
N("li",
|
|
310
|
+
}, null, 8, ["list"])) : (C(), K("ul", Re, [
|
|
311
|
+
N("li", je, fe(oe(P).noResultsText), 1)
|
|
311
312
|
]))
|
|
312
313
|
])
|
|
313
|
-
], 2)) : (
|
|
314
|
+
], 2)) : (C(), K(q, { key: 1 }, [], 64))
|
|
314
315
|
], 4));
|
|
315
316
|
}
|
|
316
|
-
}),
|
|
317
|
+
}), qe = { class: "selectmove-tree" }, ze = { class: "selectmove-tree-head" }, Xe = { class: "selectmove-tree-head-title" }, Ye = { class: "selectmove-tree-body" }, Qe = ["onClick"], Ze = ["innerHTML"], xe = 10, et = /* @__PURE__ */ ae({
|
|
317
318
|
name: "ClSelectMoveTree",
|
|
318
319
|
__name: "Tree",
|
|
319
320
|
props: {
|
|
@@ -344,206 +345,206 @@ const Oe = ["onClick"], Fe = ["innerHTML"], Ue = /* @__PURE__ */ le({
|
|
|
344
345
|
// desc: 数据刷新索引
|
|
345
346
|
},
|
|
346
347
|
emits: {
|
|
347
|
-
onChange: (
|
|
348
|
+
onChange: (c) => !0
|
|
348
349
|
// desc: 选中值变更
|
|
349
350
|
},
|
|
350
|
-
setup(
|
|
351
|
-
const
|
|
352
|
-
if (e.isUndefined(
|
|
351
|
+
setup(c, { emit: X }) {
|
|
352
|
+
const n = c, a = X, P = le("$SelectmoveTop"), A = le("$SelectmoveBase");
|
|
353
|
+
if (e.isUndefined(P) || e.isUndefined(A))
|
|
353
354
|
throw new Error(
|
|
354
355
|
"SelectMove.Tree 缺少容器依赖($SelectmoveTop/$SelectmoveBase),请确保在 ClSelectMove 内使用"
|
|
355
356
|
);
|
|
356
|
-
const
|
|
357
|
+
const V = `selectmove-tree-${e.getRandom(5)}`, h = pe({
|
|
357
358
|
selectIds: [],
|
|
358
359
|
HalfSelectIds: [],
|
|
359
360
|
openActiveId: []
|
|
360
|
-
}), s =
|
|
361
|
-
|
|
362
|
-
},
|
|
361
|
+
}), s = ce([]), M = () => {
|
|
362
|
+
a("onChange", h.selectIds.join(","));
|
|
363
|
+
}, D = (r) => {
|
|
363
364
|
let p = 0;
|
|
364
|
-
const
|
|
365
|
-
if (
|
|
366
|
-
const
|
|
367
|
-
|
|
365
|
+
const i = P.getDataGroup(r);
|
|
366
|
+
if (i.length > 0) {
|
|
367
|
+
const o = [], S = [];
|
|
368
|
+
i.forEach((L) => {
|
|
368
369
|
const J = L.id.toString();
|
|
369
|
-
e.isExistValue(h.selectIds, J) &&
|
|
370
|
-
}), (
|
|
370
|
+
e.isExistValue(h.selectIds, J) && o.push(J), e.isExistValue(h.HalfSelectIds, J) && S.push(J);
|
|
371
|
+
}), (S.length > 0 || o.length > 0) && (p = 2), o.length > 0 && o.length === i.length && (p = 1);
|
|
371
372
|
}
|
|
372
373
|
return p;
|
|
373
|
-
},
|
|
374
|
-
const
|
|
375
|
-
idx:
|
|
374
|
+
}, O = (r, p, i) => {
|
|
375
|
+
const o = {
|
|
376
|
+
idx: r,
|
|
376
377
|
pId: p,
|
|
377
378
|
// 显式传 null 会绕过 type 默认值(default: () => [] 不生效),先判空再取 length
|
|
378
|
-
title: !e.isEmpty(
|
|
379
|
+
title: !e.isEmpty(n.treeTitle) && n.treeTitle.length > r ? n.treeTitle[r] : i,
|
|
379
380
|
list: [],
|
|
380
381
|
checkAll: 0,
|
|
381
382
|
sty: {}
|
|
382
383
|
};
|
|
383
|
-
if (
|
|
384
|
-
let
|
|
385
|
-
const L =
|
|
386
|
-
|
|
384
|
+
if (n.width && n.maxWidth && n.width > 0 && n.maxWidth > 0) {
|
|
385
|
+
let S = n.width - 3;
|
|
386
|
+
const L = n.maxWidth / n.width;
|
|
387
|
+
r + 1 >= L && (S += 3), o.sty.width = `${S}px`;
|
|
387
388
|
}
|
|
388
389
|
if (!e.isEmpty(p)) {
|
|
389
|
-
const
|
|
390
|
-
|
|
391
|
-
const J = L.id.toString(),
|
|
392
|
-
|
|
393
|
-
const
|
|
394
|
-
|
|
395
|
-
let
|
|
396
|
-
const w =
|
|
390
|
+
const S = P.getDataGroup(p);
|
|
391
|
+
S.length > 0 && (o.list = S.map((L) => {
|
|
392
|
+
const J = L.id.toString(), d = e.getJsonClone(L);
|
|
393
|
+
d.selected = e.isExistValue(h.selectIds, J), d.indeterminate = e.isExistValue(h.HalfSelectIds, J), d.isActive = e.isExistValue(h.openActiveId, J);
|
|
394
|
+
const y = P.getDataGroup(J);
|
|
395
|
+
d.isSub = y.length > 0;
|
|
396
|
+
let b = e.isNonEmptyString(L.name) ? e.encodeHTML(L.name) : "";
|
|
397
|
+
const w = n.treeTextFormat;
|
|
397
398
|
if (w && w.length > 0) {
|
|
398
399
|
let k = "";
|
|
399
|
-
e.isArray(w) ? w.length >
|
|
400
|
+
e.isArray(w) ? w.length > r && (k = w[r]) : e.isString(w) && (k = w), e.isEmpty(k) || (b = e.convertStringFormatEncodeHTML(k, d));
|
|
400
401
|
}
|
|
401
|
-
return
|
|
402
|
-
})),
|
|
402
|
+
return d.showTextLabel = b, d;
|
|
403
|
+
})), o.checkAll = D(p);
|
|
403
404
|
}
|
|
404
|
-
return
|
|
405
|
-
},
|
|
406
|
-
const p = A.convertSelectedValue(
|
|
407
|
-
h.selectIds = p, h.HalfSelectIds =
|
|
408
|
-
},
|
|
409
|
-
const
|
|
410
|
-
if (s.value.forEach((
|
|
411
|
-
|
|
412
|
-
}),
|
|
413
|
-
const
|
|
414
|
-
|
|
405
|
+
return o;
|
|
406
|
+
}, H = (r) => {
|
|
407
|
+
const p = A.convertSelectedValue(r, !0, []), i = A.convertSelectHalf(p);
|
|
408
|
+
h.selectIds = p, h.HalfSelectIds = i;
|
|
409
|
+
}, R = (r, p) => {
|
|
410
|
+
const i = [];
|
|
411
|
+
if (s.value.forEach((o, S) => {
|
|
412
|
+
S <= r && i.push(O(o.idx, o.pId, o.title));
|
|
413
|
+
}), P.getDataGroup(p).length > 0) {
|
|
414
|
+
const o = P.getDataInfo(p), S = e.isNonEmptyString(o && o.name) ? o.name : "";
|
|
415
|
+
i.push(O(r + 1, p, S));
|
|
415
416
|
}
|
|
416
|
-
s.value =
|
|
417
|
-
}, G = (
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
}, Y = (
|
|
421
|
-
const
|
|
422
|
-
h.selectIds =
|
|
423
|
-
(
|
|
417
|
+
s.value = i;
|
|
418
|
+
}, G = (r, p) => {
|
|
419
|
+
const i = r.id.toString(), o = e.getArrClone(h.openActiveId);
|
|
420
|
+
o.splice(p), o.push(i), h.openActiveId = o, R(p, i);
|
|
421
|
+
}, Y = (r, p) => {
|
|
422
|
+
const i = A.convertSelectedValue(r, p, h.selectIds), o = A.convertSelectHalf(i);
|
|
423
|
+
h.selectIds = i, h.HalfSelectIds = o, s.value = s.value.map(
|
|
424
|
+
(S) => O(S.idx, S.pId, S.title)
|
|
424
425
|
), M();
|
|
425
|
-
},
|
|
426
|
-
const p = s.value.length,
|
|
426
|
+
}, l = (r) => {
|
|
427
|
+
const p = s.value.length, i = r || [];
|
|
427
428
|
if (p > 0 && h.selectIds.length > 0) {
|
|
428
|
-
let
|
|
429
|
+
let o, S = -1;
|
|
429
430
|
for (let L = p - 1; L >= 0; L--)
|
|
430
|
-
if (s.value[L].list.some((
|
|
431
|
-
if (
|
|
432
|
-
return
|
|
431
|
+
if (s.value[L].list.some((d) => {
|
|
432
|
+
if (d.selected || d.indeterminate)
|
|
433
|
+
return o = d, !0;
|
|
433
434
|
})) {
|
|
434
|
-
|
|
435
|
+
S = L;
|
|
435
436
|
break;
|
|
436
437
|
}
|
|
437
|
-
if (
|
|
438
|
-
const L =
|
|
439
|
-
if (
|
|
438
|
+
if (S > -1 && !e.isUndefined(o) && o.isSub) {
|
|
439
|
+
const L = o.id.toString();
|
|
440
|
+
if (i.indexOf(L) > -1)
|
|
440
441
|
return;
|
|
441
|
-
|
|
442
|
+
i.push(L), G(o, S), l(i);
|
|
442
443
|
}
|
|
443
444
|
}
|
|
444
445
|
}, f = () => {
|
|
445
|
-
const
|
|
446
|
-
return
|
|
446
|
+
const r = [];
|
|
447
|
+
return r.push(O(0, P.getTopParentValue(), "")), r;
|
|
447
448
|
};
|
|
448
|
-
let
|
|
449
|
-
const
|
|
450
|
-
h.openActiveId = [], e.isEmpty(
|
|
451
|
-
const
|
|
452
|
-
if (p >
|
|
453
|
-
const
|
|
454
|
-
for (let
|
|
455
|
-
|
|
456
|
-
s.value = s.value.concat(
|
|
449
|
+
let g = null;
|
|
450
|
+
const I = () => {
|
|
451
|
+
h.openActiveId = [], e.isEmpty(n.selectId) ? (h.selectIds = [], h.HalfSelectIds = []) : H(n.selectId), s.value = f(), l(), g = e.getArrClone(n.selectId), n.treeShowMinLevel > 1 && h.selectIds.length === 0 && ge(() => {
|
|
452
|
+
const r = s.value.length, p = e.isFinite(n.treeShowMinLevel) ? Math.min(n.treeShowMinLevel, xe) : xe;
|
|
453
|
+
if (p > r) {
|
|
454
|
+
const i = [];
|
|
455
|
+
for (let o = r; o < p; o++)
|
|
456
|
+
i.push(O(o, "", ""));
|
|
457
|
+
s.value = s.value.concat(i);
|
|
457
458
|
}
|
|
458
459
|
});
|
|
459
460
|
};
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
461
|
+
Ce(() => {
|
|
462
|
+
ge(() => {
|
|
463
|
+
I();
|
|
463
464
|
});
|
|
464
465
|
}), z(
|
|
465
|
-
() =>
|
|
466
|
+
() => n.dataRefreshIndex,
|
|
466
467
|
() => {
|
|
467
|
-
|
|
468
|
+
I();
|
|
468
469
|
}
|
|
469
470
|
), z(
|
|
470
|
-
() =>
|
|
471
|
-
(
|
|
472
|
-
(e.isUndefined(
|
|
473
|
-
(
|
|
474
|
-
),
|
|
471
|
+
() => n.selectId,
|
|
472
|
+
(r) => {
|
|
473
|
+
(e.isUndefined(g) ? !1 : e.isEqualArr(r, g)) || (g = e.getArrClone(r), H(r), s.value = s.value.map(
|
|
474
|
+
(i) => O(i.idx, i.pId, i.title)
|
|
475
|
+
), l());
|
|
475
476
|
}
|
|
476
477
|
);
|
|
477
|
-
const
|
|
478
|
-
const
|
|
479
|
-
Y(
|
|
480
|
-
}, v = (
|
|
481
|
-
Y(p.toString(),
|
|
482
|
-
},
|
|
483
|
-
if (
|
|
478
|
+
const x = (r, p) => {
|
|
479
|
+
const i = P.getDataGroup(p.toString()).map((o) => o.id.toString());
|
|
480
|
+
Y(i, r.value);
|
|
481
|
+
}, v = (r, p) => {
|
|
482
|
+
Y(p.toString(), r.value);
|
|
483
|
+
}, _ = (r, p, i) => {
|
|
484
|
+
if (n.disabled)
|
|
484
485
|
return;
|
|
485
|
-
const
|
|
486
|
-
if (e.isEmpty(
|
|
487
|
-
if (
|
|
488
|
-
|
|
486
|
+
const o = p.id.toString();
|
|
487
|
+
if (e.isEmpty(P.getDataGroup(o))) {
|
|
488
|
+
if (we.getParent(
|
|
489
|
+
r.target,
|
|
489
490
|
".selectmove-option-checkbox",
|
|
490
491
|
".selectmove-option"
|
|
491
492
|
))
|
|
492
493
|
return;
|
|
493
|
-
Y(
|
|
494
|
+
Y(o.toString(), !e.isExistValue(h.selectIds, o));
|
|
494
495
|
}
|
|
495
|
-
G(p,
|
|
496
|
+
G(p, i);
|
|
496
497
|
};
|
|
497
|
-
return (
|
|
498
|
-
(
|
|
499
|
-
key: `${
|
|
498
|
+
return (r, p) => (C(), K("div", qe, [
|
|
499
|
+
(C(!0), K(q, null, ue(s.value, (i, o) => (C(), K("div", {
|
|
500
|
+
key: `${V}-tree-${o}`,
|
|
500
501
|
class: "selectmove-tree-item",
|
|
501
|
-
style:
|
|
502
|
+
style: ye(i.sty)
|
|
502
503
|
}, [
|
|
503
|
-
N("div",
|
|
504
|
-
|
|
505
|
-
disabled:
|
|
506
|
-
value:
|
|
507
|
-
indeterminate:
|
|
508
|
-
onOnChange: (
|
|
504
|
+
N("div", ze, [
|
|
505
|
+
Ae(ne(Se, {
|
|
506
|
+
disabled: c.disabled,
|
|
507
|
+
value: i.checkAll === 1,
|
|
508
|
+
indeterminate: i.checkAll === 2,
|
|
509
|
+
onOnChange: (S) => x(S, i.pId)
|
|
509
510
|
}, null, 8, ["disabled", "value", "indeterminate", "onOnChange"]), [
|
|
510
|
-
[
|
|
511
|
+
[Je, i.list.length > 0]
|
|
511
512
|
]),
|
|
512
|
-
N("div",
|
|
513
|
+
N("div", Xe, fe(i.title), 1)
|
|
513
514
|
]),
|
|
514
|
-
N("div",
|
|
515
|
+
N("div", Ye, [
|
|
515
516
|
N("ul", null, [
|
|
516
|
-
(
|
|
517
|
-
key: `${
|
|
518
|
-
class:
|
|
519
|
-
onClick: (J) =>
|
|
517
|
+
(C(!0), K(q, null, ue(i.list, (S, L) => (C(), K("li", {
|
|
518
|
+
key: `${V}-${S.id}-${L}`,
|
|
519
|
+
class: ie({ "selectmove-option": !0, active: S.isActive }),
|
|
520
|
+
onClick: (J) => _(J, S, o)
|
|
520
521
|
}, [
|
|
521
522
|
N("div", null, [
|
|
522
|
-
|
|
523
|
+
ne(Se, {
|
|
523
524
|
className: "selectmove-option-checkbox",
|
|
524
|
-
disabled:
|
|
525
|
-
value:
|
|
526
|
-
indeterminate:
|
|
527
|
-
onOnChange: (J) => v(J,
|
|
525
|
+
disabled: c.disabled,
|
|
526
|
+
value: S.selected,
|
|
527
|
+
indeterminate: S.indeterminate,
|
|
528
|
+
onOnChange: (J) => v(J, S.id)
|
|
528
529
|
}, null, 8, ["disabled", "value", "indeterminate", "onOnChange"]),
|
|
529
530
|
N("div", {
|
|
530
531
|
class: "selectmove-option-text",
|
|
531
|
-
innerHTML:
|
|
532
|
-
}, null, 8,
|
|
533
|
-
|
|
532
|
+
innerHTML: S.showTextLabel
|
|
533
|
+
}, null, 8, Ze),
|
|
534
|
+
S.isSub ? (C(), se(be, {
|
|
534
535
|
key: 0,
|
|
535
536
|
name: "angle-right",
|
|
536
537
|
className: "sub-icon"
|
|
537
|
-
})) : (
|
|
538
|
+
})) : (C(), K(q, { key: 1 }, [], 64))
|
|
538
539
|
])
|
|
539
|
-
], 10,
|
|
540
|
+
], 10, Qe))), 128))
|
|
540
541
|
])
|
|
541
542
|
])
|
|
542
543
|
], 4))), 128)),
|
|
543
|
-
|
|
544
|
+
he(r.$slots, "tail")
|
|
544
545
|
]));
|
|
545
546
|
}
|
|
546
|
-
}),
|
|
547
|
+
}), tt = { class: "selectmove-result" }, st = { class: "selectmove-result-head" }, nt = ["innerHTML"], lt = { class: "selectmove-result-body" }, at = ["innerHTML"], rt = /* @__PURE__ */ ae({
|
|
547
548
|
name: "ClSelectMoveResult",
|
|
548
549
|
__name: "Result",
|
|
549
550
|
props: {
|
|
@@ -566,96 +567,96 @@ const Oe = ["onClick"], Fe = ["innerHTML"], Ue = /* @__PURE__ */ le({
|
|
|
566
567
|
// desc: 数据刷新索引
|
|
567
568
|
},
|
|
568
569
|
emits: {
|
|
569
|
-
onChange: (
|
|
570
|
+
onChange: (c) => !0
|
|
570
571
|
// desc: 结果变化
|
|
571
572
|
},
|
|
572
|
-
setup(
|
|
573
|
-
const
|
|
573
|
+
setup(c, { emit: X }) {
|
|
574
|
+
const n = c, a = X, { optPageLanguage: P, getPageLanguage: A } = _e();
|
|
574
575
|
A("common");
|
|
575
|
-
const
|
|
576
|
-
if (e.isUndefined(
|
|
576
|
+
const V = le("$SelectmoveTop"), h = le("$SelectmoveBase");
|
|
577
|
+
if (e.isUndefined(V) || e.isUndefined(h))
|
|
577
578
|
throw new Error(
|
|
578
579
|
"SelectMove.Result 缺少容器依赖($SelectmoveTop/$SelectmoveBase),请确保在 ClSelectMove 内使用"
|
|
579
580
|
);
|
|
580
|
-
const s = `selectmove-result-${e.getRandom(5)}`, M =
|
|
581
|
-
_count:
|
|
582
|
-
}) : `${
|
|
581
|
+
const s = `selectmove-result-${e.getRandom(5)}`, M = ce([]), D = ee(() => M.value.length), O = ee(() => e.isNonEmptyString(n.resultCountFormat) ? e.convertStringFormat(n.resultCountFormat, {
|
|
582
|
+
_count: D.value
|
|
583
|
+
}) : `${P.value.selected} ${D.value} ${P.value.count}`), H = ee(() => {
|
|
583
584
|
const f = {};
|
|
584
|
-
return
|
|
585
|
-
}),
|
|
586
|
-
|
|
585
|
+
return n.width && n.width > 0 && (f.width = `${n.width}px`), f;
|
|
586
|
+
}), R = (f) => {
|
|
587
|
+
a("onChange", f.join(","));
|
|
587
588
|
}, G = (f) => {
|
|
588
589
|
if (e.isEmpty(f))
|
|
589
590
|
return [];
|
|
590
|
-
const
|
|
591
|
-
return
|
|
592
|
-
const
|
|
593
|
-
if (e.isUndefined(
|
|
591
|
+
const g = f.filter((v) => !e.isUndefined(v) && !e.isEmpty(v)), I = n.resultMergeParent ? h.getValueMergeParent(g) : h.getValueSplitChild(g), x = [];
|
|
592
|
+
return I.forEach((v) => {
|
|
593
|
+
const _ = V.getDataInfo(v);
|
|
594
|
+
if (e.isUndefined(_))
|
|
594
595
|
return;
|
|
595
|
-
const
|
|
596
|
-
e.isNonEmptyString(
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
) : e.isNonEmptyString(
|
|
600
|
-
}),
|
|
596
|
+
const r = e.getJsonClone(_);
|
|
597
|
+
e.isNonEmptyString(n.resultTextFormat) ? r.showTextLabel = e.convertStringFormatEncodeHTML(
|
|
598
|
+
n.resultTextFormat,
|
|
599
|
+
r
|
|
600
|
+
) : e.isNonEmptyString(r.name) ? r.showTextLabel = e.encodeHTML(r.name) : r.showTextLabel = "", x.push(r);
|
|
601
|
+
}), x;
|
|
601
602
|
};
|
|
602
603
|
z(
|
|
603
|
-
() =>
|
|
604
|
+
() => n.selectId,
|
|
604
605
|
(f) => {
|
|
605
|
-
const
|
|
606
|
-
e.isEqualArr(
|
|
606
|
+
const I = (e.isEmpty(f) ? [] : f).filter((_) => !e.isUndefined(_) && !e.isEmpty(_)), x = M.value.map((_) => _.id.toString());
|
|
607
|
+
e.isEqualArr(I, x) || (M.value = G(I));
|
|
607
608
|
},
|
|
608
609
|
{ immediate: !0 }
|
|
609
610
|
), z(
|
|
610
|
-
() =>
|
|
611
|
+
() => n.dataRefreshIndex,
|
|
611
612
|
() => {
|
|
612
|
-
M.value = G(
|
|
613
|
+
M.value = G(n.selectId);
|
|
613
614
|
}
|
|
614
615
|
), z(
|
|
615
|
-
() =>
|
|
616
|
+
() => n.resultMergeParent,
|
|
616
617
|
() => {
|
|
617
|
-
M.value = G(
|
|
618
|
+
M.value = G(n.selectId);
|
|
618
619
|
}
|
|
619
620
|
);
|
|
620
621
|
const Y = () => {
|
|
621
|
-
M.value = [],
|
|
622
|
-
},
|
|
623
|
-
const
|
|
622
|
+
M.value = [], R([]);
|
|
623
|
+
}, l = (f) => {
|
|
624
|
+
const g = [], I = [], x = f.id.toString();
|
|
624
625
|
M.value.forEach((v) => {
|
|
625
|
-
const
|
|
626
|
-
|
|
627
|
-
}), M.value =
|
|
626
|
+
const _ = v.id.toString();
|
|
627
|
+
_ !== x && (I.push(v), g.push(_));
|
|
628
|
+
}), M.value = I, R(g);
|
|
628
629
|
};
|
|
629
|
-
return (f,
|
|
630
|
+
return (f, g) => (C(), K("div", tt, [
|
|
630
631
|
N("div", {
|
|
631
632
|
class: "selectmove-result-container",
|
|
632
|
-
style:
|
|
633
|
+
style: ye(H.value)
|
|
633
634
|
}, [
|
|
634
|
-
N("div",
|
|
635
|
+
N("div", st, [
|
|
635
636
|
N("span", null, [
|
|
636
|
-
|
|
637
|
+
c.disabled ? (C(), K(q, { key: 1 }, [], 64)) : (C(), K("button", {
|
|
637
638
|
key: 0,
|
|
638
639
|
class: "btn-cleanAll",
|
|
639
640
|
type: "button",
|
|
640
641
|
onClick: Y
|
|
641
|
-
},
|
|
642
|
+
}, fe(oe(P).deleteAll), 1))
|
|
642
643
|
]),
|
|
643
|
-
N("span", { innerHTML:
|
|
644
|
+
N("span", { innerHTML: O.value }, null, 8, nt)
|
|
644
645
|
]),
|
|
645
|
-
N("div",
|
|
646
|
+
N("div", lt, [
|
|
646
647
|
N("ul", null, [
|
|
647
|
-
(
|
|
648
|
-
key: `${s}-${
|
|
648
|
+
(C(!0), K(q, null, ue(M.value, (I, x) => (C(), K("li", {
|
|
649
|
+
key: `${s}-${I.id}-${x}`
|
|
649
650
|
}, [
|
|
650
651
|
N("div", null, [
|
|
651
652
|
N("div", {
|
|
652
|
-
innerHTML:
|
|
653
|
-
}, null, 8,
|
|
654
|
-
|
|
653
|
+
innerHTML: I.showTextLabel
|
|
654
|
+
}, null, 8, at),
|
|
655
|
+
c.disabled ? (C(), K(q, { key: 1 }, [], 64)) : (C(), se(be, {
|
|
655
656
|
key: 0,
|
|
656
657
|
name: "close",
|
|
657
658
|
className: "btn-clean",
|
|
658
|
-
onClick: (v) =>
|
|
659
|
+
onClick: (v) => l(I)
|
|
659
660
|
}, null, 8, ["onClick"]))
|
|
660
661
|
])
|
|
661
662
|
]))), 128))
|
|
@@ -664,10 +665,10 @@ const Oe = ["onClick"], Fe = ["innerHTML"], Ue = /* @__PURE__ */ le({
|
|
|
664
665
|
], 4)
|
|
665
666
|
]));
|
|
666
667
|
}
|
|
667
|
-
}),
|
|
668
|
+
}), ot = { class: "selectmove-body" }, it = {
|
|
668
669
|
key: 0,
|
|
669
670
|
class: "selectmove-result"
|
|
670
|
-
},
|
|
671
|
+
}, ct = 100, dt = 175, Ee = /* @__PURE__ */ ae({
|
|
671
672
|
name: "ClSelectMoveContainer",
|
|
672
673
|
__name: "Container",
|
|
673
674
|
props: {
|
|
@@ -751,20 +752,20 @@ const Oe = ["onClick"], Fe = ["innerHTML"], Ue = /* @__PURE__ */ le({
|
|
|
751
752
|
}
|
|
752
753
|
},
|
|
753
754
|
emits: {
|
|
754
|
-
onSelectValue: (
|
|
755
|
+
onSelectValue: (c) => !0,
|
|
755
756
|
// desc: 选择值变更
|
|
756
757
|
onInitComplete: () => !0
|
|
757
758
|
// desc: 初始化完成
|
|
758
759
|
},
|
|
759
|
-
setup(
|
|
760
|
-
const
|
|
761
|
-
let
|
|
762
|
-
const A =
|
|
760
|
+
setup(c, { emit: X }) {
|
|
761
|
+
const n = c, a = X;
|
|
762
|
+
let P = !1;
|
|
763
|
+
const A = le("$SelectmoveTop");
|
|
763
764
|
if (e.isUndefined(A))
|
|
764
765
|
throw new Error(
|
|
765
766
|
"SelectMove.Container 缺少容器依赖($SelectmoveTop),请确保在 ClSelectMove 内使用"
|
|
766
767
|
);
|
|
767
|
-
const
|
|
768
|
+
const V = pe({
|
|
768
769
|
searchWidth: 0,
|
|
769
770
|
treeWidth: 0,
|
|
770
771
|
resultWidth: 0
|
|
@@ -772,196 +773,196 @@ const Oe = ["onClick"], Fe = ["innerHTML"], Ue = /* @__PURE__ */ le({
|
|
|
772
773
|
parentIdsJson: /* @__PURE__ */ Object.create(null),
|
|
773
774
|
childIdJson: /* @__PURE__ */ Object.create(null),
|
|
774
775
|
childIdsJson: /* @__PURE__ */ Object.create(null)
|
|
775
|
-
}, s = (
|
|
776
|
-
|
|
776
|
+
}, s = (l) => {
|
|
777
|
+
a("onSelectValue", l);
|
|
777
778
|
}, M = () => {
|
|
778
|
-
|
|
779
|
-
|
|
779
|
+
ge(() => {
|
|
780
|
+
P || a("onInitComplete");
|
|
780
781
|
});
|
|
781
|
-
},
|
|
782
|
+
}, D = (l) => {
|
|
782
783
|
let f = [];
|
|
783
|
-
return e.isExistJsonKey(h.childIdJson,
|
|
784
|
-
e.isUndefined(
|
|
785
|
-
}), h.childIdJson[
|
|
786
|
-
},
|
|
787
|
-
let
|
|
788
|
-
const
|
|
789
|
-
return
|
|
790
|
-
if (e.isUndefined(
|
|
784
|
+
return e.isExistJsonKey(h.childIdJson, l) ? f = h.childIdJson[l] : A.isCheckChildren(l) && (A.getDataGroup(l).forEach((g) => {
|
|
785
|
+
e.isUndefined(g) || e.isUndefined(g.id) || f.push(g.id.toString());
|
|
786
|
+
}), h.childIdJson[l] = f), f;
|
|
787
|
+
}, O = (l, f) => {
|
|
788
|
+
let g = [];
|
|
789
|
+
const I = f || [];
|
|
790
|
+
return I.indexOf(l) > -1 || (I.push(l), e.isExistJsonKey(h.childIdsJson, l) ? g = h.childIdsJson[l] : (A.isCheckChildren(l) && A.getDataGroup(l).forEach((x) => {
|
|
791
|
+
if (e.isUndefined(x) || e.isUndefined(x.id))
|
|
791
792
|
return;
|
|
792
|
-
const v =
|
|
793
|
-
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
}), h.childIdsJson[
|
|
797
|
-
},
|
|
798
|
-
const { parentKey:
|
|
799
|
-
let
|
|
793
|
+
const v = x.id.toString();
|
|
794
|
+
g.push(v);
|
|
795
|
+
const _ = O(v, I);
|
|
796
|
+
_.length > 0 && (g = g.concat(_));
|
|
797
|
+
}), h.childIdsJson[l] = g)), g;
|
|
798
|
+
}, H = (l, f) => {
|
|
799
|
+
const { parentKey: g, topParentValue: I } = n;
|
|
800
|
+
let x = [];
|
|
800
801
|
const v = f || [];
|
|
801
|
-
if (v.indexOf(
|
|
802
|
-
return
|
|
803
|
-
if (v.push(
|
|
804
|
-
|
|
802
|
+
if (v.indexOf(l) > -1)
|
|
803
|
+
return x;
|
|
804
|
+
if (v.push(l), e.isExistJsonKey(h.parentIdsJson, l))
|
|
805
|
+
x = h.parentIdsJson[l];
|
|
805
806
|
else {
|
|
806
|
-
const
|
|
807
|
-
if (!e.isUndefined(
|
|
808
|
-
const
|
|
809
|
-
if (p !==
|
|
810
|
-
|
|
811
|
-
const
|
|
812
|
-
|
|
807
|
+
const _ = A.getDataInfo(l);
|
|
808
|
+
if (!e.isUndefined(_)) {
|
|
809
|
+
const r = _[g], p = e.isEmpty(r) ? I : r.toString();
|
|
810
|
+
if (p !== I && !e.isUndefined(A.getDataInfo(p))) {
|
|
811
|
+
x.push(p);
|
|
812
|
+
const i = H(p, v);
|
|
813
|
+
i.length > 0 && (x = x.concat(i));
|
|
813
814
|
}
|
|
814
815
|
}
|
|
815
|
-
h.parentIdsJson[
|
|
816
|
+
h.parentIdsJson[l] = x;
|
|
816
817
|
}
|
|
817
|
-
return
|
|
818
|
-
},
|
|
819
|
-
const
|
|
820
|
-
(
|
|
818
|
+
return x;
|
|
819
|
+
}, R = (l, f, g) => {
|
|
820
|
+
const I = (e.isUndefined(g) ? [] : g).filter(
|
|
821
|
+
(o) => !e.isUndefined(o)
|
|
821
822
|
);
|
|
822
|
-
if (e.isUndefined(
|
|
823
|
-
return e.getArrClone(
|
|
824
|
-
const
|
|
825
|
-
if (!e.isArray(
|
|
826
|
-
return e.getArrClone(
|
|
827
|
-
const v = e.getArrConvertJson(
|
|
828
|
-
|
|
829
|
-
if (e.isUndefined(
|
|
823
|
+
if (e.isUndefined(l))
|
|
824
|
+
return e.getArrClone(I);
|
|
825
|
+
const x = e.isObject(l) ? l : [l];
|
|
826
|
+
if (!e.isArray(x))
|
|
827
|
+
return e.getArrClone(I);
|
|
828
|
+
const v = e.getArrConvertJson(I), _ = {}, r = [], p = [];
|
|
829
|
+
x.forEach((o) => {
|
|
830
|
+
if (e.isUndefined(o))
|
|
830
831
|
return;
|
|
831
|
-
const
|
|
832
|
+
const S = [], L = [], J = o.toString();
|
|
832
833
|
if (f) {
|
|
833
|
-
if (!(e.isExistJsonKey(v, J) || e.isExistJsonKey(
|
|
834
|
-
|
|
835
|
-
const
|
|
836
|
-
|
|
837
|
-
const
|
|
838
|
-
for (let w = 0; w <
|
|
839
|
-
const k =
|
|
840
|
-
if (e.isExistJsonKey(v, k) || e.isExistJsonKey(
|
|
834
|
+
if (!(e.isExistJsonKey(v, J) || e.isExistJsonKey(_, J))) {
|
|
835
|
+
S.push(J);
|
|
836
|
+
const y = O(J);
|
|
837
|
+
y && y.length > 0 && S.push(...y);
|
|
838
|
+
const b = H(J);
|
|
839
|
+
for (let w = 0; w < b.length; w++) {
|
|
840
|
+
const k = b[w].toString();
|
|
841
|
+
if (e.isExistJsonKey(v, k) || e.isExistJsonKey(_, k))
|
|
841
842
|
break;
|
|
842
|
-
const j =
|
|
843
|
-
if (j.forEach((
|
|
844
|
-
const
|
|
845
|
-
(e.isExistJsonKey(v,
|
|
846
|
-
}), j.length ===
|
|
847
|
-
|
|
843
|
+
const j = D(k), Z = [];
|
|
844
|
+
if (j.forEach((F) => {
|
|
845
|
+
const B = F.toString();
|
|
846
|
+
(e.isExistJsonKey(v, B) || e.isExistJsonKey(_, B) || S.indexOf(B) > -1) && Z.push(B);
|
|
847
|
+
}), j.length === Z.length)
|
|
848
|
+
S.push(k);
|
|
848
849
|
else
|
|
849
850
|
break;
|
|
850
851
|
}
|
|
851
852
|
}
|
|
852
853
|
} else {
|
|
853
854
|
L.push(J);
|
|
854
|
-
const
|
|
855
|
-
|
|
856
|
-
const
|
|
857
|
-
L.push(...
|
|
855
|
+
const d = O(J);
|
|
856
|
+
d && d.length > 0 && L.push(...d);
|
|
857
|
+
const y = H(J);
|
|
858
|
+
L.push(...y);
|
|
858
859
|
}
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
}), L.length > 0 && L.forEach((
|
|
862
|
-
p.push(
|
|
860
|
+
S.length > 0 && S.forEach((d) => {
|
|
861
|
+
r.push(d), _[d] = !0;
|
|
862
|
+
}), L.length > 0 && L.forEach((d) => {
|
|
863
|
+
p.push(d);
|
|
863
864
|
});
|
|
864
865
|
});
|
|
865
|
-
let
|
|
866
|
-
return
|
|
867
|
-
}, G = (
|
|
868
|
-
if (e.isUndefined(
|
|
866
|
+
let i = e.getArrClone(I);
|
|
867
|
+
return i.push(...r), i = e.getArrUnique(i), i = e.getArrRemoveById(i, p), i;
|
|
868
|
+
}, G = (l) => {
|
|
869
|
+
if (e.isUndefined(l) || !e.isArray(l))
|
|
869
870
|
return [];
|
|
870
|
-
const f = [],
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
const
|
|
874
|
-
f.push(...
|
|
871
|
+
const f = [], g = {};
|
|
872
|
+
l.forEach((v) => {
|
|
873
|
+
g[v] = !0;
|
|
874
|
+
const _ = H(v);
|
|
875
|
+
f.push(..._);
|
|
875
876
|
});
|
|
876
|
-
const
|
|
877
|
+
const I = [], x = {};
|
|
877
878
|
return f.forEach((v) => {
|
|
878
|
-
!e.isExistJsonKey(
|
|
879
|
-
}),
|
|
879
|
+
!e.isExistJsonKey(x, v) && !e.isExistJsonKey(g, v) && (x[v] = !0, I.push(v));
|
|
880
|
+
}), I;
|
|
880
881
|
}, Y = () => {
|
|
881
|
-
const
|
|
882
|
-
if (
|
|
883
|
-
const f = Math.floor(
|
|
884
|
-
|
|
882
|
+
const l = n.width;
|
|
883
|
+
if (l !== void 0 && e.isFinite(l) && l >= 350) {
|
|
884
|
+
const f = Math.floor(l / dt), g = Math.floor(l / f);
|
|
885
|
+
V.searchWidth = l, V.treeWidth = g, V.resultWidth = g;
|
|
885
886
|
}
|
|
886
887
|
};
|
|
887
|
-
return
|
|
888
|
+
return Ce(() => {
|
|
888
889
|
Y(), M();
|
|
889
|
-
}),
|
|
890
|
-
|
|
890
|
+
}), Ke(() => {
|
|
891
|
+
P = !0;
|
|
891
892
|
}), z(
|
|
892
|
-
() =>
|
|
893
|
+
() => n.dataRefreshIndex,
|
|
893
894
|
() => {
|
|
894
895
|
h.parentIdsJson = /* @__PURE__ */ Object.create(null), h.childIdJson = /* @__PURE__ */ Object.create(null), h.childIdsJson = /* @__PURE__ */ Object.create(null);
|
|
895
896
|
}
|
|
896
897
|
), z(
|
|
897
|
-
() =>
|
|
898
|
+
() => n.width,
|
|
898
899
|
() => {
|
|
899
900
|
Y();
|
|
900
901
|
}
|
|
901
|
-
),
|
|
902
|
-
convertSelectedValue: (
|
|
903
|
-
let
|
|
904
|
-
if (f && e.isObject(
|
|
905
|
-
const
|
|
906
|
-
return
|
|
902
|
+
), Te("$SelectmoveBase", {
|
|
903
|
+
convertSelectedValue: (l, f, g) => {
|
|
904
|
+
let I = !1;
|
|
905
|
+
if (f && e.isObject(l) && l.length > ct && (I = !0), I) {
|
|
906
|
+
const x = A.getValueMergeParent(l);
|
|
907
|
+
return R(x, f, g);
|
|
907
908
|
} else
|
|
908
|
-
return
|
|
909
|
+
return R(l, f, g);
|
|
909
910
|
},
|
|
910
911
|
convertSelectHalf: G,
|
|
911
|
-
getChildIds:
|
|
912
|
-
getParentIds:
|
|
913
|
-
getLastChildIds: (
|
|
914
|
-
getValueMergeParent: (
|
|
915
|
-
getValueSplitChild: (
|
|
916
|
-
}), (
|
|
917
|
-
|
|
912
|
+
getChildIds: O,
|
|
913
|
+
getParentIds: H,
|
|
914
|
+
getLastChildIds: (l, f) => A.getLastChildIds(l, f),
|
|
915
|
+
getValueMergeParent: (l) => A.getValueMergeParent(l),
|
|
916
|
+
getValueSplitChild: (l) => A.getValueSplitChild(l)
|
|
917
|
+
}), (l, f) => (C(), K(q, null, [
|
|
918
|
+
c.isSearch ? (C(), se(Ge, {
|
|
918
919
|
key: 0,
|
|
919
|
-
disabled:
|
|
920
|
-
width:
|
|
921
|
-
placeholder:
|
|
922
|
-
searchKey:
|
|
923
|
-
searchKeyType:
|
|
924
|
-
searchIsMultiple:
|
|
925
|
-
searchMultipleJoin:
|
|
926
|
-
searchTextFormat:
|
|
927
|
-
selectId:
|
|
928
|
-
parentKey:
|
|
929
|
-
topParentValue:
|
|
920
|
+
disabled: c.disabled,
|
|
921
|
+
width: V.searchWidth,
|
|
922
|
+
placeholder: c.searchPlaceholder,
|
|
923
|
+
searchKey: c.searchKey,
|
|
924
|
+
searchKeyType: c.searchKeyType,
|
|
925
|
+
searchIsMultiple: c.searchIsMultiple,
|
|
926
|
+
searchMultipleJoin: c.searchMultipleJoin,
|
|
927
|
+
searchTextFormat: c.searchTextFormat,
|
|
928
|
+
selectId: c.selectId,
|
|
929
|
+
parentKey: c.parentKey,
|
|
930
|
+
topParentValue: c.topParentValue,
|
|
930
931
|
onOnChange: s
|
|
931
|
-
}, null, 8, ["disabled", "width", "placeholder", "searchKey", "searchKeyType", "searchIsMultiple", "searchMultipleJoin", "searchTextFormat", "selectId", "parentKey", "topParentValue"])) : (
|
|
932
|
-
N("div",
|
|
933
|
-
|
|
934
|
-
disabled:
|
|
935
|
-
maxWidth:
|
|
936
|
-
width:
|
|
937
|
-
treeTitle:
|
|
938
|
-
treeShowMinLevel:
|
|
939
|
-
treeTextFormat:
|
|
940
|
-
selectId:
|
|
941
|
-
dataRefreshIndex:
|
|
932
|
+
}, null, 8, ["disabled", "width", "placeholder", "searchKey", "searchKeyType", "searchIsMultiple", "searchMultipleJoin", "searchTextFormat", "selectId", "parentKey", "topParentValue"])) : (C(), K(q, { key: 1 }, [], 64)),
|
|
933
|
+
N("div", ot, [
|
|
934
|
+
ne(et, {
|
|
935
|
+
disabled: c.disabled,
|
|
936
|
+
maxWidth: V.searchWidth,
|
|
937
|
+
width: V.treeWidth,
|
|
938
|
+
treeTitle: c.treeTitle,
|
|
939
|
+
treeShowMinLevel: c.treeShowMinLevel,
|
|
940
|
+
treeTextFormat: c.treeTextFormat,
|
|
941
|
+
selectId: c.selectId,
|
|
942
|
+
dataRefreshIndex: c.dataRefreshIndex,
|
|
942
943
|
onOnChange: s
|
|
943
944
|
}, {
|
|
944
|
-
tail:
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
])) :
|
|
945
|
+
tail: re(() => [
|
|
946
|
+
c.resultIsShowSlot ? (C(), K("div", it, [
|
|
947
|
+
he(l.$slots, "resultSelect")
|
|
948
|
+
])) : c.resultIsShowSubUnit ? (C(), se(rt, {
|
|
948
949
|
key: 1,
|
|
949
|
-
disabled:
|
|
950
|
-
width:
|
|
951
|
-
resultTextFormat:
|
|
952
|
-
resultCountFormat:
|
|
953
|
-
resultMergeParent:
|
|
954
|
-
selectId:
|
|
955
|
-
dataRefreshIndex:
|
|
950
|
+
disabled: c.disabled,
|
|
951
|
+
width: V.resultWidth,
|
|
952
|
+
resultTextFormat: c.resultTextFormat,
|
|
953
|
+
resultCountFormat: c.resultCountFormat,
|
|
954
|
+
resultMergeParent: c.resultMergeParent,
|
|
955
|
+
selectId: c.selectId,
|
|
956
|
+
dataRefreshIndex: c.dataRefreshIndex,
|
|
956
957
|
onOnChange: s
|
|
957
|
-
}, null, 8, ["disabled", "width", "resultTextFormat", "resultCountFormat", "resultMergeParent", "selectId", "dataRefreshIndex"])) : (
|
|
958
|
+
}, null, 8, ["disabled", "width", "resultTextFormat", "resultCountFormat", "resultMergeParent", "selectId", "dataRefreshIndex"])) : (C(), K(q, { key: 2 }, [], 64))
|
|
958
959
|
]),
|
|
959
960
|
_: 3
|
|
960
961
|
}, 8, ["disabled", "maxWidth", "width", "treeTitle", "treeShowMinLevel", "treeTextFormat", "selectId", "dataRefreshIndex"])
|
|
961
962
|
])
|
|
962
963
|
], 64));
|
|
963
964
|
}
|
|
964
|
-
}),
|
|
965
|
+
}), ut = ["id"], ht = { className: "selectmove-text-num" }, pt = { class: "selectmove-container" }, ft = ["id"], bt = /* @__PURE__ */ ae({
|
|
965
966
|
name: "ClSelectMove",
|
|
966
967
|
__name: "Index",
|
|
967
968
|
props: {
|
|
@@ -1073,6 +1074,11 @@ const Oe = ["onClick"], Fe = ["innerHTML"], Ue = /* @__PURE__ */ le({
|
|
|
1073
1074
|
default: !1
|
|
1074
1075
|
// desc: 是否纯文本只读模式,只渲染选中项层级文本不挂载穿梭面板
|
|
1075
1076
|
},
|
|
1077
|
+
plaintextEmptyText: {
|
|
1078
|
+
type: String,
|
|
1079
|
+
default: void 0
|
|
1080
|
+
// desc: 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段)
|
|
1081
|
+
},
|
|
1076
1082
|
plaintextSeparator: {
|
|
1077
1083
|
type: String,
|
|
1078
1084
|
default: ","
|
|
@@ -1090,268 +1096,270 @@ const Oe = ["onClick"], Fe = ["innerHTML"], Ue = /* @__PURE__ */ le({
|
|
|
1090
1096
|
}
|
|
1091
1097
|
},
|
|
1092
1098
|
emits: {
|
|
1093
|
-
"update:value": (
|
|
1099
|
+
"update:value": (c) => !0,
|
|
1094
1100
|
// desc: 选中值变更
|
|
1095
|
-
"update:modelValue": (
|
|
1101
|
+
"update:modelValue": (c) => !0,
|
|
1096
1102
|
// desc: 标准 v-model 支持(等价 update:value)
|
|
1097
|
-
onChange: (
|
|
1103
|
+
onChange: (c, X) => !0,
|
|
1098
1104
|
// desc: 选择变化
|
|
1099
1105
|
onInit: () => !0
|
|
1100
1106
|
// desc: 初始化完成
|
|
1101
1107
|
},
|
|
1102
|
-
setup(
|
|
1103
|
-
const
|
|
1108
|
+
setup(c, { expose: X, emit: n }) {
|
|
1109
|
+
const a = c, P = n, A = Pe(), V = a.id, h = Ve("refElDropdownLayer"), s = pe({
|
|
1104
1110
|
dataRefreshIndex: 0,
|
|
1105
1111
|
selectedIds: [],
|
|
1106
1112
|
IsShowResultSlot: !e.isUndefined(A.resultSelect),
|
|
1107
1113
|
isInitEmitDone: !1
|
|
1108
|
-
}), M =
|
|
1114
|
+
}), M = ce([]), D = {
|
|
1109
1115
|
dataJson: {},
|
|
1110
1116
|
dataGroup: {},
|
|
1111
1117
|
childLastIdsJson: {}
|
|
1112
|
-
},
|
|
1113
|
-
disabled:
|
|
1114
|
-
width:
|
|
1115
|
-
isSearch:
|
|
1116
|
-
searchPlaceholder:
|
|
1117
|
-
searchKey:
|
|
1118
|
-
searchKeyType:
|
|
1119
|
-
searchIsMultiple:
|
|
1120
|
-
searchMultipleJoin:
|
|
1121
|
-
searchTextFormat:
|
|
1122
|
-
treeTitle:
|
|
1123
|
-
treeShowMinLevel:
|
|
1124
|
-
treeTextFormat:
|
|
1125
|
-
resultIsShowSubUnit:
|
|
1118
|
+
}, O = ee(() => ({
|
|
1119
|
+
disabled: a.disabled,
|
|
1120
|
+
width: a.containerWidth,
|
|
1121
|
+
isSearch: a.isSearch,
|
|
1122
|
+
searchPlaceholder: a.searchPlaceholder,
|
|
1123
|
+
searchKey: a.searchKey,
|
|
1124
|
+
searchKeyType: a.searchKeyType,
|
|
1125
|
+
searchIsMultiple: a.searchIsMultiple,
|
|
1126
|
+
searchMultipleJoin: a.searchMultipleJoin,
|
|
1127
|
+
searchTextFormat: a.searchTextFormat,
|
|
1128
|
+
treeTitle: a.treeTitle,
|
|
1129
|
+
treeShowMinLevel: a.treeShowMinLevel,
|
|
1130
|
+
treeTextFormat: a.treeTextFormat,
|
|
1131
|
+
resultIsShowSubUnit: a.resultIsShow,
|
|
1126
1132
|
resultIsShowSlot: s.IsShowResultSlot,
|
|
1127
|
-
resultTextFormat:
|
|
1128
|
-
resultCountFormat:
|
|
1129
|
-
resultMergeParent:
|
|
1130
|
-
parentKey:
|
|
1131
|
-
topParentValue:
|
|
1132
|
-
})),
|
|
1133
|
+
resultTextFormat: a.resultTextFormat,
|
|
1134
|
+
resultCountFormat: a.resultCountFormat,
|
|
1135
|
+
resultMergeParent: a.resultMergeParent,
|
|
1136
|
+
parentKey: a.parentKey,
|
|
1137
|
+
topParentValue: a.topParentValue
|
|
1138
|
+
})), H = ee(() => {
|
|
1133
1139
|
let t = "panel-selectmove ";
|
|
1134
|
-
return e.isNonEmptyString(
|
|
1135
|
-
}),
|
|
1136
|
-
|
|
1137
|
-
}, G = (t,
|
|
1138
|
-
|
|
1140
|
+
return e.isNonEmptyString(a.className) && (t += a.className), a.isDropdown || a.disabled && (t += " selectmove-disabled "), t;
|
|
1141
|
+
}), R = (t) => {
|
|
1142
|
+
P("update:value", t), P("update:modelValue", t);
|
|
1143
|
+
}, G = (t, u) => {
|
|
1144
|
+
R(t), P("onChange", t, u);
|
|
1139
1145
|
}, Y = () => {
|
|
1140
|
-
|
|
1141
|
-
},
|
|
1142
|
-
const
|
|
1143
|
-
return f(
|
|
1144
|
-
},
|
|
1145
|
-
const
|
|
1146
|
-
return e.isExistJsonKey(
|
|
1147
|
-
},
|
|
1148
|
-
const { parentKey:
|
|
1149
|
-
!e.isEmpty(t) && e.isArray(t) && t.forEach((
|
|
1150
|
-
const
|
|
1151
|
-
if (!e.isString(
|
|
1146
|
+
P("onInit");
|
|
1147
|
+
}, l = () => a.list, f = (t) => e.isExistJsonKey(D.dataGroup, t.toString()), g = (t) => {
|
|
1148
|
+
const u = t.toString();
|
|
1149
|
+
return f(u) ? D.dataGroup[u] : [];
|
|
1150
|
+
}, I = (t) => {
|
|
1151
|
+
const u = t.toString();
|
|
1152
|
+
return e.isExistJsonKey(D.dataJson, u) ? D.dataJson[u] : null;
|
|
1153
|
+
}, x = () => `top_${a.topParentValue}`, v = (t) => {
|
|
1154
|
+
const { parentKey: u, topParentValue: m } = a, E = {}, T = {};
|
|
1155
|
+
!e.isEmpty(t) && e.isArray(t) && t.forEach(($) => {
|
|
1156
|
+
const U = e.getJsonClone($);
|
|
1157
|
+
if (!e.isString(U.id) && !e.isNumber(U.id))
|
|
1152
1158
|
return;
|
|
1153
|
-
const W =
|
|
1154
|
-
|
|
1155
|
-
const
|
|
1156
|
-
e.isExistJsonKey(
|
|
1157
|
-
}),
|
|
1159
|
+
const W = U.id.toString(), Q = e.isEmpty(U[u]) ? m : U[u].toString();
|
|
1160
|
+
E[W] = U;
|
|
1161
|
+
const te = Q === m ? x() : Q;
|
|
1162
|
+
e.isExistJsonKey(T, te) || (T[te] = []), T[te].push(U);
|
|
1163
|
+
}), D.dataJson = E, D.dataGroup = T, D.childLastIdsJson = {};
|
|
1158
1164
|
};
|
|
1159
|
-
v(
|
|
1160
|
-
const
|
|
1161
|
-
let
|
|
1162
|
-
const
|
|
1163
|
-
return
|
|
1164
|
-
const
|
|
1165
|
-
|
|
1166
|
-
}) :
|
|
1167
|
-
},
|
|
1168
|
-
const { parentKey:
|
|
1165
|
+
v(a.list);
|
|
1166
|
+
const _ = (t, u) => {
|
|
1167
|
+
let m = [];
|
|
1168
|
+
const E = u || [];
|
|
1169
|
+
return E.indexOf(t) > -1 || (E.push(t), e.isExistJsonKey(D.childLastIdsJson, t) && D.childLastIdsJson[t].length > 0 ? m = D.childLastIdsJson[t] : (f(t) ? g(t).forEach((T) => {
|
|
1170
|
+
const $ = _(T.id.toString(), E);
|
|
1171
|
+
$.length > 0 && (m = m.concat($));
|
|
1172
|
+
}) : m.push(t), D.childLastIdsJson[t] = m)), m;
|
|
1173
|
+
}, r = (t, u) => {
|
|
1174
|
+
const { parentKey: m, topParentValue: E } = a, T = u || [], $ = {}, U = [];
|
|
1169
1175
|
let W = [];
|
|
1170
|
-
if (t.forEach((
|
|
1171
|
-
const
|
|
1172
|
-
if (!e.isUndefined(
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1176
|
+
if (t.forEach((Q) => {
|
|
1177
|
+
const te = I(Q);
|
|
1178
|
+
if (!e.isUndefined(te)) {
|
|
1179
|
+
const Ie = te[m], de = e.isUndefined(Ie) ? E : Ie.toString();
|
|
1180
|
+
de === E ? W.push(Q) : (e.isExistJsonKey($, de) || ($[de] = []), $[de].push(Q));
|
|
1175
1181
|
}
|
|
1176
|
-
}), !e.isEmpty(
|
|
1177
|
-
for (const [
|
|
1178
|
-
|
|
1179
|
-
if (
|
|
1180
|
-
W.push(...
|
|
1181
|
-
const
|
|
1182
|
-
return
|
|
1182
|
+
}), !e.isEmpty($))
|
|
1183
|
+
for (const [Q, te] of Object.entries($))
|
|
1184
|
+
te.length === g(Q).length && T.indexOf(Q) === -1 ? U.push(Q) : W = W.concat(te);
|
|
1185
|
+
if (U.length > 0) {
|
|
1186
|
+
W.push(...U);
|
|
1187
|
+
const Q = e.getArrUnique(W);
|
|
1188
|
+
return r(Q, T.concat(U));
|
|
1183
1189
|
} else
|
|
1184
1190
|
return W;
|
|
1185
1191
|
}, p = (t) => {
|
|
1186
|
-
const
|
|
1187
|
-
return t.forEach((
|
|
1188
|
-
const
|
|
1189
|
-
if (e.isEmpty(
|
|
1190
|
-
|
|
1192
|
+
const u = [], m = e.getArrConvertJson(t);
|
|
1193
|
+
return t.forEach((T) => {
|
|
1194
|
+
const $ = g(T);
|
|
1195
|
+
if (e.isEmpty($))
|
|
1196
|
+
u.push(T);
|
|
1191
1197
|
else {
|
|
1192
|
-
const
|
|
1193
|
-
|
|
1194
|
-
e.isExistJsonKey(
|
|
1195
|
-
}),
|
|
1198
|
+
const U = [];
|
|
1199
|
+
$.forEach((W) => {
|
|
1200
|
+
e.isExistJsonKey(m, W.id.toString()) && U.push(W.id);
|
|
1201
|
+
}), $.length !== U.length && u.push(T);
|
|
1196
1202
|
}
|
|
1197
|
-
}),
|
|
1198
|
-
},
|
|
1199
|
-
let
|
|
1200
|
-
return t.forEach((
|
|
1201
|
-
const
|
|
1202
|
-
|
|
1203
|
-
}),
|
|
1204
|
-
},
|
|
1205
|
-
const
|
|
1206
|
-
return t.forEach((
|
|
1207
|
-
const
|
|
1208
|
-
e.isUndefined(
|
|
1209
|
-
}), { list:
|
|
1203
|
+
}), r(u);
|
|
1204
|
+
}, i = (t) => {
|
|
1205
|
+
let u = [];
|
|
1206
|
+
return t.forEach((m) => {
|
|
1207
|
+
const E = _(m);
|
|
1208
|
+
u.push(...E);
|
|
1209
|
+
}), u = e.getArrUnique(u), u;
|
|
1210
|
+
}, o = (t, u) => (e.isBoolean(u) ? u : a.isOutMerge) ? p(t) : i(t), S = (t) => {
|
|
1211
|
+
const u = [], m = [];
|
|
1212
|
+
return t.forEach((E) => {
|
|
1213
|
+
const T = I(E);
|
|
1214
|
+
e.isUndefined(T) || (u.push(T), m.push(e.isNonEmptyString(T.name) ? e.encodeHTML(T.name) : ""));
|
|
1215
|
+
}), { list: u, label: m };
|
|
1210
1216
|
}, L = (t) => {
|
|
1211
|
-
const
|
|
1212
|
-
let
|
|
1213
|
-
for (; e.isNonEmptyString(
|
|
1214
|
-
|
|
1215
|
-
const
|
|
1216
|
-
if (!
|
|
1217
|
-
e.isNonEmptyString(
|
|
1218
|
-
const
|
|
1219
|
-
if (
|
|
1220
|
-
|
|
1217
|
+
const u = [], m = /* @__PURE__ */ new Set();
|
|
1218
|
+
let E = t;
|
|
1219
|
+
for (; e.isNonEmptyString(E) && !m.has(E); ) {
|
|
1220
|
+
m.add(E);
|
|
1221
|
+
const T = I(E);
|
|
1222
|
+
if (!T) break;
|
|
1223
|
+
e.isNonEmptyString(T.name) && u.unshift(T.name);
|
|
1224
|
+
const $ = T[a.parentKey], U = $ != null ? String($) : "";
|
|
1225
|
+
if (U === "" || U === String(a.topParentValue)) break;
|
|
1226
|
+
E = U;
|
|
1221
1227
|
}
|
|
1222
|
-
return
|
|
1228
|
+
return u;
|
|
1223
1229
|
}, J = ee(() => {
|
|
1224
|
-
if (
|
|
1230
|
+
if (a.list, e.isEmpty(s.selectedIds))
|
|
1225
1231
|
return "";
|
|
1226
|
-
const t = e.isString(
|
|
1227
|
-
return
|
|
1228
|
-
const
|
|
1229
|
-
return e.removeHTMLTags(
|
|
1230
|
-
}).join(
|
|
1231
|
-
}),
|
|
1232
|
-
|
|
1232
|
+
const t = e.isString(a.plaintextLevelSeparator) ? a.plaintextLevelSeparator : " > ", u = e.isString(a.plaintextSeparator) ? a.plaintextSeparator : ",";
|
|
1233
|
+
return o(s.selectedIds, a.resultMergeParent).map((E) => {
|
|
1234
|
+
const T = L(E);
|
|
1235
|
+
return e.removeHTMLTags(T.length > 0 ? T.join(t) : E);
|
|
1236
|
+
}).join(u);
|
|
1237
|
+
}), d = ee(
|
|
1238
|
+
() => $e("selectMove", a.plaintextEmptyText, J.value, a.value)
|
|
1239
|
+
), y = () => {
|
|
1240
|
+
if (a.isDropdown)
|
|
1233
1241
|
if (e.isEmpty(s.selectedIds))
|
|
1234
1242
|
M.value = [];
|
|
1235
1243
|
else {
|
|
1236
|
-
const t =
|
|
1237
|
-
M.value =
|
|
1244
|
+
const t = o(s.selectedIds, a.resultMergeParent);
|
|
1245
|
+
M.value = S(t).label;
|
|
1238
1246
|
}
|
|
1239
1247
|
};
|
|
1240
1248
|
(() => {
|
|
1241
|
-
e.isNonEmptyString(
|
|
1249
|
+
e.isNonEmptyString(a.value) && (s.selectedIds = e.split(a.value)), y();
|
|
1242
1250
|
})(), z(
|
|
1243
|
-
() =>
|
|
1244
|
-
(t,
|
|
1245
|
-
if (t !==
|
|
1246
|
-
const
|
|
1247
|
-
e.isEqualArr(
|
|
1251
|
+
() => a.value,
|
|
1252
|
+
(t, u) => {
|
|
1253
|
+
if (t !== u) {
|
|
1254
|
+
const m = e.isNonEmptyString(t) ? e.split(t) : [], E = o(s.selectedIds);
|
|
1255
|
+
e.isEqualArr(m, E) || (s.selectedIds = e.isEmpty(m) ? [] : m, y());
|
|
1248
1256
|
}
|
|
1249
1257
|
}
|
|
1250
1258
|
), z(
|
|
1251
|
-
() =>
|
|
1259
|
+
() => a.list,
|
|
1252
1260
|
(t) => {
|
|
1253
1261
|
e.isArray(t) && (v(t), s.selectedIds = s.selectedIds.filter(
|
|
1254
|
-
(
|
|
1255
|
-
), s.dataRefreshIndex++,
|
|
1262
|
+
(u) => !e.isUndefined(I(u))
|
|
1263
|
+
), s.dataRefreshIndex++, y());
|
|
1256
1264
|
}
|
|
1257
1265
|
), z(
|
|
1258
|
-
() =>
|
|
1266
|
+
() => a.resultMergeParent,
|
|
1259
1267
|
() => {
|
|
1260
|
-
|
|
1268
|
+
y();
|
|
1261
1269
|
}
|
|
1262
1270
|
);
|
|
1263
|
-
const
|
|
1264
|
-
|
|
1265
|
-
},
|
|
1266
|
-
|
|
1267
|
-
},
|
|
1268
|
-
const
|
|
1269
|
-
s.selectedIds =
|
|
1270
|
-
const
|
|
1271
|
-
|
|
1271
|
+
const w = () => {
|
|
1272
|
+
a.disabled || (s.selectedIds = [], y(), G("", []));
|
|
1273
|
+
}, k = () => {
|
|
1274
|
+
a.isDropdown && (y(), h.value && (h.value.checkIsShowOpen() || h.value.initCompleteOpen())), s.isInitEmitDone || (s.isInitEmitDone = !0, Y());
|
|
1275
|
+
}, j = (t) => {
|
|
1276
|
+
const u = e.isEmpty(t) ? [] : e.split(t);
|
|
1277
|
+
s.selectedIds = u;
|
|
1278
|
+
const m = o(u), E = S(m);
|
|
1279
|
+
y(), G(m.join(","), E.list);
|
|
1272
1280
|
};
|
|
1273
|
-
return
|
|
1281
|
+
return Te("$SelectmoveTop", {
|
|
1274
1282
|
isCheckChildren: f,
|
|
1275
|
-
getDataGroup:
|
|
1276
|
-
getDataInfo:
|
|
1277
|
-
getDataList:
|
|
1278
|
-
getLastChildIds:
|
|
1283
|
+
getDataGroup: g,
|
|
1284
|
+
getDataInfo: I,
|
|
1285
|
+
getDataList: l,
|
|
1286
|
+
getLastChildIds: _,
|
|
1279
1287
|
getValueMergeParent: p,
|
|
1280
|
-
getValueSplitChild:
|
|
1281
|
-
getTopParentValue:
|
|
1288
|
+
getValueSplitChild: i,
|
|
1289
|
+
getTopParentValue: x
|
|
1282
1290
|
}), X({
|
|
1283
|
-
getValue: () =>
|
|
1291
|
+
getValue: () => o(s.selectedIds).join(","),
|
|
1284
1292
|
getValueData: () => {
|
|
1285
|
-
const t =
|
|
1286
|
-
return
|
|
1293
|
+
const t = o(s.selectedIds);
|
|
1294
|
+
return S(t).list;
|
|
1287
1295
|
},
|
|
1288
1296
|
setValue: (t) => {
|
|
1289
|
-
s.selectedIds = e.isString(t) && !e.isEmpty(t) ? e.split(t) : [],
|
|
1297
|
+
s.selectedIds = e.isString(t) && !e.isEmpty(t) ? e.split(t) : [], y();
|
|
1290
1298
|
}
|
|
1291
|
-
}), (t,
|
|
1299
|
+
}), (t, u) => c.isPlaintext ? (C(), K("div", {
|
|
1292
1300
|
key: 0,
|
|
1293
|
-
id:
|
|
1301
|
+
id: oe(V),
|
|
1294
1302
|
class: "cl-plaintext-value"
|
|
1295
|
-
},
|
|
1303
|
+
}, fe(d.value), 9, ut)) : c.isDropdown ? (C(), se(Oe, {
|
|
1296
1304
|
key: 1,
|
|
1297
|
-
id:
|
|
1305
|
+
id: oe(V),
|
|
1298
1306
|
ref_key: "refElDropdownLayer",
|
|
1299
1307
|
ref: h,
|
|
1300
|
-
classParent:
|
|
1308
|
+
classParent: H.value,
|
|
1301
1309
|
classText: "selectmove-text",
|
|
1302
1310
|
classDropDown: "selectmove-dropdown",
|
|
1303
|
-
placeholder:
|
|
1304
|
-
isDisabled:
|
|
1305
|
-
isClear:
|
|
1311
|
+
placeholder: c.placeholder,
|
|
1312
|
+
isDisabled: c.disabled,
|
|
1313
|
+
isClear: c.isClear,
|
|
1306
1314
|
textLabel: M.value.join(","),
|
|
1307
1315
|
textArrowDirection: "right",
|
|
1308
1316
|
isUseDropdownArrow: !0,
|
|
1309
|
-
appendContainer:
|
|
1310
|
-
onOnClear:
|
|
1317
|
+
appendContainer: c.appendContainer,
|
|
1318
|
+
onOnClear: w
|
|
1311
1319
|
}, {
|
|
1312
|
-
textExtend:
|
|
1313
|
-
N("span",
|
|
1314
|
-
M.value.length > 1 ? (
|
|
1320
|
+
textExtend: re(() => [
|
|
1321
|
+
N("span", ht, [
|
|
1322
|
+
M.value.length > 1 ? (C(), se(De, {
|
|
1315
1323
|
key: 0,
|
|
1316
1324
|
num: M.value.length
|
|
1317
|
-
}, null, 8, ["num"])) : (
|
|
1325
|
+
}, null, 8, ["num"])) : (C(), K(q, { key: 1 }, [], 64))
|
|
1318
1326
|
])
|
|
1319
1327
|
]),
|
|
1320
|
-
dropdown:
|
|
1321
|
-
N("div",
|
|
1322
|
-
|
|
1328
|
+
dropdown: re(() => [
|
|
1329
|
+
N("div", pt, [
|
|
1330
|
+
ne(Ee, ve(O.value, {
|
|
1323
1331
|
dataRefreshIndex: s.dataRefreshIndex,
|
|
1324
1332
|
selectId: s.selectedIds,
|
|
1325
|
-
onOnSelectValue:
|
|
1326
|
-
onOnInitComplete:
|
|
1333
|
+
onOnSelectValue: j,
|
|
1334
|
+
onOnInitComplete: k
|
|
1327
1335
|
}), {
|
|
1328
|
-
resultSelect:
|
|
1329
|
-
|
|
1336
|
+
resultSelect: re(() => [
|
|
1337
|
+
he(t.$slots, "resultSelect")
|
|
1330
1338
|
]),
|
|
1331
1339
|
_: 3
|
|
1332
1340
|
}, 16, ["dataRefreshIndex", "selectId"])
|
|
1333
1341
|
])
|
|
1334
1342
|
]),
|
|
1335
1343
|
_: 3
|
|
1336
|
-
}, 8, ["id", "classParent", "placeholder", "isDisabled", "isClear", "textLabel", "appendContainer"])) : (
|
|
1344
|
+
}, 8, ["id", "classParent", "placeholder", "isDisabled", "isClear", "textLabel", "appendContainer"])) : (C(), K("div", {
|
|
1337
1345
|
key: 2,
|
|
1338
|
-
id:
|
|
1339
|
-
class:
|
|
1346
|
+
id: oe(V),
|
|
1347
|
+
class: ie(H.value)
|
|
1340
1348
|
}, [
|
|
1341
|
-
|
|
1349
|
+
ne(Ee, ve(O.value, {
|
|
1342
1350
|
dataRefreshIndex: s.dataRefreshIndex,
|
|
1343
1351
|
selectId: s.selectedIds,
|
|
1344
|
-
onOnSelectValue:
|
|
1345
|
-
onOnInitComplete:
|
|
1352
|
+
onOnSelectValue: j,
|
|
1353
|
+
onOnInitComplete: k
|
|
1346
1354
|
}), {
|
|
1347
|
-
resultSelect:
|
|
1348
|
-
|
|
1355
|
+
resultSelect: re(() => [
|
|
1356
|
+
he(t.$slots, "resultSelect")
|
|
1349
1357
|
]),
|
|
1350
1358
|
_: 3
|
|
1351
1359
|
}, 16, ["dataRefreshIndex", "selectId"])
|
|
1352
|
-
], 10,
|
|
1360
|
+
], 10, ft));
|
|
1353
1361
|
}
|
|
1354
1362
|
});
|
|
1355
1363
|
export {
|
|
1356
|
-
|
|
1364
|
+
bt as default
|
|
1357
1365
|
};
|