fangguo-component 1.0.0 → 1.1.0
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/CHANGELOG.md +15 -0
- package/README.md +68 -36
- package/dist/ArgHover.css +1 -0
- package/dist/ArgHover.vue_vue_type_style_index_0_lang-CMhRP09M.js +54 -0
- package/dist/ButtonGroup-C0yZEkxK.js +103 -0
- package/dist/ButtonGroup.css +1 -0
- package/dist/CitySelect.vue_vue_type_script_setup_true_lang-8EbHD3Nt.js +159 -0
- package/dist/ContentTitle-mqrusLjx.js +24 -0
- package/dist/ContentTitle.css +1 -0
- package/dist/CustomInputV2-DYEcbu5_.js +135 -0
- package/dist/CustomInputV2.css +1 -0
- package/dist/CustomMultipleInput-DDaqoHVU.js +109 -0
- package/dist/CustomMultipleInput.css +1 -0
- package/dist/DragResizable.css +1 -0
- package/dist/DragResizable.vue_vue_type_style_index_0_lang-DYL6TUPE.js +167 -0
- package/dist/DragSort-CfDeFAIG.js +66 -0
- package/dist/DragSort.css +1 -0
- package/dist/ErrorImage-CTP_5sal.js +32 -0
- package/dist/ErrorImage.css +1 -0
- package/dist/FgCascader.css +1 -0
- package/dist/FgCascader.vue_vue_type_style_index_0_lang-OnqaEAao.js +1807 -0
- package/dist/HSelect-Bqz2yTMf.js +468 -0
- package/dist/HSelect.css +1 -0
- package/dist/HSelectAll.vue_vue_type_script_setup_true_lang-C8i6LF_k.js +36 -0
- package/dist/HSelectSJ-BieRp2gG.js +462 -0
- package/dist/HSelectSJ.css +1 -0
- package/dist/IdentifyAddress.vue_vue_type_script_setup_true_lang-BJheMI1q.js +4743 -0
- package/dist/ImageLoupe.vue_vue_type_script_setup_true_lang-BlX4VbRi.js +79 -0
- package/dist/LazyComponent.vue_vue_type_script_setup_true_lang-vNk68D8E.js +82 -0
- package/dist/LazyPopover.vue_vue_type_script_setup_true_lang-DcOrcH0T.js +33 -0
- package/dist/LoadingBtn-BhbhNboo.js +66 -0
- package/dist/LoadingBtn.css +1 -0
- package/dist/{MInput-CO6YUVuZ.js → MInput-CpoW17Wh.js} +6 -6
- package/dist/MInput.css +1 -1
- package/dist/MyTable-DmwyEVJb.js +68 -0
- package/dist/MyTable.css +1 -0
- package/dist/NoRender.vue_vue_type_script_setup_true_lang-Do36nSsV.js +30 -0
- package/dist/SelectAddress-B4oK5erq.js +173 -0
- package/dist/SelectAddress.css +1 -0
- package/dist/SelectAll.vue_vue_type_script_setup_true_lang-BC3q2U8f.js +79 -0
- package/dist/SelectAll2.vue_vue_type_script_setup_true_lang-CaET5eli.js +74 -0
- package/dist/SelectCustomAll.css +1 -0
- package/dist/SelectCustomAll.vue_vue_type_style_index_0_lang-_wCRO217.js +83 -0
- package/dist/SelectTimePicker.vue_vue_type_script_setup_true_lang-Bj0KMOKv.js +45 -0
- package/dist/SelectTree-C7lBZnZH.js +306 -0
- package/dist/SelectTree.css +1 -0
- package/dist/SortTransfer.css +1 -0
- package/dist/SortTransfer.vue_vue_type_style_index_0_lang-C5OmBF3s.js +153 -0
- package/dist/SvgIcon-C2ah8E0Z.js +30 -0
- package/dist/TextCopy.vue_vue_type_script_setup_true_lang-DbhZGH_z.js +29 -0
- package/dist/TextEllipsisTooltip.vue_vue_type_script_setup_true_lang-aZbEQmbM.js +112 -0
- package/dist/TipInput-CIskitOV.js +117 -0
- package/dist/TipInput.css +1 -0
- package/dist/VirtualTable-BYTfwDC1.js +353 -0
- package/dist/VirtualTable.css +1 -0
- package/dist/_commonjsHelpers-ByYUsBRP.js +33 -0
- package/dist/common-BIEgCXbl.js +7030 -0
- package/dist/components/VirtualTable/VirtualTable.vue.d.ts +127 -0
- package/dist/components/VirtualTable/index.d.ts +1 -0
- package/dist/components/VirtualTable/index.js +4 -0
- package/dist/components/argHover/ArgHover.vue.d.ts +51 -0
- package/dist/components/argHover/index.d.ts +1 -0
- package/dist/components/argHover/index.js +4 -0
- package/dist/components/buttonGroup/ButtonGroup.vue.d.ts +17 -0
- package/dist/components/buttonGroup/index.d.ts +1 -0
- package/dist/components/buttonGroup/index.js +4 -0
- package/dist/components/cascader/cascader/{cascader.vue.d.ts → ElCascader.vue.d.ts} +43 -43
- package/dist/components/cascader/cascader/FgCascader.vue.d.ts +4192 -0
- package/dist/components/cascader/cascader/index.d.ts +1 -3
- package/dist/components/cascader/cascader-panel/index.vue.d.ts +8 -8
- package/dist/components/cascader/cascader-panel/menu.vue.d.ts +3 -3
- package/dist/components/cascader/cascader-panel/node.vue.d.ts +2 -2
- package/dist/components/cascader/index.d.ts +1 -3
- package/dist/components/cascader/index.js +1 -1
- package/dist/components/cascader/utils/vue/props/util.d.ts +0 -1
- package/dist/components/cascader/utils/vue/size.d.ts +1 -1
- package/dist/components/citySelect/CitySelect.vue.d.ts +21 -0
- package/dist/components/citySelect/index.d.ts +1 -0
- package/dist/components/citySelect/index.js +4 -0
- package/dist/components/contentTitle/ContentTitle.vue.d.ts +20 -0
- package/dist/components/contentTitle/index.d.ts +1 -0
- package/dist/components/contentTitle/index.js +4 -0
- package/dist/components/customInputV2/CustomInputV2.vue.d.ts +47 -0
- package/dist/components/customInputV2/index.d.ts +1 -0
- package/dist/components/customInputV2/index.js +4 -0
- package/dist/components/customMultipleInput/CustomMultipleInput.vue.d.ts +46 -0
- package/dist/components/customMultipleInput/index.d.ts +1 -0
- package/dist/components/customMultipleInput/index.js +4 -0
- package/dist/components/dragResizable/DragResizable.vue.d.ts +57 -0
- package/dist/components/dragResizable/index.d.ts +1 -0
- package/dist/components/dragResizable/index.js +4 -0
- package/dist/components/dragSort/DragSort.vue.d.ts +34 -0
- package/dist/components/dragSort/index.d.ts +1 -0
- package/dist/components/dragSort/index.js +4 -0
- package/dist/components/errorImage/ErrorImage.vue.d.ts +23 -0
- package/dist/components/errorImage/index.d.ts +1 -0
- package/dist/components/errorImage/index.js +4 -0
- package/dist/components/hSelect/HSelect.vue.d.ts +103 -0
- package/dist/components/hSelect/index.d.ts +1 -0
- package/dist/components/hSelect/index.js +4 -0
- package/dist/components/hSelectAll/HSelectAll.vue.d.ts +10 -0
- package/dist/components/hSelectAll/index.d.ts +1 -0
- package/dist/components/hSelectAll/index.js +4 -0
- package/dist/components/hSelectSJ/HSelectSJ.vue.d.ts +105 -0
- package/dist/components/hSelectSJ/index.d.ts +1 -0
- package/dist/components/hSelectSJ/index.js +4 -0
- package/dist/components/identifyAddress/IdentifyAddress.vue.d.ts +10 -0
- package/dist/components/identifyAddress/index.d.ts +1 -0
- package/dist/components/identifyAddress/index.js +4 -0
- package/dist/components/imageLoupe/ImageLoupe.vue.d.ts +35 -0
- package/dist/components/imageLoupe/index.d.ts +1 -0
- package/dist/components/imageLoupe/index.js +4 -0
- package/dist/components/index.d.ts +31 -0
- package/dist/components/index.js +66 -4
- package/dist/components/lazyComponent/LazyComponent.vue.d.ts +37 -0
- package/dist/components/lazyComponent/index.d.ts +1 -0
- package/dist/components/lazyComponent/index.js +4 -0
- package/dist/components/lazyPopover/LazyPopover.vue.d.ts +31 -0
- package/dist/components/lazyPopover/index.d.ts +1 -0
- package/dist/components/lazyPopover/index.js +4 -0
- package/dist/components/loadingBtn/LoadingBtn.vue.d.ts +34 -0
- package/dist/components/loadingBtn/index.d.ts +1 -0
- package/dist/components/loadingBtn/index.js +4 -0
- package/dist/components/mInput/index.js +1 -1
- package/dist/components/myTable/MyTable.vue.d.ts +46 -0
- package/dist/components/myTable/index.d.ts +1 -0
- package/dist/components/myTable/index.js +4 -0
- package/dist/components/noRender/NoRender.vue.d.ts +23 -0
- package/dist/components/noRender/index.d.ts +1 -0
- package/dist/components/noRender/index.js +4 -0
- package/dist/components/selectAddress/SelectAddress.vue.d.ts +106 -0
- package/dist/components/selectAddress/index.d.ts +1 -0
- package/dist/components/selectAddress/index.js +4 -0
- package/dist/components/selectAll/SelectAll.vue.d.ts +124 -0
- package/dist/components/selectAll/index.d.ts +1 -0
- package/dist/components/selectAll/index.js +4 -0
- package/dist/components/selectAll2/SelectAll2.vue.d.ts +81 -0
- package/dist/components/selectAll2/index.d.ts +1 -0
- package/dist/components/selectAll2/index.js +4 -0
- package/dist/components/selectCustomAll/SelectCustomAll.vue.d.ts +77 -0
- package/dist/components/selectCustomAll/index.d.ts +1 -0
- package/dist/components/selectCustomAll/index.js +4 -0
- package/dist/components/selectTimePicker/SelectTimePicker.vue.d.ts +24 -0
- package/dist/components/selectTimePicker/index.d.ts +1 -0
- package/dist/components/selectTimePicker/index.js +4 -0
- package/dist/components/selectTree/SelectTree.vue.d.ts +39 -0
- package/dist/components/selectTree/index.d.ts +1 -0
- package/dist/components/selectTree/index.js +4 -0
- package/dist/components/sortTransfer/SortTransfer.vue.d.ts +97 -0
- package/dist/components/sortTransfer/index.d.ts +1 -0
- package/dist/components/sortTransfer/index.js +4 -0
- package/dist/components/svgIcon/index.d.ts +1 -0
- package/dist/components/svgIcon/index.js +4 -0
- package/dist/components/textCopy/TextCopy.vue.d.ts +21 -0
- package/dist/components/textCopy/index.d.ts +1 -0
- package/dist/components/textCopy/index.js +4 -0
- package/dist/components/textEllipsisTooltip/TextEllipsisTooltip.vue.d.ts +19 -0
- package/dist/components/textEllipsisTooltip/index.d.ts +1 -0
- package/dist/components/textEllipsisTooltip/index.js +4 -0
- package/dist/components/tipInput/TipInput.vue.d.ts +56 -0
- package/dist/components/tipInput/index.d.ts +1 -0
- package/dist/components/tipInput/index.js +4 -0
- package/dist/dateShortcuts-DDPtAhDI.js +26 -0
- package/dist/debounce-BLrZUqsA.js +84 -0
- package/dist/index-BKzmtfeu.js +72 -0
- package/dist/index-DIX8TpoT.js +118 -0
- package/dist/index-epuVZjZV.js +103 -0
- package/dist/index-uf7oyYDF.js +16847 -0
- package/dist/index.d.ts +161 -5
- package/dist/index.js +197 -46
- package/dist/isEqual-qYQTJBU6.js +506 -0
- package/dist/isObject-CO569sPG.js +35 -0
- package/dist/shims.d.ts +53 -13
- package/dist/tools/ImageParserUtils/common.d.ts +117 -0
- package/dist/tools/ImageParserUtils/etagBrowser.d.ts +4 -0
- package/dist/tools/ImageParserUtils/index.d.ts +7 -0
- package/dist/tools/ImageParserUtils/index.js +13116 -0
- package/dist/tools/ImageParserUtils/parseImage.d.ts +18 -0
- package/dist/tools/ImageParserUtils/parsePSD.d.ts +22 -0
- package/dist/tools/ImageParserUtils/parseTIFF.d.ts +18 -0
- package/dist/tools/common/common.d.ts +335 -23
- package/dist/tools/common/dateShortcuts.d.ts +5 -0
- package/dist/tools/common/index.d.ts +1 -0
- package/dist/tools/common/index.js +86 -5085
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.js +97 -8
- package/package.json +92 -81
- package/dist/cascader.css +0 -1
- package/dist/cascader.vue_vue_type_script_setup_true_lang-HFhhhQva.js +0 -2268
- package/dist/index-DihzpZcR.js +0 -14
- package/dist/index-wUcQXc_Z.js +0 -10
- package/dist/tools/Grid/Grid.d.ts +0 -48
- package/dist/tools/Grid/index.d.ts +0 -1
- package/dist/tools/Grid/index.js +0 -217
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { defineComponent as k, useModel as g, ref as r, watch as p, onMounted as L, resolveComponent as b, openBlock as h, createBlock as A, mergeProps as C, mergeModels as d, nextTick as S } from "vue";
|
|
2
|
+
const _ = /* @__PURE__ */ k({
|
|
3
|
+
__name: "SelectAll2",
|
|
4
|
+
props: /* @__PURE__ */ d({
|
|
5
|
+
labelkey: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: "label"
|
|
8
|
+
},
|
|
9
|
+
valuekey: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "value"
|
|
12
|
+
},
|
|
13
|
+
binds: {
|
|
14
|
+
type: Object,
|
|
15
|
+
default: () => ({})
|
|
16
|
+
},
|
|
17
|
+
list: {
|
|
18
|
+
// 传入的列表
|
|
19
|
+
type: Array,
|
|
20
|
+
default: () => []
|
|
21
|
+
}
|
|
22
|
+
}, {
|
|
23
|
+
modelValue: { type: Array },
|
|
24
|
+
modelModifiers: {}
|
|
25
|
+
}),
|
|
26
|
+
emits: /* @__PURE__ */ d(["change", "clear"], ["update:modelValue"]),
|
|
27
|
+
setup(i, { emit: y }) {
|
|
28
|
+
const t = g(i, "modelValue"), v = y, e = i, l = r([]);
|
|
29
|
+
p(() => e.list, () => {
|
|
30
|
+
c();
|
|
31
|
+
}), p(t, (u, o) => {
|
|
32
|
+
JSON.stringify(u) !== JSON.stringify(o) && (l.value = t.value);
|
|
33
|
+
});
|
|
34
|
+
const c = () => {
|
|
35
|
+
const u = JSON.parse(JSON.stringify(e.list));
|
|
36
|
+
u.unshift({ [e.labelkey]: "全部选择", [e.valuekey]: "ALL" }), a.value = u;
|
|
37
|
+
}, a = r([]), f = (u) => {
|
|
38
|
+
S(() => {
|
|
39
|
+
if (l.value.includes("ALL")) {
|
|
40
|
+
const o = [], s = [];
|
|
41
|
+
a.value.forEach((n) => {
|
|
42
|
+
n[e.valuekey] !== "ALL" && !l.value.includes(n[e.valuekey]) && (o.push(n[e.valuekey]), s.push(n[e.valuekey]));
|
|
43
|
+
}), l.value = s, a.value[0][e.valuekey] = "CANCEL", a.value[0][e.labelkey] = "全部取消";
|
|
44
|
+
} else l.value.includes("CANCEL") && (l.value = [], a.value[0][e.valuekey] = "ALL", a.value[0][e.labelkey] = "全部选择");
|
|
45
|
+
t.value = l.value, v("change", t.value);
|
|
46
|
+
});
|
|
47
|
+
}, m = () => {
|
|
48
|
+
t.value = [], a.value[0][e.valuekey] = "ALL", a.value[0][e.labelkey] = "全部选择", v("clear");
|
|
49
|
+
};
|
|
50
|
+
return L(() => {
|
|
51
|
+
c(), l.value = t.value;
|
|
52
|
+
}), (u, o) => {
|
|
53
|
+
const s = b("el-select-v2");
|
|
54
|
+
return h(), A(s, C({
|
|
55
|
+
filterable: "",
|
|
56
|
+
modelValue: l.value,
|
|
57
|
+
"onUpdate:modelValue": o[0] || (o[0] = (n) => l.value = n)
|
|
58
|
+
}, i.binds, {
|
|
59
|
+
options: a.value,
|
|
60
|
+
style: { width: "150px" },
|
|
61
|
+
multiple: "",
|
|
62
|
+
clearable: "",
|
|
63
|
+
"collapse-tags": "",
|
|
64
|
+
"collapse-tags-tooltip": "",
|
|
65
|
+
onChange: f,
|
|
66
|
+
onClear: m,
|
|
67
|
+
height: 300
|
|
68
|
+
}), null, 16, ["modelValue", "options"]);
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
export {
|
|
73
|
+
_
|
|
74
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.custom-header .el-checkbox{display:flex;height:unset}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { defineComponent as A, ref as i, useModel as C, watch as b, resolveComponent as c, openBlock as m, createBlock as h, mergeProps as g, createSlots as M, withCtx as f, createElementBlock as S, Fragment as _, renderList as x, createVNode as w, createTextVNode as B, mergeModels as L } from "vue";
|
|
2
|
+
import './SelectCustomAll.css';const O = /* @__PURE__ */ A({
|
|
3
|
+
__name: "SelectCustomAll",
|
|
4
|
+
props: /* @__PURE__ */ L({
|
|
5
|
+
list: {
|
|
6
|
+
// 传入的列表
|
|
7
|
+
type: Array,
|
|
8
|
+
default: () => []
|
|
9
|
+
},
|
|
10
|
+
label: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: "label"
|
|
13
|
+
},
|
|
14
|
+
value: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "value"
|
|
17
|
+
},
|
|
18
|
+
selectAll: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !0
|
|
21
|
+
}
|
|
22
|
+
}, {
|
|
23
|
+
modelValue: {},
|
|
24
|
+
modelModifiers: {}
|
|
25
|
+
}),
|
|
26
|
+
emits: ["update:modelValue"],
|
|
27
|
+
setup(v) {
|
|
28
|
+
const l = v, n = i(JSON.parse(JSON.stringify(l.list))), a = C(v, "modelValue"), s = i(!1), u = i(!1), p = () => {
|
|
29
|
+
if (a.value.length) {
|
|
30
|
+
const t = a.value.some((r) => n.value.some((d) => d[l.value] === r));
|
|
31
|
+
n.value.every((r) => a.value.some((d) => r[l.value] === d)) ? (s.value = !0, u.value = !1) : t ? u.value = !0 : (s.value = !1, u.value = !1);
|
|
32
|
+
} else
|
|
33
|
+
u.value = !1, s.value = !1;
|
|
34
|
+
}, V = (t) => {
|
|
35
|
+
n.value = l.list.filter((e) => e[l.label].toLowerCase().indexOf(t.toLowerCase()) >= 0), p();
|
|
36
|
+
};
|
|
37
|
+
b(() => a.value, () => {
|
|
38
|
+
p();
|
|
39
|
+
});
|
|
40
|
+
const k = (t) => {
|
|
41
|
+
u.value = !1, t ? a.value = n.value.map((e) => e[l.value]) : a.value = [];
|
|
42
|
+
};
|
|
43
|
+
return (t, e) => {
|
|
44
|
+
const r = c("el-checkbox"), d = c("el-option"), y = c("el-select");
|
|
45
|
+
return m(), h(y, g(t.$attrs, {
|
|
46
|
+
modelValue: a.value,
|
|
47
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => a.value = o),
|
|
48
|
+
"filter-method": V,
|
|
49
|
+
placeholder: "请选择"
|
|
50
|
+
}), M({
|
|
51
|
+
default: f(() => [
|
|
52
|
+
(m(!0), S(_, null, x(n.value, (o) => (m(), h(d, {
|
|
53
|
+
key: o.value,
|
|
54
|
+
label: o[l.label],
|
|
55
|
+
value: o[l.value]
|
|
56
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
57
|
+
]),
|
|
58
|
+
_: 2
|
|
59
|
+
}, [
|
|
60
|
+
v.selectAll ? {
|
|
61
|
+
name: "header",
|
|
62
|
+
fn: f(() => [
|
|
63
|
+
w(r, {
|
|
64
|
+
modelValue: s.value,
|
|
65
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => s.value = o),
|
|
66
|
+
indeterminate: u.value,
|
|
67
|
+
onChange: k
|
|
68
|
+
}, {
|
|
69
|
+
default: f(() => [...e[2] || (e[2] = [
|
|
70
|
+
B(" 全选 ", -1)
|
|
71
|
+
])]),
|
|
72
|
+
_: 1
|
|
73
|
+
}, 8, ["modelValue", "indeterminate"])
|
|
74
|
+
]),
|
|
75
|
+
key: "0"
|
|
76
|
+
} : void 0
|
|
77
|
+
]), 1040, ["modelValue"]);
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
export {
|
|
82
|
+
O as _
|
|
83
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineComponent as u, useModel as c, resolveComponent as m, openBlock as i, createElementBlock as p, createVNode as d, unref as o, mergeModels as f } from "vue";
|
|
2
|
+
import { dayjs as s } from "element-plus";
|
|
3
|
+
import { s as V } from "./dateShortcuts-DDPtAhDI.js";
|
|
4
|
+
const v = { class: "flex" }, k = /* @__PURE__ */ u({
|
|
5
|
+
__name: "SelectTimePicker",
|
|
6
|
+
props: /* @__PURE__ */ f({
|
|
7
|
+
mapData: {},
|
|
8
|
+
selectOption: {},
|
|
9
|
+
propsConfig: {}
|
|
10
|
+
}, {
|
|
11
|
+
modelValue: {},
|
|
12
|
+
modelModifiers: {}
|
|
13
|
+
}),
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(e) {
|
|
16
|
+
const l = c(e, "modelValue");
|
|
17
|
+
return (h, t) => {
|
|
18
|
+
const n = m("el-select-v2"), r = m("el-date-picker");
|
|
19
|
+
return i(), p("div", v, [
|
|
20
|
+
d(n, {
|
|
21
|
+
modelValue: l.value[e.mapData.selectLabel],
|
|
22
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => l.value[e.mapData.selectLabel] = a),
|
|
23
|
+
options: e.selectOption,
|
|
24
|
+
placeholder: "时间类型",
|
|
25
|
+
style: { width: "125px" },
|
|
26
|
+
clearable: ""
|
|
27
|
+
}, null, 8, ["modelValue", "options"]),
|
|
28
|
+
d(r, {
|
|
29
|
+
modelValue: l.value[e.mapData.timeLabel],
|
|
30
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => l.value[e.mapData.timeLabel] = a),
|
|
31
|
+
type: "daterange",
|
|
32
|
+
"value-format": "x",
|
|
33
|
+
"start-placeholder": "开始时间",
|
|
34
|
+
"end-placeholder": "结束时间",
|
|
35
|
+
defaultTime: [o(s)().startOf("day"), o(s)().endOf("day")],
|
|
36
|
+
shortcuts: o(V),
|
|
37
|
+
style: { width: "260px" }
|
|
38
|
+
}, null, 8, ["modelValue", "defaultTime", "shortcuts"])
|
|
39
|
+
]);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
k as _
|
|
45
|
+
};
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import './SelectTree.css';var S = (t, J, w) => new Promise((d, a) => {
|
|
2
|
+
var y = (o) => {
|
|
3
|
+
try {
|
|
4
|
+
v(w.next(o));
|
|
5
|
+
} catch (b) {
|
|
6
|
+
a(b);
|
|
7
|
+
}
|
|
8
|
+
}, x = (o) => {
|
|
9
|
+
try {
|
|
10
|
+
v(w.throw(o));
|
|
11
|
+
} catch (b) {
|
|
12
|
+
a(b);
|
|
13
|
+
}
|
|
14
|
+
}, v = (o) => o.done ? d(o.value) : Promise.resolve(o.value).then(y, x);
|
|
15
|
+
v((w = w.apply(t, J)).next());
|
|
16
|
+
});
|
|
17
|
+
import { defineComponent as oe, ref as m, watch as T, computed as ce, nextTick as B, onMounted as se, resolveComponent as k, openBlock as K, createBlock as X, withCtx as f, createElementBlock as P, toDisplayString as D, createCommentVNode as E, createVNode as g, createElementVNode as C, normalizeStyle as Y, normalizeClass as z, createTextVNode as W, withDirectives as ue, withModifiers as Z, vModelText as ne } from "vue";
|
|
18
|
+
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
19
|
+
const ie = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "select-tree-normal-value"
|
|
22
|
+
}, re = { class: "max-h-[280px] overflow-y-auto" }, ve = { class: "select-tree-normal-placeholder cursor-default" }, he = ["disabled", "placeholder"], pe = ["title"], fe = /* @__PURE__ */ oe({
|
|
23
|
+
__name: "SelectTree",
|
|
24
|
+
props: {
|
|
25
|
+
modelValue: {},
|
|
26
|
+
placeholder: { default: "请选择" },
|
|
27
|
+
data: {},
|
|
28
|
+
checkoutAll: { type: Boolean, default: !0 },
|
|
29
|
+
multiple: { type: Boolean, default: !0 },
|
|
30
|
+
disabled: { type: Boolean, default: !1 },
|
|
31
|
+
props: {},
|
|
32
|
+
height: {},
|
|
33
|
+
width: {},
|
|
34
|
+
calcWidth: {},
|
|
35
|
+
filter: {},
|
|
36
|
+
wrapclass: {},
|
|
37
|
+
inputClass: {},
|
|
38
|
+
selectAllNode: { type: Boolean, default: !1 }
|
|
39
|
+
},
|
|
40
|
+
emits: ["update:modelValue", "change", "visible-change"],
|
|
41
|
+
setup(t, { expose: J, emit: w }) {
|
|
42
|
+
const d = w, a = t, y = m([]), x = (l, e) => {
|
|
43
|
+
var i, p, s;
|
|
44
|
+
const c = ((i = a.props) == null ? void 0 : i.label) || "label";
|
|
45
|
+
return ((p = (e[c] || "").toLowerCase()) == null ? void 0 : p.includes(l.toLowerCase())) || ((s = e.searchKey || "") == null ? void 0 : s.toLocaleLowerCase().includes(l.toLowerCase()));
|
|
46
|
+
}, v = m(!1), o = m(null), b = m([]), O = m([]), u = m([]), h = m(""), N = m(!1), $ = m("");
|
|
47
|
+
T(v, (l) => {
|
|
48
|
+
o.value.setExpandedKeys([]), d("visible-change", v.value), l ? F.value.focus() : (h.value = "", F.value.blur(), o.value && o.value.filter("")), !a.multiple && (h.value = $.value, o.value.filter(""));
|
|
49
|
+
});
|
|
50
|
+
const F = m(null), q = (l) => {
|
|
51
|
+
o.value.filter(l.target.value);
|
|
52
|
+
}, _ = (l) => {
|
|
53
|
+
a.multiple || l.children || ($.value = l[a.props && a.props.label || "label"], h.value = l[a.props && a.props.label || "label"], v.value = !1, d("update:modelValue", l[n.value]), d("change", l[n.value], o.value.getCheckedNodes()));
|
|
54
|
+
}, n = ce(() => a.props && a.props.value ? a.props.value : "id"), R = (l) => {
|
|
55
|
+
o.value.setChecked(l[n.value], !1), H({
|
|
56
|
+
checkedKeys: o.value.getCheckedKeys(),
|
|
57
|
+
checkedNodes: o.value.getCheckedNodes()
|
|
58
|
+
}), d("update:modelValue", u.value.map((e) => e[n.value])), d("change", u.value.map((e) => e[n.value]), o.value.getCheckedNodes());
|
|
59
|
+
}, H = (l) => {
|
|
60
|
+
b.value = l.checkedKeys, O.value = l.checkedNodes, u.value = l.checkedNodes.filter((e) => !e.children);
|
|
61
|
+
}, ee = (l, e) => {
|
|
62
|
+
if (a.multiple && F.value.focus(), !a.selectAllNode && l && l.children && h.value) {
|
|
63
|
+
const c = l.children.filter((s) => (a.filter || x)(h.value, s)).map((s) => s[n.value]);
|
|
64
|
+
if (!c.length) {
|
|
65
|
+
A();
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const p = !b.value.includes(c[0]) ? [...u.value.map((s) => s[n.value]), ...c.map((s) => s)] : u.value.map((s) => s[n.value]).filter((s) => !c.includes(s));
|
|
69
|
+
d("update:modelValue", p), d("change", p, o.value.getCheckedNodes());
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
H(e), d("update:modelValue", u.value.map((c) => c[n.value])), d("change", u.value.map((c) => c[n.value]), o.value.getCheckedNodes());
|
|
73
|
+
};
|
|
74
|
+
T(N, () => {
|
|
75
|
+
var l;
|
|
76
|
+
if (N.value) {
|
|
77
|
+
let e = [], c = [];
|
|
78
|
+
y.value.forEach((i) => {
|
|
79
|
+
if (a.selectAllNode && (a.filter || x)(h.value, i)) {
|
|
80
|
+
const { children: p } = i;
|
|
81
|
+
e.push(i[n.value]), e = e.concat(p.map((s) => s[n.value])), c = c.concat(p.map((s) => s[n.value]));
|
|
82
|
+
} else {
|
|
83
|
+
const { children: p } = i, s = [];
|
|
84
|
+
let L = !0;
|
|
85
|
+
p.forEach((V) => {
|
|
86
|
+
(a.filter || x)(h.value, V) ? s.push(V[n.value]) : L = !1;
|
|
87
|
+
}), L && e.push(i[n.value]), e = e.concat(s), c = c.concat(s);
|
|
88
|
+
}
|
|
89
|
+
}), d("update:modelValue", c), d("change", c, o.value.getCheckedNodes());
|
|
90
|
+
} else
|
|
91
|
+
(l = o.value) == null || l.setCheckedKeys([]), b.value = [], O.value = [], u.value = [], d("update:modelValue", u.value.map((e) => e[n.value])), d("change", u.value.map((e) => e[n.value]), o.value.getCheckedNodes());
|
|
92
|
+
});
|
|
93
|
+
const U = () => {
|
|
94
|
+
var l;
|
|
95
|
+
if (!a.multiple) {
|
|
96
|
+
$.value = "", h.value = "", d("update:modelValue", ""), d("change", "", o.value.getCheckedNodes());
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
(l = o.value) == null || l.setCheckedKeys([]), b.value = [], O.value = [], u.value = [], N.value = !1, d("update:modelValue", u.value.map((e) => e[n.value])), d("change", u.value.map((e) => e[n.value]), o.value.getCheckedNodes());
|
|
100
|
+
}, A = () => S(null, null, function* () {
|
|
101
|
+
var l;
|
|
102
|
+
if (a.multiple) {
|
|
103
|
+
const e = [...a.modelValue || []];
|
|
104
|
+
(l = o.value) == null || l.setCheckedKeys([...e]), yield B(), H({
|
|
105
|
+
checkedKeys: o.value.getCheckedKeys(),
|
|
106
|
+
checkedNodes: o.value.getCheckedNodes()
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
T(() => [a.data], () => S(null, null, function* () {
|
|
111
|
+
y.value = JSON.parse(JSON.stringify(a.data)), yield B(), I(), A();
|
|
112
|
+
}), {
|
|
113
|
+
deep: !0
|
|
114
|
+
});
|
|
115
|
+
const I = () => {
|
|
116
|
+
if (!(!y.value.length || a.multiple)) {
|
|
117
|
+
if (a.modelValue === null || !String(a.modelValue))
|
|
118
|
+
return h.value = "";
|
|
119
|
+
j(y.value, a.modelValue);
|
|
120
|
+
}
|
|
121
|
+
}, j = (l, e) => {
|
|
122
|
+
l.forEach((c) => {
|
|
123
|
+
if (c.children)
|
|
124
|
+
return j(c.children, e);
|
|
125
|
+
c.id === e && (h.value = c[a.props && a.props.label || "label"]);
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
J({
|
|
129
|
+
clearCheaked: U,
|
|
130
|
+
togglePopperVisible: (l) => {
|
|
131
|
+
v.value = l;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
const G = (l) => {
|
|
135
|
+
try {
|
|
136
|
+
return JSON.stringify(l);
|
|
137
|
+
} catch (e) {
|
|
138
|
+
return l;
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
return T(() => a.modelValue, (l, e) => S(null, null, function* () {
|
|
142
|
+
const c = G(l), i = G(e);
|
|
143
|
+
c !== i && (yield B(), I(), A());
|
|
144
|
+
})), se(() => S(null, null, function* () {
|
|
145
|
+
yield B(), y.value = JSON.parse(JSON.stringify(a.data)), I(), setTimeout(() => {
|
|
146
|
+
A();
|
|
147
|
+
});
|
|
148
|
+
})), (l, e) => {
|
|
149
|
+
const c = k("el-tag"), i = k("DynamicScrollerItem"), p = k("DynamicScroller"), s = k("LazyPopover"), L = k("ArrowDown"), V = k("el-icon"), Q = k("CircleClose"), le = k("el-tree-v2"), te = k("el-popover");
|
|
150
|
+
return K(), X(te, {
|
|
151
|
+
visible: v.value,
|
|
152
|
+
"onUpdate:visible": e[4] || (e[4] = (r) => v.value = r),
|
|
153
|
+
disabled: t.disabled,
|
|
154
|
+
placement: "bottom",
|
|
155
|
+
trigger: "click",
|
|
156
|
+
width: `${t.width}`
|
|
157
|
+
}, {
|
|
158
|
+
reference: f(() => [
|
|
159
|
+
C("div", {
|
|
160
|
+
class: z(["select-tree", t.wrapclass]),
|
|
161
|
+
style: Y({ width: (t.calcWidth ? t.calcWidth : t.width) + "px" })
|
|
162
|
+
}, [
|
|
163
|
+
C("div", {
|
|
164
|
+
class: z(["select-tree-wrapper", { "is-focused": v.value }]),
|
|
165
|
+
style: Y({ width: t.calcWidth ? "100%" : t.width + "px", backgroundColor: t.disabled ? "#F5F9FF" : "" })
|
|
166
|
+
}, [
|
|
167
|
+
u.value.length ? (K(), P("div", ie, [
|
|
168
|
+
g(c, {
|
|
169
|
+
class: "m-val-tag mx-[5px]",
|
|
170
|
+
type: "info",
|
|
171
|
+
title: u.value[0][t.props && t.props.label || "label"],
|
|
172
|
+
closable: "",
|
|
173
|
+
onClose: e[0] || (e[0] = (r) => R(u.value[0]))
|
|
174
|
+
}, {
|
|
175
|
+
default: f(() => [
|
|
176
|
+
W(D(u.value[0][t.props && t.props.label || "label"]), 1)
|
|
177
|
+
]),
|
|
178
|
+
_: 1
|
|
179
|
+
}, 8, ["title"]),
|
|
180
|
+
u.value.length > 1 ? (K(), X(s, {
|
|
181
|
+
key: 0,
|
|
182
|
+
width: `${t.width}px`
|
|
183
|
+
}, {
|
|
184
|
+
reference: f(() => [
|
|
185
|
+
g(c, { type: "info" }, {
|
|
186
|
+
default: f(() => [
|
|
187
|
+
W("+ " + D(u.value.length - 1), 1)
|
|
188
|
+
]),
|
|
189
|
+
_: 1
|
|
190
|
+
})
|
|
191
|
+
]),
|
|
192
|
+
default: f(() => [
|
|
193
|
+
C("div", re, [
|
|
194
|
+
g(p, {
|
|
195
|
+
ref: "DynamicScrollerRef",
|
|
196
|
+
class: "dynamic-scroller-ref",
|
|
197
|
+
style: { height: "280px" },
|
|
198
|
+
keyField: n.value,
|
|
199
|
+
items: u.value.filter((r, M) => M !== 0),
|
|
200
|
+
"min-item-size": 20
|
|
201
|
+
}, {
|
|
202
|
+
default: f(({ item: r, index: M, active: ae }) => [
|
|
203
|
+
g(i, {
|
|
204
|
+
item: r,
|
|
205
|
+
active: ae,
|
|
206
|
+
"data-index": M
|
|
207
|
+
}, {
|
|
208
|
+
default: f(() => [
|
|
209
|
+
g(c, {
|
|
210
|
+
class: "mr-[5px] mt-[5px]",
|
|
211
|
+
closable: "",
|
|
212
|
+
onClose: (ge) => R(r)
|
|
213
|
+
}, {
|
|
214
|
+
default: f(() => [
|
|
215
|
+
W(D(r[t.props && t.props.label || "label"]), 1)
|
|
216
|
+
]),
|
|
217
|
+
_: 2
|
|
218
|
+
}, 1032, ["onClose"])
|
|
219
|
+
]),
|
|
220
|
+
_: 2
|
|
221
|
+
}, 1032, ["item", "active", "data-index"])
|
|
222
|
+
]),
|
|
223
|
+
_: 1
|
|
224
|
+
}, 8, ["keyField", "items"])
|
|
225
|
+
])
|
|
226
|
+
]),
|
|
227
|
+
_: 1
|
|
228
|
+
}, 8, ["width"])) : E("", !0)
|
|
229
|
+
])) : E("", !0),
|
|
230
|
+
C("div", ve, [
|
|
231
|
+
ue(C("input", {
|
|
232
|
+
ref_key: "inputRef",
|
|
233
|
+
ref: F,
|
|
234
|
+
"onUpdate:modelValue": e[1] || (e[1] = (r) => h.value = r),
|
|
235
|
+
class: z(t.inputClass),
|
|
236
|
+
disabled: t.disabled,
|
|
237
|
+
style: { height: "24px" },
|
|
238
|
+
type: "text",
|
|
239
|
+
placeholder: t.placeholder,
|
|
240
|
+
onKeydown: e[2] || (e[2] = Z(() => {
|
|
241
|
+
}, ["stop"])),
|
|
242
|
+
onInput: q
|
|
243
|
+
}, null, 42, he), [
|
|
244
|
+
[ne, h.value]
|
|
245
|
+
])
|
|
246
|
+
]),
|
|
247
|
+
C("div", {
|
|
248
|
+
class: z(["select-tree-arrow", { "is-focused": v.value }])
|
|
249
|
+
}, [
|
|
250
|
+
g(V, null, {
|
|
251
|
+
default: f(() => [
|
|
252
|
+
g(L)
|
|
253
|
+
]),
|
|
254
|
+
_: 1
|
|
255
|
+
})
|
|
256
|
+
], 2),
|
|
257
|
+
!t.disabled && (t.multiple && u.value.length || !t.multiple && t.modelValue) ? (K(), P("div", {
|
|
258
|
+
key: 1,
|
|
259
|
+
class: "select-tree-clear",
|
|
260
|
+
onClick: Z(U, ["stop"])
|
|
261
|
+
}, [
|
|
262
|
+
g(V, null, {
|
|
263
|
+
default: f(() => [
|
|
264
|
+
g(Q)
|
|
265
|
+
]),
|
|
266
|
+
_: 1
|
|
267
|
+
})
|
|
268
|
+
])) : E("", !0)
|
|
269
|
+
], 6)
|
|
270
|
+
], 6)
|
|
271
|
+
]),
|
|
272
|
+
default: f(() => [
|
|
273
|
+
t.multiple && t.checkoutAll ? (K(), P("div", {
|
|
274
|
+
key: 0,
|
|
275
|
+
class: "px-[10px] pb-[10px] border-b-[1px] mb-[5px] border-b-[#f5f5f5] cursor-pointer",
|
|
276
|
+
onClick: e[3] || (e[3] = (r) => N.value = !N.value)
|
|
277
|
+
}, D(N.value ? "全部取消" : "全部选择当前"), 1)) : E("", !0),
|
|
278
|
+
g(le, {
|
|
279
|
+
ref_key: "tree",
|
|
280
|
+
ref: o,
|
|
281
|
+
style: { width: "100%" },
|
|
282
|
+
class: "custom-select-tree-box",
|
|
283
|
+
data: y.value,
|
|
284
|
+
props: t.props,
|
|
285
|
+
"show-checkbox": t.multiple,
|
|
286
|
+
height: t.height,
|
|
287
|
+
"filter-method": t.filter || x,
|
|
288
|
+
onNodeClick: _,
|
|
289
|
+
onCheck: ee
|
|
290
|
+
}, {
|
|
291
|
+
default: f(({ node: r }) => [
|
|
292
|
+
C("span", {
|
|
293
|
+
title: r.label
|
|
294
|
+
}, D(r.label), 9, pe)
|
|
295
|
+
]),
|
|
296
|
+
_: 1
|
|
297
|
+
}, 8, ["data", "props", "show-checkbox", "height", "filter-method"])
|
|
298
|
+
]),
|
|
299
|
+
_: 1
|
|
300
|
+
}, 8, ["visible", "disabled", "width"]);
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
}), Ce = /* @__PURE__ */ de(fe, [["__scopeId", "data-v-9e85273f"]]);
|
|
304
|
+
export {
|
|
305
|
+
Ce as S
|
|
306
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.select-tree[data-v-9e85273f]{display:inline-block;width:100%}.select-tree .select-tree-wrapper[data-v-9e85273f]{position:relative;display:flex;align-items:center;padding-right:30px;min-height:32px;background-color:#fff;border:1px solid #dcdfe6;border-radius:4px;flex-wrap:nowrap}.select-tree .select-tree-wrapper.is-focused[data-v-9e85273f]{border-color:#4485f5}.select-tree .select-tree-wrapper .select-tree-normal-placeholder[data-v-9e85273f]{overflow:hidden;flex:1;line-height:30px;margin-inline-start:5px;color:#000}.select-tree .select-tree-wrapper .select-tree-normal-placeholder input[data-v-9e85273f]:focus-visible{outline:none}.select-tree .select-tree-wrapper .select-tree-normal-value[data-v-9e85273f]{display:contents;padding:5px 4px;margin-right:-12px;text-wrap:nowrap}.select-tree .select-tree-wrapper .select-tree-normal-value .m-val-tag[data-v-9e85273f]{max-width:60%}.select-tree .select-tree-wrapper .select-tree-normal-value .m-val-tag[data-v-9e85273f] .el-tag__content{display:inline-block;overflow:hidden;width:100%;text-overflow:ellipsis}.select-tree .select-tree-wrapper .select-tree-arrow[data-v-9e85273f]{position:absolute;top:8px;right:10px;color:#a8abb2;transition:all .3s;transform:rotateX(0)}.select-tree .select-tree-wrapper .select-tree-arrow.is-focused[data-v-9e85273f]{transform:rotate(-180deg)}.select-tree .select-tree-wrapper:hover .select-tree-clear[data-v-9e85273f]{display:block}.select-tree .select-tree-wrapper .select-tree-clear[data-v-9e85273f]{position:absolute;top:8px;right:10px;display:none;color:#a8abb2;background:#fff;transition:all .3s;cursor:pointer;transform:rotateX(0)}.custom-select-tree-box .el-tree-node__content span{display:inline-block;max-width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sort-transfer .el-checkbox__label{padding-left:3px}.sort-transfer .el-checkbox{height:24px}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import './SortTransfer.css';var q = Object.defineProperty, z = Object.defineProperties;
|
|
2
|
+
var G = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var N = Object.getOwnPropertySymbols;
|
|
4
|
+
var H = Object.prototype.hasOwnProperty, J = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var S = (o, l, n) => l in o ? q(o, l, { enumerable: !0, configurable: !0, writable: !0, value: n }) : o[l] = n, V = (o, l) => {
|
|
6
|
+
for (var n in l || (l = {}))
|
|
7
|
+
H.call(l, n) && S(o, n, l[n]);
|
|
8
|
+
if (N)
|
|
9
|
+
for (var n of N(l))
|
|
10
|
+
J.call(l, n) && S(o, n, l[n]);
|
|
11
|
+
return o;
|
|
12
|
+
}, D = (o, l) => z(o, G(l));
|
|
13
|
+
import { defineComponent as K, reactive as O, ref as L, onMounted as P, resolveComponent as m, openBlock as f, createBlock as Q, withCtx as i, createElementVNode as a, renderSlot as R, toDisplayString as x, createElementBlock as g, Fragment as B, renderList as U, withModifiers as k, createVNode as _, createTextVNode as h } from "vue";
|
|
14
|
+
const W = { class: "flex flex-col" }, X = { class: "flex mt-[10px]" }, Y = { class: "w-[80px] flex-shrink-0 text-right pr-[5px]" }, Z = { class: "flex flex-auto flex-wrap p-[5px] border rounded-[5px]" }, ee = ["onDragstart", "onDragover"], te = ["onClick"], oe = { class: "flex mt-[10px]" }, le = { class: "w-[80px] flex-shrink-0 text-right pr-[5px]" }, ne = { class: "flex flex-auto flex-wrap p-[5px] border rounded-[5px]" }, re = /* @__PURE__ */ K({
|
|
15
|
+
__name: "SortTransfer",
|
|
16
|
+
props: {
|
|
17
|
+
show: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: () => !1
|
|
20
|
+
},
|
|
21
|
+
title: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: () => "订单操作按钮配置"
|
|
24
|
+
},
|
|
25
|
+
label1: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: () => "展示"
|
|
28
|
+
},
|
|
29
|
+
label2: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: () => "更多操作"
|
|
32
|
+
},
|
|
33
|
+
sortList: {
|
|
34
|
+
type: Array,
|
|
35
|
+
default: () => []
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
emits: ["close", "done"],
|
|
39
|
+
setup(o, { emit: l }) {
|
|
40
|
+
const n = o, d = O({
|
|
41
|
+
old: -1,
|
|
42
|
+
new: -1
|
|
43
|
+
}), w = l, s = L([]), r = L([]);
|
|
44
|
+
P(() => {
|
|
45
|
+
r.value = [...n.sortList].map((e, t) => D(V({}, e), { id: `originId-${t}` })), C();
|
|
46
|
+
});
|
|
47
|
+
const y = () => {
|
|
48
|
+
w("close");
|
|
49
|
+
}, E = () => {
|
|
50
|
+
w("done", s.value);
|
|
51
|
+
}, C = () => {
|
|
52
|
+
s.value = r.value.filter((e) => !!e.show).sort((e, t) => e.sort - t.sort);
|
|
53
|
+
}, M = (e) => {
|
|
54
|
+
const t = s.value.splice(e, 1)[0], u = r.value.findIndex((v) => v.id === t.id);
|
|
55
|
+
r.value[u].show = !1;
|
|
56
|
+
}, T = (e, t) => {
|
|
57
|
+
r.value[e].show = t, r.value[e].sort = t ? s.value[s.value.length - 1].sort + 1 : -1, C();
|
|
58
|
+
}, $ = (e) => {
|
|
59
|
+
d.old = e;
|
|
60
|
+
}, A = (e) => {
|
|
61
|
+
d.new = e;
|
|
62
|
+
}, F = () => {
|
|
63
|
+
if (d.new === d.old) return;
|
|
64
|
+
const e = s.value.splice(d.old, 1)[0];
|
|
65
|
+
s.value.splice(d.new, 0, e), s.value.forEach((t, u) => {
|
|
66
|
+
t.sort = u + 1;
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
return (e, t) => {
|
|
70
|
+
const u = m("el-tag"), v = m("el-checkbox"), I = m("el-button"), j = m("el-dialog");
|
|
71
|
+
return f(), Q(j, {
|
|
72
|
+
"model-value": n.show,
|
|
73
|
+
title: o.title,
|
|
74
|
+
closeable: "",
|
|
75
|
+
class: "sort-transfer",
|
|
76
|
+
draggable: "",
|
|
77
|
+
onClose: y,
|
|
78
|
+
"close-on-click-modal": !1
|
|
79
|
+
}, {
|
|
80
|
+
footer: i(() => [
|
|
81
|
+
_(I, { onClick: y }, {
|
|
82
|
+
default: i(() => [...t[1] || (t[1] = [
|
|
83
|
+
h("取消", -1)
|
|
84
|
+
])]),
|
|
85
|
+
_: 1
|
|
86
|
+
}),
|
|
87
|
+
_(I, {
|
|
88
|
+
onClick: E,
|
|
89
|
+
type: "primary"
|
|
90
|
+
}, {
|
|
91
|
+
default: i(() => [...t[2] || (t[2] = [
|
|
92
|
+
h("确定修改", -1)
|
|
93
|
+
])]),
|
|
94
|
+
_: 1
|
|
95
|
+
})
|
|
96
|
+
]),
|
|
97
|
+
default: i(() => [
|
|
98
|
+
a("div", W, [
|
|
99
|
+
R(e.$slots, "desc"),
|
|
100
|
+
a("section", X, [
|
|
101
|
+
a("span", Y, x(o.label1), 1),
|
|
102
|
+
a("ul", Z, [
|
|
103
|
+
(f(!0), g(B, null, U(s.value, (c, p) => (f(), g("li", {
|
|
104
|
+
key: c.key,
|
|
105
|
+
class: "mr-[5px] mb-[5px]",
|
|
106
|
+
draggable: "true",
|
|
107
|
+
onDragstart: () => $(Number(p)),
|
|
108
|
+
onDragover: k(() => A(Number(p)), ["prevent"]),
|
|
109
|
+
onDrop: t[0] || (t[0] = k(() => F(), ["prevent"]))
|
|
110
|
+
}, [
|
|
111
|
+
_(u, { class: "cursor-pointer" }, {
|
|
112
|
+
default: i(() => [
|
|
113
|
+
h(x(c.label) + " ", 1),
|
|
114
|
+
a("i", {
|
|
115
|
+
onClick: k(() => M(Number(p)), ["prevent"]),
|
|
116
|
+
class: "iconfont icon-danchuangguanbi text-[10px]"
|
|
117
|
+
}, null, 8, te)
|
|
118
|
+
]),
|
|
119
|
+
_: 2
|
|
120
|
+
}, 1024)
|
|
121
|
+
], 40, ee))), 128))
|
|
122
|
+
])
|
|
123
|
+
]),
|
|
124
|
+
a("section", oe, [
|
|
125
|
+
a("span", le, x(o.label2), 1),
|
|
126
|
+
a("ul", ne, [
|
|
127
|
+
(f(!0), g(B, null, U(r.value, (c, p) => (f(), g("li", {
|
|
128
|
+
class: "mr-[10px] mb-[5px]",
|
|
129
|
+
key: c.key
|
|
130
|
+
}, [
|
|
131
|
+
_(v, {
|
|
132
|
+
modelValue: c.show,
|
|
133
|
+
"onUpdate:modelValue": (b) => c.show = b,
|
|
134
|
+
onChange: (b) => T(Number(p), b)
|
|
135
|
+
}, {
|
|
136
|
+
default: i(() => [
|
|
137
|
+
h(x(c.label), 1)
|
|
138
|
+
]),
|
|
139
|
+
_: 2
|
|
140
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])
|
|
141
|
+
]))), 128))
|
|
142
|
+
])
|
|
143
|
+
])
|
|
144
|
+
])
|
|
145
|
+
]),
|
|
146
|
+
_: 3
|
|
147
|
+
}, 8, ["model-value", "title"]);
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
export {
|
|
152
|
+
re as _
|
|
153
|
+
};
|