@dazhicheng/ui 1.6.55 → 1.6.57
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/assets/svg/download.svg.js +1 -1
- package/dist/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-button/index.d.ts +28 -28
- package/dist/components/tt-button/index.vue.d.ts +16 -16
- package/dist/components/tt-custom-export-modal/src/assets/search.svg.js +5 -5
- package/dist/components/tt-custom-export-modal/src/assets/star.svg.js +3 -3
- package/dist/components/tt-custom-export-modal/src/assets/trash.svg.js +7 -7
- package/dist/components/tt-custom-export-modal/src/components/FieldGridSection.vue.js +1 -1
- package/dist/components/tt-drawer/index.d.ts +109 -109
- package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +60 -60
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
- package/dist/components/tt-empty/index.d.ts +4 -4
- package/dist/components/tt-form/src/components/FormElInput.vue.d.ts +10 -10
- package/dist/components/tt-icon/index.vue.js +2 -2
- package/dist/components/tt-image/index.d.ts +29 -29
- package/dist/components/tt-image/src/components/ImageViewer.d.ts +20 -20
- package/dist/components/tt-image/tt-image.d.ts +29 -29
- package/dist/components/tt-input-textarea/index.vue.d.ts +40 -40
- package/dist/components/tt-loading/src/loading.vue.js +2 -2
- package/dist/components/tt-modal/index.d.ts +150 -150
- package/dist/components/tt-modal/src/RenderModal.vue.d.ts +42 -42
- package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +17 -17
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +7 -5
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +120 -114
- package/dist/components/tt-panel-select/src/index.vue.d.ts +9 -5
- package/dist/components/tt-panel-select/src/index.vue.js +275 -229
- package/dist/components/tt-panel-select/src/types.d.ts +4 -0
- package/dist/components/tt-upload/index.d.ts +60 -60
- package/dist/components/tt-upload/src/TtUpload.vue.d.ts +37 -37
- package/dist/components/tt-upload/src/typing.d.ts +17 -17
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as tl, mergeModels as ee, useModel as al, computed as i, watch as N, ref as w, useTemplateRef as L, unref as s, onMounted as ol, createElementBlock as le, openBlock as A, normalizeClass as te, createVNode as ae, mergeProps as nl, withCtx as rl, withDirectives as il, normalizeStyle as sl, createBlock as oe, createCommentVNode as ne, nextTick as P } from "vue";
|
|
2
2
|
import "../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.34_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
|
|
3
|
-
import { useDesign as
|
|
3
|
+
import { useDesign as ul } from "../../../packages/hooks/src/useDesign.js";
|
|
4
4
|
import "axios";
|
|
5
|
-
import { ElSelect as
|
|
5
|
+
import { ElSelect as cl, vLoading as dl } from "element-plus";
|
|
6
|
+
import { isString as pl } from "../../../packages/utils/src/is.js";
|
|
6
7
|
import "dayjs";
|
|
7
8
|
import "numeral";
|
|
8
9
|
import "xe-utils";
|
|
@@ -15,19 +16,20 @@ import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-
|
|
|
15
16
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
16
17
|
import "lodash-es";
|
|
17
18
|
import "vue-router";
|
|
18
|
-
import { useResizeObserver as
|
|
19
|
-
import { useSelectCollapseOptions as
|
|
20
|
-
import { ALL as
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import { usePanelSelectData as
|
|
25
|
-
import { usePanelSelectSelection as
|
|
19
|
+
import { useResizeObserver as fl } from "@vueuse/core";
|
|
20
|
+
import { useSelectCollapseOptions as ml } from "../../tt-form/src/hooks/useSelectCollapse.js";
|
|
21
|
+
import { splitPanelSelectText as R, ALL as hl, DEFAULT_PANEL_SELECT_SEPARATORS as vl } from "./common.js";
|
|
22
|
+
import wl from "./components/PanelLeft.vue.js";
|
|
23
|
+
import yl from "./components/PanelMiddle.vue.js";
|
|
24
|
+
import gl from "./components/PanelRight.vue.js";
|
|
25
|
+
import { usePanelSelectData as Cl } from "./hooks/usePanelData.js";
|
|
26
|
+
import { usePanelSelectSelection as kl } from "./hooks/usePanelSelection.js";
|
|
26
27
|
/* empty css */
|
|
27
|
-
const
|
|
28
|
+
const h = 4, Jl = /* @__PURE__ */ tl({
|
|
28
29
|
name: "TtPanelSelect",
|
|
29
30
|
__name: "index",
|
|
30
|
-
props: /* @__PURE__ */
|
|
31
|
+
props: /* @__PURE__ */ ee({
|
|
32
|
+
allowCreate: { type: Boolean, default: !1 },
|
|
31
33
|
disabled: { type: Boolean, default: !1 },
|
|
32
34
|
showNav: { type: Boolean, default: !0 },
|
|
33
35
|
multiple: { type: Boolean, default: !0 },
|
|
@@ -48,11 +50,11 @@ const m = 4, Wl = /* @__PURE__ */ qe({
|
|
|
48
50
|
immediate: { type: Boolean, default: !0 },
|
|
49
51
|
beforeFetch: { type: Function, default: void 0 },
|
|
50
52
|
afterFetch: { type: Function, default: void 0 },
|
|
51
|
-
separator: { default: () => [...
|
|
53
|
+
separator: { default: () => [...vl] },
|
|
52
54
|
pasteSearch: { type: Boolean, default: !0 },
|
|
53
55
|
alwaysLoad: { type: Boolean, default: !1 },
|
|
54
56
|
showAll: { type: Boolean, default: !0 },
|
|
55
|
-
showAllField: { default:
|
|
57
|
+
showAllField: { default: hl },
|
|
56
58
|
showPinyinMode: { type: Boolean, default: !1 },
|
|
57
59
|
showOriginMode: { type: Boolean, default: !0 },
|
|
58
60
|
leftPlaceholder: { default: "支持模糊搜索" },
|
|
@@ -62,56 +64,64 @@ const m = 4, Wl = /* @__PURE__ */ qe({
|
|
|
62
64
|
modelValue: {},
|
|
63
65
|
modelModifiers: {}
|
|
64
66
|
}),
|
|
65
|
-
emits: /* @__PURE__ */
|
|
66
|
-
setup(
|
|
67
|
-
const
|
|
68
|
-
loading:
|
|
69
|
-
fetchApi:
|
|
70
|
-
treeOptions:
|
|
71
|
-
navTreeOptions:
|
|
72
|
-
navNodes:
|
|
73
|
-
leafNodes:
|
|
74
|
-
isFirstLoaded:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
67
|
+
emits: /* @__PURE__ */ ee(["visible-change", "change", "focus"], ["update:modelValue"]),
|
|
68
|
+
setup(c, { expose: re, emit: ie }) {
|
|
69
|
+
const se = dl, ue = cl, t = c, b = ie, { prefixCls: f } = ul("panel-select"), {
|
|
70
|
+
loading: B,
|
|
71
|
+
fetchApi: v,
|
|
72
|
+
treeOptions: ce,
|
|
73
|
+
navTreeOptions: T,
|
|
74
|
+
navNodes: de,
|
|
75
|
+
leafNodes: m,
|
|
76
|
+
isFirstLoaded: G,
|
|
77
|
+
filterNodes: pe,
|
|
78
|
+
buildOptionGroups: _
|
|
79
|
+
} = Cl(t), r = al(c, "modelValue");
|
|
80
|
+
let W;
|
|
81
|
+
const D = i(() => t.disabled), fe = i(() => {
|
|
82
|
+
if (!t.multiple)
|
|
83
|
+
return t.allowCreate ? `${t.placeholder ? t.placeholder : "请选择"}(可创建)` : t.placeholder;
|
|
84
|
+
const e = t.showMultiple ? "支持多选和全选" : "支持多选", l = typeof t.placeholder == "string" && t.placeholder.trim() ? t.placeholder.trim().replace(/[,,]\s*$/, "") : "请选择", a = l.includes("支持多选和全选") || l.includes("支持多选") ? l : `${l},${e}`;
|
|
85
|
+
return t.allowCreate ? `${a}(可创建)` : a;
|
|
86
|
+
}), me = i(() => {
|
|
83
87
|
const e = /* @__PURE__ */ new Map();
|
|
84
|
-
return
|
|
88
|
+
return m.value.forEach((l) => e.set(l.value, l.label)), e;
|
|
85
89
|
});
|
|
86
90
|
function x(e) {
|
|
87
|
-
return e === t.showAllField ? { label: "全部", value: t.showAllField } : { label:
|
|
91
|
+
return e === t.showAllField ? { label: "全部", value: t.showAllField } : { label: me.value.get(e) ?? String(e), value: e };
|
|
88
92
|
}
|
|
89
|
-
function
|
|
93
|
+
function K(e) {
|
|
90
94
|
if (e != null)
|
|
91
95
|
return typeof e == "object" && "value" in e ? e.value : e;
|
|
92
96
|
}
|
|
93
|
-
const
|
|
97
|
+
const U = i({
|
|
94
98
|
get() {
|
|
95
|
-
return Array.isArray(
|
|
99
|
+
return Array.isArray(r.value) ? t.multiple ? r.value : r.value.slice(-1) : r.value === void 0 ? [] : [r.value];
|
|
96
100
|
},
|
|
97
101
|
set(e) {
|
|
98
|
-
|
|
102
|
+
r.value = t.multiple ? [...e] : e.at(-1);
|
|
99
103
|
}
|
|
100
|
-
})
|
|
101
|
-
|
|
104
|
+
}), S = i(() => {
|
|
105
|
+
if (!t.allowCreate) return [];
|
|
106
|
+
const e = new Set(m.value.map((a) => a.value)), l = [];
|
|
107
|
+
return new Set(U.value).forEach((a) => {
|
|
108
|
+
!pl(a) || a === t.showAllField || e.has(a) || l.push({ label: a, value: a, level: 0, path: [], raw: { label: a, value: a } });
|
|
109
|
+
}), l;
|
|
110
|
+
}), V = i(() => [...m.value, ...S.value]);
|
|
111
|
+
N([() => t.multiple, () => r.value], ([e, l]) => {
|
|
102
112
|
if (e) {
|
|
103
|
-
Array.isArray(l) || (
|
|
113
|
+
Array.isArray(l) || (r.value = l === void 0 ? [] : [l]);
|
|
104
114
|
return;
|
|
105
115
|
}
|
|
106
|
-
Array.isArray(l) && (
|
|
116
|
+
Array.isArray(l) && (r.value = l.at(-1));
|
|
107
117
|
});
|
|
108
|
-
const
|
|
109
|
-
function
|
|
118
|
+
const O = w(), y = w(""), d = w(""), M = w(), $ = L("middleRef"), g = L("selectWrapRef"), I = L("selectRef"), E = w(0);
|
|
119
|
+
function z() {
|
|
110
120
|
const e = g.value;
|
|
111
|
-
e && (
|
|
121
|
+
e && (E.value = e.offsetWidth);
|
|
112
122
|
}
|
|
113
|
-
|
|
114
|
-
const
|
|
123
|
+
fl(g, () => z());
|
|
124
|
+
const he = i(() => ({
|
|
115
125
|
componentProps: {
|
|
116
126
|
multiple: t.multiple,
|
|
117
127
|
component: {
|
|
@@ -120,99 +130,133 @@ const m = 4, Wl = /* @__PURE__ */ qe({
|
|
|
120
130
|
},
|
|
121
131
|
component: "TtPanelSelect",
|
|
122
132
|
selectWrapRef: g,
|
|
123
|
-
selectRef:
|
|
124
|
-
})), { selectComponentProps:
|
|
133
|
+
selectRef: I
|
|
134
|
+
})), { selectComponentProps: ve } = ml(he), j = i(() => {
|
|
125
135
|
const e = y.value.trim().toLowerCase();
|
|
126
|
-
if (!e) return
|
|
136
|
+
if (!e) return T.value;
|
|
127
137
|
const l = (a) => {
|
|
128
138
|
const o = [];
|
|
129
|
-
return a.forEach((
|
|
130
|
-
var
|
|
131
|
-
const
|
|
132
|
-
(String(
|
|
139
|
+
return a.forEach((n) => {
|
|
140
|
+
var Z;
|
|
141
|
+
const u = (Z = n.children) != null && Z.length ? l(n.children) : void 0;
|
|
142
|
+
(String(n.label).toLowerCase().includes(e) || u && u.length) && o.push({ ...n, children: u != null && u.length ? u : void 0 });
|
|
133
143
|
}), o;
|
|
134
144
|
};
|
|
135
|
-
return l(
|
|
136
|
-
}),
|
|
145
|
+
return l(T.value);
|
|
146
|
+
}), we = i(() => {
|
|
137
147
|
const e = [], l = (a) => {
|
|
138
148
|
a.forEach((o) => {
|
|
139
|
-
var
|
|
140
|
-
e.push(o.value), (
|
|
149
|
+
var n;
|
|
150
|
+
e.push(o.value), (n = o.children) != null && n.length && l(o.children);
|
|
141
151
|
});
|
|
142
152
|
};
|
|
143
|
-
return l(
|
|
144
|
-
}),
|
|
153
|
+
return l(j.value), e;
|
|
154
|
+
}), C = i(
|
|
155
|
+
() => ge(d.value).map((e) => ({
|
|
156
|
+
label: e,
|
|
157
|
+
value: e,
|
|
158
|
+
level: 0,
|
|
159
|
+
path: [],
|
|
160
|
+
raw: { label: e, value: e }
|
|
161
|
+
}))
|
|
162
|
+
), ye = i(() => [...V.value, ...C.value]), k = i(() => {
|
|
163
|
+
const e = _(m.value, d.value), l = pe([...S.value, ...C.value], d.value);
|
|
164
|
+
if (!l.length) return e;
|
|
165
|
+
const a = new Map(l.map((u) => [u.value, u])), o = [];
|
|
166
|
+
R(d.value, t.separator).forEach((u) => {
|
|
167
|
+
const F = a.get(u);
|
|
168
|
+
F && (o.push(F), a.delete(u));
|
|
169
|
+
}), o.push(...a.values());
|
|
170
|
+
let n = "__created__";
|
|
171
|
+
for (; e.some((u) => u.value === n); ) n += "_";
|
|
172
|
+
return [{ value: n, label: "自定义", options: o }, ...e];
|
|
173
|
+
});
|
|
174
|
+
function ge(e) {
|
|
175
|
+
if (!t.allowCreate || t.disabled || B.value || t.api && !G.value) return [];
|
|
176
|
+
const l = R(e, t.separator);
|
|
177
|
+
if (!l.length || _(m.value, e).length) return [];
|
|
178
|
+
const a = new Set(V.value.map((o) => `${o.value}`));
|
|
179
|
+
return [...new Set(l)].filter((o) => o !== `${t.showAllField}` && !a.has(o));
|
|
180
|
+
}
|
|
181
|
+
function Ce() {
|
|
182
|
+
if (!C.value.length) return;
|
|
183
|
+
const e = new Set([...S.value, ...C.value].map((a) => a.value)), l = [...new Set(R(d.value, t.separator))].filter(
|
|
184
|
+
(a) => e.has(a)
|
|
185
|
+
);
|
|
186
|
+
Y(l, !0);
|
|
187
|
+
}
|
|
188
|
+
const ke = i(() => {
|
|
145
189
|
const e = "minmax(var(--tt-panel-select-middle-width, 450px), 1fr)";
|
|
146
190
|
return t.showNav && !t.multiple ? `200px ${e}` : !t.showNav && t.multiple ? `${e} 180px` : !t.showNav && !t.multiple ? e : `200px ${e} 180px`;
|
|
147
|
-
}),
|
|
191
|
+
}), Ae = i(() => {
|
|
148
192
|
const e = "var(--tt-panel-select-middle-width, 450px)";
|
|
149
193
|
return t.showNav && !t.multiple ? `max(calc(200px + ${e}), 800px)` : !t.showNav && t.multiple ? `max(calc(${e} + 180px), 800px)` : !t.showNav && !t.multiple ? `max(${e}, 800px)` : `max(calc(200px + ${e} + 180px), 800px)`;
|
|
150
|
-
}),
|
|
194
|
+
}), be = i(() => {
|
|
151
195
|
const e = [];
|
|
152
196
|
return k.value.forEach((l) => {
|
|
153
197
|
!(t.showOriginMode && l.value === "__origin__") && e.push({ key: `group-${String(l.value)}`, type: "group", group: l });
|
|
154
|
-
const o = Math.ceil(l.options.length /
|
|
155
|
-
for (let
|
|
156
|
-
const
|
|
198
|
+
const o = Math.ceil(l.options.length / h);
|
|
199
|
+
for (let n = 0; n < l.options.length; n += h) {
|
|
200
|
+
const u = n / h;
|
|
157
201
|
e.push({
|
|
158
|
-
key: `options-${String(l.value)}-${
|
|
202
|
+
key: `options-${String(l.value)}-${n / h}`,
|
|
159
203
|
type: "options",
|
|
160
204
|
group: l,
|
|
161
|
-
options: l.options.slice(
|
|
162
|
-
isLast:
|
|
205
|
+
options: l.options.slice(n, n + h),
|
|
206
|
+
isLast: u === o - 1
|
|
163
207
|
});
|
|
164
208
|
}
|
|
165
209
|
}), e;
|
|
166
210
|
}), {
|
|
167
|
-
selectedOptions:
|
|
168
|
-
selectedValueSet:
|
|
169
|
-
isAllChecked:
|
|
170
|
-
isIndeterminate:
|
|
171
|
-
getGroupCheckCount:
|
|
172
|
-
handleGroupCheck:
|
|
173
|
-
handleAllOptionCheck:
|
|
174
|
-
handleOptionCheck:
|
|
175
|
-
handleOptionsCheck:
|
|
176
|
-
handleCheckAll:
|
|
177
|
-
clearSelected:
|
|
178
|
-
removeSelected:
|
|
179
|
-
withLockedSelectedValues:
|
|
180
|
-
} =
|
|
181
|
-
multiple:
|
|
182
|
-
modelValue:
|
|
183
|
-
selectedValues:
|
|
184
|
-
leafNodes:
|
|
185
|
-
allValue:
|
|
186
|
-
}),
|
|
211
|
+
selectedOptions: xe,
|
|
212
|
+
selectedValueSet: q,
|
|
213
|
+
isAllChecked: Se,
|
|
214
|
+
isIndeterminate: Ve,
|
|
215
|
+
getGroupCheckCount: Oe,
|
|
216
|
+
handleGroupCheck: Me,
|
|
217
|
+
handleAllOptionCheck: $e,
|
|
218
|
+
handleOptionCheck: Ee,
|
|
219
|
+
handleOptionsCheck: Fe,
|
|
220
|
+
handleCheckAll: Ne,
|
|
221
|
+
clearSelected: Le,
|
|
222
|
+
removeSelected: Pe,
|
|
223
|
+
withLockedSelectedValues: Re
|
|
224
|
+
} = kl({
|
|
225
|
+
multiple: i(() => t.multiple),
|
|
226
|
+
modelValue: r,
|
|
227
|
+
selectedValues: U,
|
|
228
|
+
leafNodes: ye,
|
|
229
|
+
allValue: i(() => t.showAllField)
|
|
230
|
+
}), H = i({
|
|
187
231
|
get() {
|
|
188
232
|
if (t.multiple)
|
|
189
|
-
return (Array.isArray(
|
|
190
|
-
if (Array.isArray(
|
|
191
|
-
const e =
|
|
233
|
+
return (Array.isArray(r.value) ? r.value : r.value === void 0 ? [] : [r.value]).map((l) => x(l));
|
|
234
|
+
if (Array.isArray(r.value)) {
|
|
235
|
+
const e = r.value.at(-1);
|
|
192
236
|
return e === void 0 ? void 0 : x(e);
|
|
193
237
|
}
|
|
194
|
-
return
|
|
238
|
+
return r.value === void 0 ? void 0 : x(r.value);
|
|
195
239
|
},
|
|
196
240
|
set(e) {
|
|
197
|
-
const l = r
|
|
198
|
-
if (
|
|
199
|
-
const o = (Array.isArray(e) ? e : []).map((
|
|
200
|
-
|
|
241
|
+
const l = s(r);
|
|
242
|
+
if (W = Array.isArray(l) ? [...l] : l, t.multiple) {
|
|
243
|
+
const o = (Array.isArray(e) ? e : []).map((n) => K(n)).filter((n) => n !== void 0);
|
|
244
|
+
r.value = Re(o);
|
|
201
245
|
return;
|
|
202
246
|
}
|
|
203
|
-
|
|
247
|
+
r.value = K(e);
|
|
204
248
|
}
|
|
205
|
-
}),
|
|
249
|
+
}), J = i(
|
|
206
250
|
() => {
|
|
207
251
|
const e = {}, l = {};
|
|
208
252
|
return k.value.forEach((a) => {
|
|
209
|
-
const { enabledCount: o, checkedCount:
|
|
210
|
-
e[
|
|
253
|
+
const { enabledCount: o, checkedCount: n } = Oe(a), u = String(a.value);
|
|
254
|
+
e[u] = o > 0 && n === o, l[u] = o > 0 && n > 0 && n < o;
|
|
211
255
|
}), { checkedMap: e, indeterminateMap: l };
|
|
212
256
|
}
|
|
213
|
-
),
|
|
214
|
-
function
|
|
215
|
-
const l =
|
|
257
|
+
), Be = i(() => J.value.checkedMap), Te = i(() => J.value.indeterminateMap), Ge = i(() => q.value.has(t.showAllField)), Q = i(() => [...t.showAll ? [{ label: "全部", value: t.showAllField }] : [], ...V.value.map((l) => ({ ...l }))]);
|
|
258
|
+
function _e(e) {
|
|
259
|
+
const l = s(Q);
|
|
216
260
|
if (Array.isArray(e)) {
|
|
217
261
|
const a = new Set(e);
|
|
218
262
|
return l.filter((o) => o.value !== void 0 && a.has(o.value));
|
|
@@ -220,195 +264,197 @@ const m = 4, Wl = /* @__PURE__ */ qe({
|
|
|
220
264
|
if (e !== void 0)
|
|
221
265
|
return l.find((a) => a.value === e);
|
|
222
266
|
}
|
|
223
|
-
function
|
|
267
|
+
function We(e) {
|
|
224
268
|
var a;
|
|
225
269
|
if (t.showPinyinMode || k.value.some((o) => o.value === e.value)) return e.value;
|
|
226
|
-
const l =
|
|
270
|
+
const l = m.value.find((o) => o.path.some((n) => n.value === e.value));
|
|
227
271
|
return (a = l == null ? void 0 : l.path.at(-2)) == null ? void 0 : a.value;
|
|
228
272
|
}
|
|
229
|
-
function
|
|
230
|
-
|
|
231
|
-
const l =
|
|
232
|
-
|
|
273
|
+
function De(e) {
|
|
274
|
+
O.value = e.value;
|
|
275
|
+
const l = We(e);
|
|
276
|
+
M.value = void 0, P(() => {
|
|
233
277
|
var a;
|
|
234
|
-
|
|
278
|
+
M.value = l, l !== void 0 && ((a = $.value) == null || a.scrollToGroup(l));
|
|
235
279
|
});
|
|
236
280
|
}
|
|
237
|
-
function
|
|
281
|
+
function Ke(e) {
|
|
238
282
|
y.value = e;
|
|
239
283
|
}
|
|
240
|
-
function
|
|
241
|
-
|
|
284
|
+
function Ue(e) {
|
|
285
|
+
d.value = e;
|
|
242
286
|
}
|
|
243
|
-
function
|
|
287
|
+
function Ie(e, l) {
|
|
244
288
|
const a = k.value.find((o) => o.value === e);
|
|
245
|
-
a &&
|
|
289
|
+
a && Me(a, l);
|
|
246
290
|
}
|
|
247
|
-
async function
|
|
291
|
+
async function ze(e) {
|
|
248
292
|
var l;
|
|
249
|
-
|
|
293
|
+
b("visible-change", e), e && (d.value = "", y.value = "", await P(), (l = $.value) == null || l.inputFocus(), z(), t.alwaysLoad ? await v() : !t.immediate && !s(G) && await v());
|
|
250
294
|
}
|
|
251
|
-
function
|
|
252
|
-
|
|
295
|
+
function je() {
|
|
296
|
+
X(W);
|
|
253
297
|
}
|
|
254
|
-
function
|
|
255
|
-
|
|
298
|
+
function qe(e) {
|
|
299
|
+
b("change", e, [...s(Q)], _e(e));
|
|
256
300
|
}
|
|
257
|
-
function
|
|
301
|
+
function He(e, l) {
|
|
258
302
|
return Array.isArray(e) && Array.isArray(l) ? e.length === l.length && e.every((a, o) => a === l[o]) : e === l;
|
|
259
303
|
}
|
|
260
|
-
function
|
|
261
|
-
|
|
262
|
-
const l = r
|
|
263
|
-
|
|
304
|
+
function X(e) {
|
|
305
|
+
P(() => {
|
|
306
|
+
const l = s(r);
|
|
307
|
+
He(l, e) || qe(l);
|
|
264
308
|
});
|
|
265
309
|
}
|
|
266
|
-
function
|
|
267
|
-
const l = r
|
|
268
|
-
e(),
|
|
310
|
+
function p(e) {
|
|
311
|
+
const l = s(r), a = Array.isArray(l) ? [...l] : l;
|
|
312
|
+
e(), X(a);
|
|
269
313
|
}
|
|
270
|
-
function
|
|
271
|
-
|
|
272
|
-
|
|
314
|
+
function Je(e) {
|
|
315
|
+
p(() => {
|
|
316
|
+
$e(e);
|
|
273
317
|
});
|
|
274
318
|
}
|
|
275
|
-
function
|
|
276
|
-
|
|
277
|
-
|
|
319
|
+
function Qe(e) {
|
|
320
|
+
p(() => {
|
|
321
|
+
Ne(e);
|
|
278
322
|
});
|
|
279
323
|
}
|
|
280
|
-
function
|
|
281
|
-
|
|
282
|
-
|
|
324
|
+
function Xe(e, l) {
|
|
325
|
+
p(() => {
|
|
326
|
+
Ie(e, l);
|
|
283
327
|
});
|
|
284
328
|
}
|
|
285
|
-
function
|
|
286
|
-
|
|
287
|
-
|
|
329
|
+
function Ye(e, l) {
|
|
330
|
+
p(() => {
|
|
331
|
+
Ee(e, l);
|
|
288
332
|
});
|
|
289
333
|
}
|
|
290
|
-
function
|
|
291
|
-
|
|
292
|
-
|
|
334
|
+
function Y(e, l) {
|
|
335
|
+
p(() => {
|
|
336
|
+
Fe(e, l);
|
|
293
337
|
});
|
|
294
338
|
}
|
|
295
|
-
function
|
|
296
|
-
|
|
297
|
-
|
|
339
|
+
function Ze(e) {
|
|
340
|
+
p(() => {
|
|
341
|
+
Pe(e);
|
|
298
342
|
});
|
|
299
343
|
}
|
|
300
|
-
function
|
|
301
|
-
|
|
302
|
-
|
|
344
|
+
function el() {
|
|
345
|
+
p(() => {
|
|
346
|
+
Le();
|
|
303
347
|
});
|
|
304
348
|
}
|
|
305
|
-
function
|
|
306
|
-
|
|
349
|
+
function ll(e) {
|
|
350
|
+
b("focus", e);
|
|
307
351
|
}
|
|
308
|
-
return
|
|
352
|
+
return N(
|
|
309
353
|
() => t.params,
|
|
310
354
|
() => {
|
|
311
|
-
|
|
355
|
+
v();
|
|
312
356
|
},
|
|
313
357
|
{ deep: !0 }
|
|
314
|
-
),
|
|
315
|
-
|
|
358
|
+
), N(
|
|
359
|
+
de,
|
|
316
360
|
(e) => {
|
|
317
361
|
var l;
|
|
318
|
-
|
|
362
|
+
O.value !== void 0 || !e.length || (O.value = (l = e[0]) == null ? void 0 : l.value);
|
|
319
363
|
},
|
|
320
364
|
{ immediate: !0 }
|
|
321
|
-
),
|
|
322
|
-
t.immediate &&
|
|
323
|
-
}),
|
|
365
|
+
), ol(() => {
|
|
366
|
+
t.immediate && v();
|
|
367
|
+
}), re({
|
|
324
368
|
/** 重新加载数据源*/
|
|
325
|
-
reload:
|
|
369
|
+
reload: v,
|
|
326
370
|
/** 获取当前归一化后的树形选项数据 */
|
|
327
|
-
getOptions: () =>
|
|
371
|
+
getOptions: () => s(ce),
|
|
328
372
|
/** 获取当前v-model值 */
|
|
329
|
-
getValue: () => r
|
|
330
|
-
}), (e, l) => (A(),
|
|
373
|
+
getValue: () => s(r)
|
|
374
|
+
}), (e, l) => (A(), le("div", {
|
|
331
375
|
ref_key: "selectWrapRef",
|
|
332
376
|
ref: g,
|
|
333
|
-
class:
|
|
377
|
+
class: te(s(f))
|
|
334
378
|
}, [
|
|
335
|
-
|
|
379
|
+
ae(s(ue), nl({
|
|
336
380
|
ref_key: "selectRef",
|
|
337
|
-
ref:
|
|
338
|
-
modelValue:
|
|
339
|
-
"onUpdate:modelValue": l[0] || (l[0] = (a) =>
|
|
340
|
-
},
|
|
341
|
-
multiple:
|
|
381
|
+
ref: I,
|
|
382
|
+
modelValue: H.value,
|
|
383
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => H.value = a)
|
|
384
|
+
}, s(ve), {
|
|
385
|
+
multiple: c.multiple,
|
|
342
386
|
filterable: !1,
|
|
343
|
-
placeholder:
|
|
387
|
+
placeholder: fe.value,
|
|
344
388
|
persistent: !1,
|
|
345
389
|
"fallback-placements": ["bottom-start", "bottom-end", "bottom", "top-start", "top-end", "top", "right", "left"],
|
|
346
|
-
disabled:
|
|
347
|
-
"popper-class": `${
|
|
348
|
-
onVisibleChange:
|
|
349
|
-
onChange:
|
|
350
|
-
onFocus:
|
|
390
|
+
disabled: c.disabled,
|
|
391
|
+
"popper-class": `${s(f)}__popper vxe-table--ignore-clear`,
|
|
392
|
+
onVisibleChange: ze,
|
|
393
|
+
onChange: je,
|
|
394
|
+
onFocus: ll
|
|
351
395
|
}), {
|
|
352
|
-
empty:
|
|
353
|
-
|
|
396
|
+
empty: rl(() => [
|
|
397
|
+
il((A(), le("div", {
|
|
354
398
|
"element-loading-text": "加载中",
|
|
355
|
-
class:
|
|
356
|
-
style:
|
|
357
|
-
"--columns":
|
|
358
|
-
"--panel-min-width":
|
|
359
|
-
"--panel-width":
|
|
399
|
+
class: te(`${s(f)}__panel`),
|
|
400
|
+
style: sl({
|
|
401
|
+
"--columns": ke.value,
|
|
402
|
+
"--panel-min-width": Ae.value,
|
|
403
|
+
"--panel-width": E.value ? `${E.value}px` : "100%"
|
|
360
404
|
})
|
|
361
405
|
}, [
|
|
362
|
-
t.showNav ? (A(),
|
|
406
|
+
t.showNav ? (A(), oe(wl, {
|
|
363
407
|
key: 0,
|
|
364
|
-
"prefix-cls":
|
|
408
|
+
"prefix-cls": s(f),
|
|
365
409
|
keyword: y.value,
|
|
366
|
-
"tree-data":
|
|
367
|
-
"expanded-keys":
|
|
368
|
-
"left-placeholder":
|
|
369
|
-
"onUpdate:keyword":
|
|
370
|
-
onSelect:
|
|
371
|
-
}, null, 8, ["prefix-cls", "keyword", "tree-data", "expanded-keys", "left-placeholder"])) :
|
|
372
|
-
|
|
410
|
+
"tree-data": j.value,
|
|
411
|
+
"expanded-keys": we.value,
|
|
412
|
+
"left-placeholder": c.leftPlaceholder,
|
|
413
|
+
"onUpdate:keyword": Ke,
|
|
414
|
+
onSelect: De
|
|
415
|
+
}, null, 8, ["prefix-cls", "keyword", "tree-data", "expanded-keys", "left-placeholder"])) : ne("", !0),
|
|
416
|
+
ae(yl, {
|
|
373
417
|
ref_key: "middleRef",
|
|
374
|
-
ref:
|
|
375
|
-
"
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
418
|
+
ref: $,
|
|
419
|
+
"allow-create": t.allowCreate,
|
|
420
|
+
"prefix-cls": s(f),
|
|
421
|
+
multiple: c.multiple,
|
|
422
|
+
keyword: d.value,
|
|
423
|
+
rows: be.value,
|
|
424
|
+
disabled: D.value,
|
|
380
425
|
"show-all": t.showAll,
|
|
381
|
-
"option-per-row":
|
|
426
|
+
"option-per-row": h,
|
|
382
427
|
"row-height": 40,
|
|
383
|
-
"selected-value-set":
|
|
384
|
-
"is-all-checked":
|
|
385
|
-
"is-indeterminate":
|
|
386
|
-
"all-checked":
|
|
387
|
-
"scroll-to-group-value":
|
|
388
|
-
"group-checked-map":
|
|
389
|
-
"group-indeterminate-map":
|
|
390
|
-
"paste-search":
|
|
391
|
-
separator:
|
|
392
|
-
"middle-placeholder":
|
|
393
|
-
"show-multiple":
|
|
394
|
-
"onUpdate:keyword":
|
|
395
|
-
onAllCheck:
|
|
396
|
-
onCheckAll:
|
|
397
|
-
onGroupCheck:
|
|
398
|
-
onOptionCheck:
|
|
399
|
-
onOptionsCheck:
|
|
400
|
-
|
|
401
|
-
|
|
428
|
+
"selected-value-set": s(q),
|
|
429
|
+
"is-all-checked": s(Se),
|
|
430
|
+
"is-indeterminate": s(Ve),
|
|
431
|
+
"all-checked": Ge.value,
|
|
432
|
+
"scroll-to-group-value": M.value,
|
|
433
|
+
"group-checked-map": Be.value,
|
|
434
|
+
"group-indeterminate-map": Te.value,
|
|
435
|
+
"paste-search": c.pasteSearch,
|
|
436
|
+
separator: c.separator,
|
|
437
|
+
"middle-placeholder": c.middlePlaceholder,
|
|
438
|
+
"show-multiple": c.showMultiple,
|
|
439
|
+
"onUpdate:keyword": Ue,
|
|
440
|
+
onAllCheck: Je,
|
|
441
|
+
onCheckAll: Qe,
|
|
442
|
+
onGroupCheck: Xe,
|
|
443
|
+
onOptionCheck: Ye,
|
|
444
|
+
onOptionsCheck: Y,
|
|
445
|
+
onSelectCreatedOptions: Ce
|
|
446
|
+
}, null, 8, ["allow-create", "prefix-cls", "multiple", "keyword", "rows", "disabled", "show-all", "selected-value-set", "is-all-checked", "is-indeterminate", "all-checked", "scroll-to-group-value", "group-checked-map", "group-indeterminate-map", "paste-search", "separator", "middle-placeholder", "show-multiple"]),
|
|
447
|
+
t.multiple ? (A(), oe(gl, {
|
|
402
448
|
key: 1,
|
|
403
|
-
"prefix-cls":
|
|
404
|
-
multiple:
|
|
405
|
-
disabled:
|
|
406
|
-
"selected-options":
|
|
407
|
-
onClearAll:
|
|
408
|
-
onRemove:
|
|
409
|
-
}, null, 8, ["prefix-cls", "multiple", "disabled", "selected-options"])) :
|
|
449
|
+
"prefix-cls": s(f),
|
|
450
|
+
multiple: c.multiple,
|
|
451
|
+
disabled: D.value,
|
|
452
|
+
"selected-options": s(xe),
|
|
453
|
+
onClearAll: el,
|
|
454
|
+
onRemove: Ze
|
|
455
|
+
}, null, 8, ["prefix-cls", "multiple", "disabled", "selected-options"])) : ne("", !0)
|
|
410
456
|
], 6)), [
|
|
411
|
-
[
|
|
457
|
+
[s(se), s(B)]
|
|
412
458
|
])
|
|
413
459
|
]),
|
|
414
460
|
_: 1
|
|
@@ -417,5 +463,5 @@ const m = 4, Wl = /* @__PURE__ */ qe({
|
|
|
417
463
|
}
|
|
418
464
|
});
|
|
419
465
|
export {
|
|
420
|
-
|
|
466
|
+
Jl as default
|
|
421
467
|
};
|