@dazhicheng/ui 1.5.262 → 1.5.263
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
- package/dist/components/tt-form/src/hooks/useSelectCollapse.js +82 -64
- package/dist/components/tt-icon/index.vue.js +2 -2
- package/dist/components/tt-loading/src/loading.vue.js +2 -2
- package/dist/components/tt-panel-select/src/components/PanelLeft.vue.js +29 -23
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +89 -81
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.js +49 -43
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +56 -49
- package/dist/components/tt-panel-select/src/hooks/usePanelSelection.d.ts +3 -0
- package/dist/components/tt-panel-select/src/hooks/usePanelSelection.js +94 -61
- package/dist/components/tt-panel-select/src/index.vue.js +204 -190
- package/dist/components/tt-select/src/Select.vue.d.ts +4 -4
- package/dist/components/tt-select/src/components/Table.vue.d.ts +4 -4
- package/dist/components/tt-table/index.d.ts +12 -12
- package/dist/components/tt-table/src/Table.vue.d.ts +4 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TtArea.vue3.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-116cb5cb"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import r from "./DrawerHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ o(r, [["__scopeId", "data-v-6cdf82e0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,90 +1,108 @@
|
|
|
1
1
|
import "axios";
|
|
2
|
-
import "element-plus";
|
|
3
|
-
import { isString as
|
|
4
|
-
import { ref as
|
|
5
|
-
import
|
|
2
|
+
import { MINIMUM_INPUT_WIDTH as N } from "element-plus";
|
|
3
|
+
import { isString as V } from "../../../../packages/utils/src/is.js";
|
|
4
|
+
import { ref as z, shallowRef as K, computed as d, toValue as O, onScopeDispose as X, watch as H, nextTick as j } from "vue";
|
|
5
|
+
import "xe-utils";
|
|
6
|
+
import "dayjs";
|
|
7
|
+
import "dayjs/plugin/utc";
|
|
8
|
+
import "dayjs/plugin/timezone";
|
|
6
9
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
7
10
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
8
11
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
9
12
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
10
13
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
11
14
|
import "lodash-es";
|
|
12
|
-
import { useResizeObserver as
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
import { useResizeObserver as J } from "@vueuse/core";
|
|
16
|
+
const Q = 6, Y = 40, Z = 20, P = 1;
|
|
17
|
+
let u;
|
|
18
|
+
function W(l, c) {
|
|
19
|
+
return u === void 0 && (u = document.createElement("canvas").getContext("2d")), u ? (u.font = c, u.measureText(l).width) : 0;
|
|
20
|
+
}
|
|
21
|
+
function ee(l) {
|
|
22
|
+
return `${l.fontStyle} ${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;
|
|
23
|
+
}
|
|
24
|
+
function q(l) {
|
|
25
|
+
return l ? l.getBoundingClientRect().width : 0;
|
|
26
|
+
}
|
|
27
|
+
function I(l, c) {
|
|
28
|
+
const i = q(l) - q(l == null ? void 0 : l.querySelector(".el-select__tags-text"));
|
|
29
|
+
return i > 0 ? i : c;
|
|
30
|
+
}
|
|
31
|
+
function Te(l) {
|
|
32
|
+
const c = z(1), i = K(null), S = ["ElSelect", "ElSelectV2", "TtPanelSelect"], T = () => l.value.component, f = () => O(l.value.componentProps), v = () => l.value.selectWrapRef, M = () => l.value.selectRef, _ = d(() => {
|
|
33
|
+
const e = T();
|
|
34
|
+
return V(e) && S.includes(e);
|
|
35
|
+
}), h = d(() => {
|
|
36
|
+
var o;
|
|
37
|
+
const e = T(), t = f();
|
|
38
|
+
return e === "TtApiComponent" && S.includes((o = t == null ? void 0 : t.component) == null ? void 0 : o.name);
|
|
39
|
+
}), $ = d(() => {
|
|
40
|
+
const e = f();
|
|
41
|
+
if (_.value || h.value) {
|
|
24
42
|
const t = {
|
|
25
43
|
clearable: (e == null ? void 0 : e.clearable) ?? !0,
|
|
26
44
|
filterable: (e == null ? void 0 : e.filterable) ?? !0
|
|
27
45
|
};
|
|
28
|
-
return e != null && e.multiple && (t.collapseTagsTooltip = !0, t.collapseTags = !0, t.maxCollapseTags =
|
|
46
|
+
return e != null && e.multiple && (t.collapseTagsTooltip = !0, t.collapseTags = !0, t.maxCollapseTags = c.value, (e == null ? void 0 : e.placeholder) === void 0 && (t.placeholder = "支持多选")), t;
|
|
29
47
|
}
|
|
30
48
|
return {};
|
|
31
49
|
});
|
|
32
|
-
function
|
|
33
|
-
var t,
|
|
34
|
-
const e =
|
|
35
|
-
if (
|
|
36
|
-
return (
|
|
37
|
-
if (
|
|
38
|
-
return (
|
|
50
|
+
function C() {
|
|
51
|
+
var t, o, r, s;
|
|
52
|
+
const e = M();
|
|
53
|
+
if (h.value)
|
|
54
|
+
return (r = (o = (t = e.value) == null ? void 0 : t.getComponentRef) == null ? void 0 : o.call(t)) == null ? void 0 : r.selectedLabel;
|
|
55
|
+
if (_.value)
|
|
56
|
+
return (s = e.value) == null ? void 0 : s.selectedLabel;
|
|
39
57
|
}
|
|
40
|
-
function
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
58
|
+
function G(e, t) {
|
|
59
|
+
var E, L;
|
|
60
|
+
const o = window.getComputedStyle(t), r = Number.parseFloat(o.columnGap || o.gap) || Q, s = Array.from(t.querySelectorAll(".el-select__selected-item > .el-tag")).filter(
|
|
61
|
+
(n) => !n.classList.contains("in-tooltip")
|
|
62
|
+
), b = s.find((n) => n.querySelector(".el-tag__close")), x = s.find((n) => !n.querySelector(".el-tag__close")), R = (E = b ?? x) == null ? void 0 : E.querySelector(".el-select__tags-text"), y = ee(R ? window.getComputedStyle(R) : o), k = I(b, Y), B = I(x, Z), F = !!((L = t.closest(".el-select__wrapper")) != null && L.classList.contains("is-filterable")) ? r + N : 0, w = t.clientWidth - P, p = e.length;
|
|
63
|
+
let m = 0, g = 0;
|
|
64
|
+
for (let n = 0; n < p; n++) {
|
|
65
|
+
if (m += (n > 0 ? r : 0) + k + W(e[n] ?? "", y), n === p - 1 && m + F <= w) {
|
|
66
|
+
g = p;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
const D = r + B + W(` + ${p - n - 1}`, y);
|
|
70
|
+
if (m + D + F > w)
|
|
71
|
+
break;
|
|
72
|
+
g = n + 1;
|
|
50
73
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const t =
|
|
56
|
-
if (!t) {
|
|
57
|
-
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
const l = t.querySelector(".el-select__selection");
|
|
61
|
-
if (!l) {
|
|
62
|
-
o.value = 1;
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
const n = window.getComputedStyle(l), i = n.fontFamily, W = n.fontSize, g = l.clientWidth - 48;
|
|
66
|
-
if (g <= 0) {
|
|
67
|
-
o.value = 1;
|
|
74
|
+
return Math.max(1, g);
|
|
75
|
+
}
|
|
76
|
+
function U() {
|
|
77
|
+
var o, r;
|
|
78
|
+
const e = C(), t = ((o = v().value) == null ? void 0 : o.querySelector(".el-select__selection")) ?? null;
|
|
79
|
+
if (i.value = t, !((r = f()) != null && r.multiple) || !Array.isArray(e) || !e.length || !t) {
|
|
80
|
+
c.value = 1;
|
|
68
81
|
return;
|
|
69
82
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
83
|
+
c.value = G(
|
|
84
|
+
e.map((s) => String(s ?? "")),
|
|
85
|
+
t
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
let a = null;
|
|
89
|
+
function A() {
|
|
90
|
+
a === null && (a = requestAnimationFrame(() => {
|
|
91
|
+
a = null, U();
|
|
92
|
+
}));
|
|
75
93
|
}
|
|
76
|
-
return
|
|
77
|
-
|
|
94
|
+
return X(() => {
|
|
95
|
+
a !== null && cancelAnimationFrame(a);
|
|
96
|
+
}), H(
|
|
97
|
+
C,
|
|
78
98
|
async () => {
|
|
79
|
-
await
|
|
99
|
+
await j(), A();
|
|
80
100
|
},
|
|
81
101
|
{ flush: "post", deep: !0 }
|
|
82
|
-
),
|
|
83
|
-
|
|
84
|
-
}), {
|
|
85
|
-
selectComponentProps: R
|
|
102
|
+
), J([v(), i], () => A()), {
|
|
103
|
+
selectComponentProps: $
|
|
86
104
|
};
|
|
87
105
|
}
|
|
88
106
|
export {
|
|
89
|
-
|
|
107
|
+
Te as useSelectCollapseOptions
|
|
90
108
|
};
|
|
@@ -2,7 +2,7 @@ import o from "./index.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d731bb93"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./loading.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7e6228e4"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Search as
|
|
3
|
-
import { ElInput as
|
|
4
|
-
const x = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as E, computed as k, createElementBlock as y, openBlock as C, normalizeClass as n, createVNode as t, unref as a, withCtx as i } from "vue";
|
|
2
|
+
import { Search as _ } from "@element-plus/icons-vue";
|
|
3
|
+
import { ElInput as v, ElIcon as b, ElTreeV2 as H } from "element-plus";
|
|
4
|
+
const T = 26, g = 320, x = 60, D = /* @__PURE__ */ E({
|
|
5
5
|
name: "PanelLeft",
|
|
6
6
|
__name: "PanelLeft",
|
|
7
7
|
props: {
|
|
@@ -12,45 +12,51 @@ const x = /* @__PURE__ */ i({
|
|
|
12
12
|
leftPlaceholder: {}
|
|
13
13
|
},
|
|
14
14
|
emits: ["update:keyword", "select"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
setup(c, { emit: p }) {
|
|
16
|
+
const u = c, o = p, f = k(() => {
|
|
17
|
+
const e = (r) => r.reduce((h, s) => {
|
|
18
|
+
var d;
|
|
19
|
+
return h + 1 + ((d = s.children) != null && d.length ? e(s.children) : 0);
|
|
20
|
+
}, 0), l = e(u.treeData);
|
|
21
|
+
return l ? Math.min(l * T, g) : x;
|
|
22
|
+
});
|
|
23
|
+
function m(e, l) {
|
|
24
|
+
l.isLeaf && o("select", e);
|
|
19
25
|
}
|
|
20
|
-
return (e, l) => (
|
|
21
|
-
class:
|
|
26
|
+
return (e, l) => (C(), y("div", {
|
|
27
|
+
class: n(`${e.prefixCls}__left`)
|
|
22
28
|
}, [
|
|
23
|
-
a(
|
|
29
|
+
t(a(v), {
|
|
24
30
|
"model-value": e.keyword,
|
|
25
|
-
class:
|
|
31
|
+
class: n(`${e.prefixCls}__search`),
|
|
26
32
|
placeholder: e.leftPlaceholder,
|
|
27
33
|
clearable: "",
|
|
28
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
34
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => o("update:keyword", r))
|
|
29
35
|
}, {
|
|
30
|
-
prefix:
|
|
31
|
-
a(
|
|
32
|
-
default:
|
|
33
|
-
a(
|
|
36
|
+
prefix: i(() => [
|
|
37
|
+
t(a(b), null, {
|
|
38
|
+
default: i(() => [
|
|
39
|
+
t(a(_))
|
|
34
40
|
]),
|
|
35
41
|
_: 1
|
|
36
42
|
})
|
|
37
43
|
]),
|
|
38
44
|
_: 1
|
|
39
45
|
}, 8, ["model-value", "class", "placeholder"]),
|
|
40
|
-
a(
|
|
41
|
-
class:
|
|
46
|
+
t(a(H), {
|
|
47
|
+
class: n(`${e.prefixCls}__tree`),
|
|
42
48
|
data: e.treeData,
|
|
43
49
|
props: { label: "label", children: "children", disabled: "disabled", value: "value" },
|
|
44
|
-
height:
|
|
50
|
+
height: f.value,
|
|
45
51
|
"node-key": "value",
|
|
46
52
|
"default-expanded-keys": e.expandedKeys,
|
|
47
53
|
"highlight-current": "",
|
|
48
54
|
"empty-text": "暂无数据",
|
|
49
|
-
onNodeClick:
|
|
50
|
-
}, null, 8, ["class", "data", "default-expanded-keys"])
|
|
55
|
+
onNodeClick: m
|
|
56
|
+
}, null, 8, ["class", "data", "height", "default-expanded-keys"])
|
|
51
57
|
], 2));
|
|
52
58
|
}
|
|
53
59
|
});
|
|
54
60
|
export {
|
|
55
|
-
|
|
61
|
+
D as default
|
|
56
62
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { TtButton as
|
|
1
|
+
import { defineComponent as ue, useTemplateRef as de, ref as v, computed as p, watch as I, nextTick as L, createElementBlock as d, openBlock as s, normalizeClass as n, createElementVNode as y, createCommentVNode as O, createVNode as c, createBlock as M, unref as i, withCtx as u, createTextVNode as $, normalizeStyle as A, Fragment as V, renderList as H, toDisplayString as P } from "vue";
|
|
2
|
+
import { TtButton as pe } from "../../../tt-button/index.js";
|
|
3
3
|
import { TtText as _ } from "../../../tt-text/index.js";
|
|
4
|
-
import { Search as
|
|
5
|
-
import {
|
|
6
|
-
|
|
4
|
+
import { Search as ce } from "@element-plus/icons-vue";
|
|
5
|
+
import { useResizeObserver as fe } from "@vueuse/core";
|
|
6
|
+
import { ElInput as ve, ElIcon as he, ElCheckbox as F, ElScrollbar as me } from "element-plus";
|
|
7
|
+
const ge = ["data-virtual-index", "data-flash-seed"], Y = 2, _e = /* @__PURE__ */ ue({
|
|
7
8
|
name: "PanelMiddle",
|
|
8
9
|
__name: "PanelMiddle",
|
|
9
10
|
props: {
|
|
@@ -28,61 +29,68 @@ const he = ["data-virtual-index", "data-flash-seed"], O = 8, Ce = /* @__PURE__ *
|
|
|
28
29
|
},
|
|
29
30
|
emits: ["update:keyword", "checkAll", "allCheck", "groupCheck", "optionCheck", "optionsCheck"],
|
|
30
31
|
setup(W, { expose: j, emit: J }) {
|
|
31
|
-
const l = W,
|
|
32
|
-
let
|
|
33
|
-
const X =
|
|
32
|
+
const l = W, f = J, m = de("scrollbarRef"), G = v(), Q = v(), S = v(0), q = v(0), g = v(""), k = v(), D = v(0), R = v(!1);
|
|
33
|
+
let T;
|
|
34
|
+
const X = p(() => l.rows.length * l.rowHeight), Z = p(() => Math.max(1, Math.ceil(q.value / l.rowHeight))), w = p(() => Math.max(0, Math.floor(S.value / l.rowHeight) - Y)), ee = p(() => Math.min(l.rows.length, w.value + Z.value + Y * 2)), le = p(() => w.value * l.rowHeight), ae = p(() => l.rows.slice(w.value, ee.value)), oe = p(() => {
|
|
34
35
|
var e;
|
|
35
36
|
return ((e = l.rows[0]) == null ? void 0 : e.type) === "group";
|
|
36
|
-
}), te =
|
|
37
|
+
}), te = p(() => new Set(l.selectedValues)), re = p(
|
|
37
38
|
() => l.rows.filter((e) => e.type === "options").flatMap((e) => e.options).filter((e) => !e.disabled)
|
|
38
39
|
);
|
|
39
|
-
|
|
40
|
+
I(
|
|
40
41
|
() => l.keyword,
|
|
41
42
|
(e) => {
|
|
42
|
-
|
|
43
|
+
g.value = e;
|
|
43
44
|
},
|
|
44
45
|
{ immediate: !0 }
|
|
45
46
|
);
|
|
46
|
-
function
|
|
47
|
+
function x() {
|
|
47
48
|
var a;
|
|
48
|
-
const e = (a =
|
|
49
|
-
e && (Q.value = e,
|
|
49
|
+
const e = (a = m.value) == null ? void 0 : a.wrapRef;
|
|
50
|
+
e && (Q.value = e, q.value = e.clientHeight, S.value = e.scrollTop);
|
|
50
51
|
}
|
|
52
|
+
fe(
|
|
53
|
+
() => {
|
|
54
|
+
var e;
|
|
55
|
+
return (e = m.value) == null ? void 0 : e.wrapRef;
|
|
56
|
+
},
|
|
57
|
+
() => x()
|
|
58
|
+
);
|
|
51
59
|
function E() {
|
|
52
60
|
var a;
|
|
53
|
-
const e = (a =
|
|
61
|
+
const e = (a = m.value) == null ? void 0 : a.wrapRef;
|
|
54
62
|
e && (S.value = e.scrollTop);
|
|
55
63
|
}
|
|
56
|
-
function
|
|
57
|
-
k.value = void 0,
|
|
58
|
-
k.value = e,
|
|
64
|
+
function se(e) {
|
|
65
|
+
k.value = void 0, D.value += 1, requestAnimationFrame(() => {
|
|
66
|
+
k.value = e, T && clearTimeout(T), T = setTimeout(() => {
|
|
59
67
|
k.value = void 0;
|
|
60
68
|
}, 1400);
|
|
61
69
|
});
|
|
62
70
|
}
|
|
63
71
|
async function N(e) {
|
|
64
72
|
var h;
|
|
65
|
-
await L(),
|
|
73
|
+
await L(), x();
|
|
66
74
|
const a = l.rows.findIndex((t) => t.type === "group" && t.group.value === e);
|
|
67
75
|
if (a < 0) return;
|
|
68
76
|
const o = a * l.rowHeight;
|
|
69
|
-
(h =
|
|
70
|
-
E(),
|
|
77
|
+
(h = m.value) == null || h.setScrollTop(o), requestAnimationFrame(() => {
|
|
78
|
+
E(), se(e);
|
|
71
79
|
});
|
|
72
80
|
}
|
|
73
|
-
function
|
|
74
|
-
var
|
|
81
|
+
function ne(e) {
|
|
82
|
+
var K;
|
|
75
83
|
if (l.disabled)
|
|
76
84
|
return;
|
|
77
85
|
e.preventDefault();
|
|
78
|
-
const a = ((
|
|
79
|
-
|
|
80
|
-
|
|
86
|
+
const a = ((K = e.clipboardData) == null ? void 0 : K.getData("text")) || "";
|
|
87
|
+
g.value = a.trim(), l.pasteSearch ? f("update:keyword", g.value) : (R.value = !0, requestAnimationFrame(() => {
|
|
88
|
+
R.value = !1;
|
|
81
89
|
}));
|
|
82
90
|
const h = (l.separator || ",").replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), t = new RegExp(`${h}|\\r?\\n|\\t`, "g"), C = a.split(t).map((r) => r.trim()).filter(Boolean), b = () => {
|
|
83
91
|
requestAnimationFrame(() => {
|
|
84
|
-
var
|
|
85
|
-
const r = (
|
|
92
|
+
var U;
|
|
93
|
+
const r = (U = G.value) == null ? void 0 : U.input;
|
|
86
94
|
r == null || r.focus(), r == null || r.select();
|
|
87
95
|
});
|
|
88
96
|
};
|
|
@@ -90,30 +98,30 @@ const he = ["data-virtual-index", "data-flash-seed"], O = 8, Ce = /* @__PURE__ *
|
|
|
90
98
|
b();
|
|
91
99
|
return;
|
|
92
100
|
}
|
|
93
|
-
const
|
|
94
|
-
if (!
|
|
101
|
+
const z = new Set(C), B = re.value.filter((r) => z.has(r.label) || z.has(String(r.value))).map((r) => r.value);
|
|
102
|
+
if (!B.length) {
|
|
95
103
|
b();
|
|
96
104
|
return;
|
|
97
105
|
}
|
|
98
106
|
if (l.multiple) {
|
|
99
|
-
|
|
107
|
+
f("optionsCheck", B, !0), b();
|
|
100
108
|
return;
|
|
101
109
|
}
|
|
102
|
-
|
|
110
|
+
f("optionCheck", B.at(-1), !0), b();
|
|
103
111
|
}
|
|
104
|
-
function
|
|
105
|
-
|
|
112
|
+
function ie(e) {
|
|
113
|
+
g.value = e, !R.value && f("update:keyword", e);
|
|
106
114
|
}
|
|
107
|
-
return
|
|
115
|
+
return I(
|
|
108
116
|
() => l.scrollToGroupValue,
|
|
109
117
|
async (e) => {
|
|
110
118
|
e !== void 0 && await N(e);
|
|
111
119
|
},
|
|
112
120
|
{ flush: "post" }
|
|
113
|
-
),
|
|
121
|
+
), I(
|
|
114
122
|
() => l.rows.length,
|
|
115
123
|
async () => {
|
|
116
|
-
await L(),
|
|
124
|
+
await L(), x();
|
|
117
125
|
},
|
|
118
126
|
{ immediate: !0 }
|
|
119
127
|
), j({
|
|
@@ -121,52 +129,52 @@ const he = ["data-virtual-index", "data-flash-seed"], O = 8, Ce = /* @__PURE__ *
|
|
|
121
129
|
}), (e, a) => (s(), d("div", {
|
|
122
130
|
class: n(`${e.prefixCls}__list`)
|
|
123
131
|
}, [
|
|
124
|
-
|
|
132
|
+
y("div", {
|
|
125
133
|
class: n(`${e.prefixCls}__toolbar`)
|
|
126
134
|
}, [
|
|
127
|
-
|
|
135
|
+
c(i(ve), {
|
|
128
136
|
ref_key: "searchInputRef",
|
|
129
|
-
ref:
|
|
130
|
-
"model-value":
|
|
137
|
+
ref: G,
|
|
138
|
+
"model-value": g.value,
|
|
131
139
|
class: n(`${e.prefixCls}__search`),
|
|
132
140
|
placeholder: l.middlePlaceholder,
|
|
133
141
|
clearable: "",
|
|
134
|
-
"onUpdate:modelValue":
|
|
135
|
-
onPaste:
|
|
142
|
+
"onUpdate:modelValue": ie,
|
|
143
|
+
onPaste: ne
|
|
136
144
|
}, {
|
|
137
145
|
prefix: u(() => [
|
|
138
|
-
|
|
146
|
+
c(i(he), null, {
|
|
139
147
|
default: u(() => [
|
|
140
|
-
|
|
148
|
+
c(i(ce))
|
|
141
149
|
]),
|
|
142
150
|
_: 1
|
|
143
151
|
})
|
|
144
152
|
]),
|
|
145
153
|
_: 1
|
|
146
154
|
}, 8, ["model-value", "class", "placeholder"]),
|
|
147
|
-
e.multiple ? (s(),
|
|
155
|
+
e.multiple ? (s(), M(i(pe), {
|
|
148
156
|
key: 0,
|
|
149
157
|
disabled: e.disabled,
|
|
150
158
|
plain: "",
|
|
151
|
-
onClick: a[0] || (a[0] = () =>
|
|
159
|
+
onClick: a[0] || (a[0] = () => f("checkAll", !0))
|
|
152
160
|
}, {
|
|
153
161
|
default: u(() => [...a[2] || (a[2] = [
|
|
154
|
-
|
|
162
|
+
y("span", null, "全选", -1)
|
|
155
163
|
])]),
|
|
156
164
|
_: 1
|
|
157
|
-
}, 8, ["disabled"])) :
|
|
165
|
+
}, 8, ["disabled"])) : O("", !0)
|
|
158
166
|
], 2),
|
|
159
167
|
l.showAll ? (s(), d("div", {
|
|
160
168
|
key: 0,
|
|
161
169
|
class: n([`${e.prefixCls}__panel-head`, oe.value ? "is-standalone" : ""])
|
|
162
170
|
}, [
|
|
163
|
-
|
|
171
|
+
c(i(F), {
|
|
164
172
|
disabled: e.disabled,
|
|
165
173
|
"model-value": l.allChecked,
|
|
166
|
-
onChange: a[1] || (a[1] = (o) =>
|
|
174
|
+
onChange: a[1] || (a[1] = (o) => f("allCheck", !!o))
|
|
167
175
|
}, {
|
|
168
176
|
default: u(() => [
|
|
169
|
-
|
|
177
|
+
c(i(_), null, {
|
|
170
178
|
default: u(() => [...a[3] || (a[3] = [
|
|
171
179
|
$("全部", -1)
|
|
172
180
|
])]),
|
|
@@ -175,60 +183,60 @@ const he = ["data-virtual-index", "data-flash-seed"], O = 8, Ce = /* @__PURE__ *
|
|
|
175
183
|
]),
|
|
176
184
|
_: 1
|
|
177
185
|
}, 8, ["disabled", "model-value"])
|
|
178
|
-
], 2)) :
|
|
179
|
-
|
|
186
|
+
], 2)) : O("", !0),
|
|
187
|
+
y("div", {
|
|
180
188
|
class: n(`${e.prefixCls}__checkbox-group`)
|
|
181
189
|
}, [
|
|
182
|
-
|
|
190
|
+
c(i(me), {
|
|
183
191
|
ref_key: "scrollbarRef",
|
|
184
|
-
ref:
|
|
192
|
+
ref: m,
|
|
185
193
|
class: n(`${e.prefixCls}__middle-scrollbar`),
|
|
186
194
|
onScroll: E
|
|
187
195
|
}, {
|
|
188
196
|
default: u(() => [
|
|
189
|
-
|
|
197
|
+
y("div", {
|
|
190
198
|
class: n(`${e.prefixCls}__middle-virtual-host`),
|
|
191
|
-
style:
|
|
199
|
+
style: A({ height: `${X.value}px` })
|
|
192
200
|
}, [
|
|
193
|
-
|
|
194
|
-
style:
|
|
201
|
+
y("div", {
|
|
202
|
+
style: A({ transform: `translateY(${le.value}px)` })
|
|
195
203
|
}, [
|
|
196
|
-
(s(!0), d(
|
|
204
|
+
(s(!0), d(V, null, H(ae.value, (o, h) => (s(), d("div", {
|
|
197
205
|
key: o.key,
|
|
198
|
-
style:
|
|
206
|
+
style: A({ height: `${e.rowHeight}px` }),
|
|
199
207
|
class: n([
|
|
200
208
|
`${e.prefixCls}__middle-row`,
|
|
201
209
|
o.type === "group" ? `${e.prefixCls}__middle-group` : `${e.prefixCls}__middle-options`,
|
|
202
210
|
o.type === "options" && o.isLast ? "is-last" : "",
|
|
203
|
-
o.type === "options" &&
|
|
211
|
+
o.type === "options" && w.value + h === 0 && !l.showAll ? "is-first" : "",
|
|
204
212
|
k.value === o.group.value ? `${e.prefixCls}__group-flash` : ""
|
|
205
213
|
]),
|
|
206
|
-
"data-virtual-index":
|
|
207
|
-
"data-flash-seed":
|
|
214
|
+
"data-virtual-index": w.value + h,
|
|
215
|
+
"data-flash-seed": D.value
|
|
208
216
|
}, [
|
|
209
217
|
o.type === "group" ? (s(), d("div", {
|
|
210
218
|
key: 0,
|
|
211
219
|
class: n(`${e.prefixCls}__panel-head`)
|
|
212
220
|
}, [
|
|
213
|
-
l.multiple ? (s(),
|
|
221
|
+
l.multiple ? (s(), M(i(F), {
|
|
214
222
|
key: 0,
|
|
215
223
|
"model-value": e.groupCheckedMap[String(o.group.value)],
|
|
216
224
|
indeterminate: e.groupIndeterminateMap[String(o.group.value)],
|
|
217
225
|
disabled: e.disabled,
|
|
218
|
-
onChange: (t) =>
|
|
226
|
+
onChange: (t) => f("groupCheck", o.group.value, !!t)
|
|
219
227
|
}, {
|
|
220
228
|
default: u(() => [
|
|
221
|
-
|
|
229
|
+
c(i(_), null, {
|
|
222
230
|
default: u(() => [
|
|
223
|
-
$(
|
|
231
|
+
$(P(o.group.label), 1)
|
|
224
232
|
]),
|
|
225
233
|
_: 2
|
|
226
234
|
}, 1024)
|
|
227
235
|
]),
|
|
228
236
|
_: 2
|
|
229
|
-
}, 1032, ["model-value", "indeterminate", "disabled", "onChange"])) : (s(),
|
|
237
|
+
}, 1032, ["model-value", "indeterminate", "disabled", "onChange"])) : (s(), M(i(_), { key: 1 }, {
|
|
230
238
|
default: u(() => [
|
|
231
|
-
$(
|
|
239
|
+
$(P(o.group.label), 1)
|
|
232
240
|
]),
|
|
233
241
|
_: 2
|
|
234
242
|
}, 1024))
|
|
@@ -236,20 +244,20 @@ const he = ["data-virtual-index", "data-flash-seed"], O = 8, Ce = /* @__PURE__ *
|
|
|
236
244
|
key: 1,
|
|
237
245
|
class: n(`${e.prefixCls}__option-row`)
|
|
238
246
|
}, [
|
|
239
|
-
(s(!0), d(
|
|
247
|
+
(s(!0), d(V, null, H(o.options, (t) => (s(), d("div", {
|
|
240
248
|
key: t.value,
|
|
241
249
|
class: n(`${e.prefixCls}__option-cell`)
|
|
242
250
|
}, [
|
|
243
|
-
|
|
244
|
-
"model-value":
|
|
245
|
-
disabled: e.disabled
|
|
251
|
+
c(i(F), {
|
|
252
|
+
"model-value": te.value.has(t.value),
|
|
253
|
+
disabled: e.disabled || t.disabled,
|
|
246
254
|
class: n(`${e.prefixCls}__option`),
|
|
247
|
-
onChange: (C) =>
|
|
255
|
+
onChange: (C) => f("optionCheck", t.value, !!C)
|
|
248
256
|
}, {
|
|
249
257
|
default: u(() => [
|
|
250
|
-
|
|
258
|
+
c(i(_), { "tool-tip-line": 2 }, {
|
|
251
259
|
default: u(() => [
|
|
252
|
-
$(
|
|
260
|
+
$(P(t.label), 1)
|
|
253
261
|
]),
|
|
254
262
|
_: 2
|
|
255
263
|
}, 1024)
|
|
@@ -257,12 +265,12 @@ const he = ["data-virtual-index", "data-flash-seed"], O = 8, Ce = /* @__PURE__ *
|
|
|
257
265
|
_: 2
|
|
258
266
|
}, 1032, ["model-value", "disabled", "class", "onChange"])
|
|
259
267
|
], 2))), 128)),
|
|
260
|
-
(s(!0), d(
|
|
268
|
+
(s(!0), d(V, null, H(e.optionPerRow - o.options.length, (t) => (s(), d("div", {
|
|
261
269
|
key: `empty-${o.key}-${t}`,
|
|
262
270
|
class: n(`${e.prefixCls}__option-cell`)
|
|
263
271
|
}, null, 2))), 128))
|
|
264
272
|
], 2))
|
|
265
|
-
], 14,
|
|
273
|
+
], 14, ge))), 128))
|
|
266
274
|
], 4)
|
|
267
275
|
], 6)
|
|
268
276
|
]),
|
|
@@ -273,5 +281,5 @@ const he = ["data-virtual-index", "data-flash-seed"], O = 8, Ce = /* @__PURE__ *
|
|
|
273
281
|
}
|
|
274
282
|
});
|
|
275
283
|
export {
|
|
276
|
-
|
|
284
|
+
_e as default
|
|
277
285
|
};
|