@dazhicheng/ui 1.6.45 → 1.6.47
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-keep-alive/index.js +54 -54
- package/dist/components/tt-modal/src/RenderModal.vue.js +211 -204
- package/dist/components/tt-modal/src/hooks/useModalRender.js +85 -84
- package/dist/components/tt-modal/src/index.js +26 -13
- package/dist/components/tt-modal/src/utils/modal-scope.d.ts +5 -4
- package/dist/components/tt-modal/src/utils/modal-scope.js +13 -10
- package/dist/components/tt-panel-select/src/index.vue.d.ts +2 -0
- package/dist/components/tt-panel-select/src/index.vue.js +53 -49
- package/package.json +1 -1
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { useStore as
|
|
2
|
-
import { reactive as
|
|
3
|
-
import { RouterView as
|
|
4
|
-
import
|
|
1
|
+
import { useStore as y } from "@tanstack/vue-store";
|
|
2
|
+
import { reactive as w, ref as E, defineComponent as A, provide as O, nextTick as T, h as f, inject as b, getCurrentScope as x, effectScope as g, onScopeDispose as R, render as v, onMounted as k } from "vue";
|
|
3
|
+
import { RouterView as L } from "vue-router";
|
|
4
|
+
import h from "../RenderModal.vue.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import { ModalApi as
|
|
7
|
-
import { onModalCloseTransitionEnd as
|
|
8
|
-
import { resolveModalTarget as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
import { ModalApi as S } from "../utils/modal-api.js";
|
|
7
|
+
import { onModalCloseTransitionEnd as P } from "../utils/modal-close-transition.js";
|
|
8
|
+
import { resolveModalTarget as V } from "../utils/resolve-modal-target.js";
|
|
9
|
+
import { modalOwnerActive as N, MODAL_OWNER_ACTIVE_KEY as D } from "../utils/modal-scope.js";
|
|
10
|
+
const I = Symbol("Tt_MODAL_INJECT"), j = {};
|
|
11
|
+
function H(t = {}, l = I) {
|
|
12
|
+
var p;
|
|
13
|
+
const { connectedComponent: n } = t;
|
|
14
|
+
if (n) {
|
|
15
|
+
const e = w({}), s = E(!0);
|
|
16
|
+
return [A(
|
|
17
|
+
(m, { attrs: u, slots: M }) => (O(l, {
|
|
18
|
+
extendApi(_) {
|
|
19
|
+
Object.setPrototypeOf(e, _);
|
|
19
20
|
},
|
|
20
|
-
options:
|
|
21
|
+
options: t,
|
|
21
22
|
async reCreateModal() {
|
|
22
|
-
|
|
23
|
+
s.value = !1, await T(), s.value = !0;
|
|
23
24
|
}
|
|
24
|
-
}),
|
|
25
|
+
}), J(e, {
|
|
26
|
+
...m,
|
|
25
27
|
...u,
|
|
26
|
-
...
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
d.value ? r : "div",
|
|
28
|
+
...M
|
|
29
|
+
}), () => f(
|
|
30
|
+
s.value ? n : "div",
|
|
30
31
|
{
|
|
31
|
-
...
|
|
32
|
-
...
|
|
32
|
+
...m,
|
|
33
|
+
...u
|
|
33
34
|
},
|
|
34
|
-
|
|
35
|
+
M
|
|
35
36
|
)),
|
|
36
37
|
{
|
|
37
38
|
name: "TtModal",
|
|
@@ -39,93 +40,93 @@ function K(n = {}, c = R) {
|
|
|
39
40
|
}
|
|
40
41
|
), e];
|
|
41
42
|
}
|
|
42
|
-
const o =
|
|
43
|
-
...
|
|
43
|
+
const o = b(l, {}), r = {
|
|
44
|
+
...j,
|
|
44
45
|
...o.options,
|
|
45
|
-
...
|
|
46
|
+
...t
|
|
46
47
|
};
|
|
47
|
-
|
|
48
|
-
var
|
|
49
|
-
(
|
|
48
|
+
r.onVisibleChange = (e) => {
|
|
49
|
+
var s, i, m;
|
|
50
|
+
(s = t.onVisibleChange) == null || s.call(t, e), (m = (i = o.options) == null ? void 0 : i.onVisibleChange) == null || m.call(i, e);
|
|
50
51
|
};
|
|
51
|
-
const
|
|
52
|
-
|
|
52
|
+
const c = r.onClosed;
|
|
53
|
+
r.onClosed = () => {
|
|
53
54
|
var e;
|
|
54
|
-
|
|
55
|
+
c == null || c(), r.destroyOnClose && ((e = o.reCreateDrawer) == null || e.call(o));
|
|
55
56
|
};
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
(e, { attrs:
|
|
60
|
-
|
|
57
|
+
const d = new S(r), a = d;
|
|
58
|
+
a.useStore = (e) => y(d.store, e);
|
|
59
|
+
const C = A(
|
|
60
|
+
(e, { attrs: s, slots: i }) => () => f(
|
|
61
|
+
h,
|
|
61
62
|
{
|
|
62
63
|
...e,
|
|
63
|
-
...
|
|
64
|
-
modalApi:
|
|
64
|
+
...s,
|
|
65
|
+
modalApi: a
|
|
65
66
|
},
|
|
66
|
-
|
|
67
|
+
i
|
|
67
68
|
),
|
|
68
69
|
{
|
|
69
70
|
name: "TtModal",
|
|
70
71
|
inheritAttrs: !1
|
|
71
72
|
}
|
|
72
73
|
);
|
|
73
|
-
return (
|
|
74
|
+
return (p = o.extendApi) == null || p.call(o, a), [C, a];
|
|
74
75
|
}
|
|
75
|
-
function
|
|
76
|
-
const o = new
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
(
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
76
|
+
function Q(t, l, n) {
|
|
77
|
+
const o = x(), r = o ? N.get(o) : void 0, c = new S(n), d = c;
|
|
78
|
+
d.useStore = (u) => y(c.store, u);
|
|
79
|
+
const a = document.createElement("div");
|
|
80
|
+
(n.appendToBody ? document.body : V() ?? document.body).appendChild(a);
|
|
81
|
+
const p = g(), e = P(d, () => p.stop());
|
|
82
|
+
p.run(() => {
|
|
83
|
+
R(() => {
|
|
84
|
+
e(), v(null, a), a.remove();
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
const s = A(
|
|
88
|
+
(u, { slots: M }) => (r && O(D, r), k(() => {
|
|
89
|
+
n && d.setModalProps(n), d.openModal();
|
|
90
|
+
}), () => f(
|
|
91
|
+
h,
|
|
92
|
+
{
|
|
93
|
+
...u,
|
|
94
|
+
modalApi: d
|
|
95
|
+
},
|
|
96
|
+
M
|
|
97
|
+
)),
|
|
97
98
|
{
|
|
98
99
|
name: "TtModal",
|
|
99
100
|
inheritAttrs: !1
|
|
100
101
|
}
|
|
101
|
-
),
|
|
102
|
-
|
|
102
|
+
), i = f(l, {}), m = f(
|
|
103
|
+
L,
|
|
103
104
|
{},
|
|
104
|
-
() =>
|
|
105
|
-
|
|
105
|
+
() => f(
|
|
106
|
+
s,
|
|
106
107
|
{
|
|
107
|
-
...
|
|
108
|
+
...n
|
|
108
109
|
},
|
|
109
110
|
{
|
|
110
|
-
default: () =>
|
|
111
|
+
default: () => i
|
|
111
112
|
}
|
|
112
113
|
)
|
|
113
114
|
);
|
|
114
|
-
return m.appContext =
|
|
115
|
+
return m.appContext = t._context, v(m, a), d;
|
|
115
116
|
}
|
|
116
|
-
async function
|
|
117
|
-
var
|
|
118
|
-
if (!
|
|
117
|
+
async function J(t, l) {
|
|
118
|
+
var r;
|
|
119
|
+
if (!l || Object.keys(l).length === 0)
|
|
119
120
|
return;
|
|
120
121
|
await T();
|
|
121
|
-
const
|
|
122
|
-
if (!
|
|
122
|
+
const n = (r = t == null ? void 0 : t.store) == null ? void 0 : r.state;
|
|
123
|
+
if (!n)
|
|
123
124
|
return;
|
|
124
|
-
const o = new Set(Object.keys(
|
|
125
|
-
for (const
|
|
126
|
-
o.has(
|
|
125
|
+
const o = new Set(Object.keys(n));
|
|
126
|
+
for (const c of Object.keys(l))
|
|
127
|
+
o.has(c) && ["class"].includes(c);
|
|
127
128
|
}
|
|
128
129
|
export {
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
Q as showTtModal,
|
|
131
|
+
H as useModalRender
|
|
131
132
|
};
|
|
@@ -1,19 +1,32 @@
|
|
|
1
|
-
import { inject as
|
|
1
|
+
import { inject as n, getCurrentScope as u, shallowRef as c, computed as d, onActivated as i, onDeactivated as f } from "vue";
|
|
2
2
|
import { showTtModal as M } from "./hooks/useModalRender.js";
|
|
3
|
-
import { setModalHostApp as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
o
|
|
3
|
+
import { setModalHostApp as w } from "./utils/modal-host-app.js";
|
|
4
|
+
import { MODAL_OWNER_ACTIVE_KEY as m, modalOwnerActive as v } from "./utils/modal-scope.js";
|
|
5
|
+
const s = Symbol("SHOW_MODAL");
|
|
6
|
+
function A(t) {
|
|
7
|
+
w(t);
|
|
8
|
+
const o = (e, r) => M(t, e, r);
|
|
9
|
+
t.provide(s, o);
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
11
|
+
function E() {
|
|
12
|
+
const t = n(s);
|
|
13
|
+
if (!t)
|
|
13
14
|
throw new Error("[TtModal]: useShowModal() 需要先调用 setupModal(app) 进行注册");
|
|
14
|
-
|
|
15
|
+
const o = u(), e = c(!0), r = n(m, void 0);
|
|
16
|
+
return o && v.set(
|
|
17
|
+
o,
|
|
18
|
+
d(() => e.value && (r == null ? void 0 : r.value) !== !1)
|
|
19
|
+
), i(() => {
|
|
20
|
+
e.value = !0;
|
|
21
|
+
}), f(() => {
|
|
22
|
+
e.value = !1;
|
|
23
|
+
}), (a, l) => {
|
|
24
|
+
if (o && !o.active)
|
|
25
|
+
throw new Error("[TtModal]: 页面已销毁,不能再打开弹窗");
|
|
26
|
+
return o ? o.run(() => t(a, l)) : t(a, l);
|
|
27
|
+
};
|
|
15
28
|
}
|
|
16
29
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
30
|
+
A as setupModal,
|
|
31
|
+
E as useShowModal
|
|
19
32
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
1
|
+
import { EffectScope, InjectionKey, Ref } from 'vue';
|
|
2
|
+
/** 命令式弹窗从调用方作用域继承激活状态,WeakMap 不延长页面寿命。 */
|
|
3
|
+
export declare const modalOwnerActive: WeakMap<EffectScope, Readonly<Ref<boolean, boolean>>>;
|
|
4
|
+
/** 独立挂载的弹窗向内容组件传递所属页面状态,支持嵌套弹窗。 */
|
|
5
|
+
export declare const MODAL_OWNER_ACTIVE_KEY: InjectionKey<Readonly<Ref<boolean>>>;
|
|
5
6
|
/** 当前作用域标识:子应用用 micro-app name,宿主页面用 host */
|
|
6
7
|
export declare function getModalScopeKey(): string;
|
|
7
8
|
/**
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
const c = /* @__PURE__ */ new WeakMap(), i = Symbol("TtModalOwnerActive");
|
|
2
|
+
function r() {
|
|
2
3
|
return typeof window > "u" ? "host" : window.__MICRO_APP_NAME__ || "host";
|
|
3
4
|
}
|
|
4
|
-
function u(
|
|
5
|
+
function u(e) {
|
|
5
6
|
var n;
|
|
6
|
-
const o =
|
|
7
|
-
return
|
|
7
|
+
const o = e.body ?? e.documentElement, t = (n = o == null ? void 0 : o.getRootNode) == null ? void 0 : n.call(o);
|
|
8
|
+
return t instanceof Document ? t : e;
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
+
function s() {
|
|
10
11
|
return typeof document > "u" ? void 0 : document;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
return
|
|
13
|
+
function d(e, o) {
|
|
14
|
+
return e.closest("micro-app-body") === o.closest("micro-app-body");
|
|
14
15
|
}
|
|
15
16
|
export {
|
|
16
|
-
i as
|
|
17
|
-
|
|
18
|
-
r as
|
|
17
|
+
i as MODAL_OWNER_ACTIVE_KEY,
|
|
18
|
+
s as getClientDocument,
|
|
19
|
+
r as getModalScopeKey,
|
|
20
|
+
d as isSameMicroAppScope,
|
|
21
|
+
c as modalOwnerActive,
|
|
19
22
|
u as resolveScanDocument
|
|
20
23
|
};
|
|
@@ -14,10 +14,12 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
14
14
|
getValue: () => PanelSelectModelValue;
|
|
15
15
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
16
|
change: (val: unknown, options: PanelSelectOption[], currentOption: PanelSelectOption | PanelSelectOption[] | undefined) => any;
|
|
17
|
+
focus: (ev: FocusEvent) => any;
|
|
17
18
|
"update:modelValue": (value: PanelSelectModelValue) => any;
|
|
18
19
|
"visible-change": (val: boolean) => any;
|
|
19
20
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
21
|
onChange?: ((val: unknown, options: PanelSelectOption[], currentOption: PanelSelectOption | PanelSelectOption[] | undefined) => any) | undefined;
|
|
22
|
+
onFocus?: ((ev: FocusEvent) => any) | undefined;
|
|
21
23
|
"onUpdate:modelValue"?: ((value: PanelSelectModelValue) => any) | undefined;
|
|
22
24
|
"onVisible-change"?: ((val: boolean) => any) | undefined;
|
|
23
25
|
}>, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as je, mergeModels as I, useModel as qe, computed as u, watch as M, ref as v, useTemplateRef as E, unref as r, onMounted as He, createElementBlock as z, openBlock as A, normalizeClass as j, createVNode as q, mergeProps as Je, withCtx as Qe, withDirectives as Xe, normalizeStyle as Ye, createBlock as H, createCommentVNode as J, nextTick as F } 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 Ze } from "../../../packages/hooks/src/useDesign.js";
|
|
4
4
|
import "axios";
|
|
5
|
-
import { ElSelect as
|
|
5
|
+
import { ElSelect as el, vLoading as ll } from "element-plus";
|
|
6
6
|
import "dayjs";
|
|
7
7
|
import "numeral";
|
|
8
8
|
import "xe-utils";
|
|
@@ -15,16 +15,16 @@ import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-
|
|
|
15
15
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
16
16
|
import "lodash-es";
|
|
17
17
|
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
|
|
18
|
+
import { useResizeObserver as tl } from "@vueuse/core";
|
|
19
|
+
import { useSelectCollapseOptions as al } from "../../tt-form/src/hooks/useSelectCollapse.js";
|
|
20
|
+
import { ALL as ol, DEFAULT_PANEL_SELECT_SEPARATORS as nl } from "./common.js";
|
|
21
|
+
import il from "./components/PanelLeft.vue.js";
|
|
22
|
+
import rl from "./components/PanelMiddle.vue.js";
|
|
23
|
+
import ul from "./components/PanelRight.vue.js";
|
|
24
|
+
import { usePanelSelectData as sl } from "./hooks/usePanelData.js";
|
|
25
|
+
import { usePanelSelectSelection as cl } from "./hooks/usePanelSelection.js";
|
|
26
26
|
/* empty css */
|
|
27
|
-
const m = 4,
|
|
27
|
+
const m = 4, Gl = /* @__PURE__ */ je({
|
|
28
28
|
name: "TtPanelSelect",
|
|
29
29
|
__name: "index",
|
|
30
30
|
props: /* @__PURE__ */ I({
|
|
@@ -47,11 +47,11 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
47
47
|
immediate: { type: Boolean, default: !0 },
|
|
48
48
|
beforeFetch: { type: Function, default: void 0 },
|
|
49
49
|
afterFetch: { type: Function, default: void 0 },
|
|
50
|
-
separator: { default: () => [...
|
|
50
|
+
separator: { default: () => [...nl] },
|
|
51
51
|
pasteSearch: { type: Boolean, default: !0 },
|
|
52
52
|
alwaysLoad: { type: Boolean, default: !1 },
|
|
53
53
|
showAll: { type: Boolean, default: !0 },
|
|
54
|
-
showAllField: { default:
|
|
54
|
+
showAllField: { default: ol },
|
|
55
55
|
showPinyinMode: { type: Boolean, default: !1 },
|
|
56
56
|
showOriginMode: { type: Boolean, default: !0 },
|
|
57
57
|
leftPlaceholder: { default: "支持模糊搜索" },
|
|
@@ -61,9 +61,9 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
61
61
|
modelValue: {},
|
|
62
62
|
modelModifiers: {}
|
|
63
63
|
}),
|
|
64
|
-
emits: /* @__PURE__ */ I(["visible-change", "change"], ["update:modelValue"]),
|
|
64
|
+
emits: /* @__PURE__ */ I(["visible-change", "change", "focus"], ["update:modelValue"]),
|
|
65
65
|
setup(s, { expose: Q, emit: X }) {
|
|
66
|
-
const Y =
|
|
66
|
+
const Y = ll, Z = el, t = s, C = X, { prefixCls: p } = Ze("panel-select"), {
|
|
67
67
|
loading: ee,
|
|
68
68
|
fetchApi: f,
|
|
69
69
|
treeOptions: le,
|
|
@@ -72,13 +72,13 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
72
72
|
leafNodes: h,
|
|
73
73
|
isFirstLoaded: ae,
|
|
74
74
|
buildOptionGroups: oe
|
|
75
|
-
} =
|
|
75
|
+
} = sl(t), n = qe(s, "modelValue");
|
|
76
76
|
let L;
|
|
77
77
|
const P = u(() => t.disabled), ne = u(() => {
|
|
78
78
|
const e = /* @__PURE__ */ new Map();
|
|
79
79
|
return h.value.forEach((l) => e.set(l.value, l.label)), e;
|
|
80
80
|
});
|
|
81
|
-
function
|
|
81
|
+
function x(e) {
|
|
82
82
|
return e === t.showAllField ? { label: "全部", value: t.showAllField } : { label: ne.value.get(e) ?? String(e), value: e };
|
|
83
83
|
}
|
|
84
84
|
function $(e) {
|
|
@@ -93,19 +93,19 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
93
93
|
n.value = t.multiple ? [...e] : e.at(-1);
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
|
-
|
|
96
|
+
M([() => t.multiple, () => n.value], ([e, l]) => {
|
|
97
97
|
if (e) {
|
|
98
98
|
Array.isArray(l) || (n.value = l === void 0 ? [] : [l]);
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
101
|
Array.isArray(l) && (n.value = l.at(-1));
|
|
102
102
|
});
|
|
103
|
-
const
|
|
103
|
+
const b = v(), y = v(""), w = v(""), S = v(), V = E("middleRef"), g = E("selectWrapRef"), N = E("selectRef"), O = v(0);
|
|
104
104
|
function B() {
|
|
105
105
|
const e = g.value;
|
|
106
|
-
e && (
|
|
106
|
+
e && (O.value = e.offsetWidth);
|
|
107
107
|
}
|
|
108
|
-
|
|
108
|
+
tl(g, () => B());
|
|
109
109
|
const re = u(() => ({
|
|
110
110
|
componentProps: {
|
|
111
111
|
multiple: t.multiple,
|
|
@@ -116,7 +116,7 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
116
116
|
component: "TtPanelSelect",
|
|
117
117
|
selectWrapRef: g,
|
|
118
118
|
selectRef: N
|
|
119
|
-
})), { selectComponentProps: ue } =
|
|
119
|
+
})), { selectComponentProps: ue } = al(re), T = u(() => {
|
|
120
120
|
const e = y.value.trim().toLowerCase();
|
|
121
121
|
if (!e) return R.value;
|
|
122
122
|
const l = (a) => {
|
|
@@ -172,7 +172,7 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
172
172
|
clearSelected: Ce,
|
|
173
173
|
removeSelected: xe,
|
|
174
174
|
withLockedSelectedValues: be
|
|
175
|
-
} =
|
|
175
|
+
} = cl({
|
|
176
176
|
multiple: u(() => t.multiple),
|
|
177
177
|
modelValue: n,
|
|
178
178
|
selectedValues: ie,
|
|
@@ -181,12 +181,12 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
181
181
|
}), W = u({
|
|
182
182
|
get() {
|
|
183
183
|
if (t.multiple)
|
|
184
|
-
return (Array.isArray(n.value) ? n.value : n.value === void 0 ? [] : [n.value]).map((l) =>
|
|
184
|
+
return (Array.isArray(n.value) ? n.value : n.value === void 0 ? [] : [n.value]).map((l) => x(l));
|
|
185
185
|
if (Array.isArray(n.value)) {
|
|
186
186
|
const e = n.value.at(-1);
|
|
187
|
-
return e === void 0 ? void 0 :
|
|
187
|
+
return e === void 0 ? void 0 : x(e);
|
|
188
188
|
}
|
|
189
|
-
return n.value === void 0 ? void 0 :
|
|
189
|
+
return n.value === void 0 ? void 0 : x(n.value);
|
|
190
190
|
},
|
|
191
191
|
set(e) {
|
|
192
192
|
const l = r(n);
|
|
@@ -222,11 +222,11 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
222
222
|
return (a = l == null ? void 0 : l.path.at(-2)) == null ? void 0 : a.value;
|
|
223
223
|
}
|
|
224
224
|
function Fe(e) {
|
|
225
|
-
|
|
225
|
+
b.value = e.value;
|
|
226
226
|
const l = Ee(e);
|
|
227
|
-
|
|
227
|
+
S.value = void 0, F(() => {
|
|
228
228
|
var a;
|
|
229
|
-
|
|
229
|
+
S.value = l, l !== void 0 && ((a = V.value) == null || a.scrollToGroup(l));
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
232
|
function Re(e) {
|
|
@@ -241,19 +241,19 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
241
241
|
}
|
|
242
242
|
async function $e(e) {
|
|
243
243
|
var l;
|
|
244
|
-
|
|
244
|
+
C("visible-change", e), e && (w.value = "", y.value = "", await F(), (l = V.value) == null || l.inputFocus(), B(), t.alwaysLoad ? await f() : !t.immediate && !r(ae) && await f());
|
|
245
245
|
}
|
|
246
246
|
function Ne() {
|
|
247
247
|
U(L);
|
|
248
248
|
}
|
|
249
249
|
function Be(e) {
|
|
250
|
-
|
|
250
|
+
C("change", e, [...r(K)], Me(e));
|
|
251
251
|
}
|
|
252
252
|
function Te(e, l) {
|
|
253
253
|
return Array.isArray(e) && Array.isArray(l) ? e.length === l.length && e.every((a, o) => a === l[o]) : e === l;
|
|
254
254
|
}
|
|
255
255
|
function U(e) {
|
|
256
|
-
|
|
256
|
+
F(() => {
|
|
257
257
|
const l = r(n);
|
|
258
258
|
Te(l, e) || Be(l);
|
|
259
259
|
});
|
|
@@ -297,20 +297,23 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
297
297
|
Ce();
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
|
-
|
|
300
|
+
function ze(e) {
|
|
301
|
+
C("focus", e);
|
|
302
|
+
}
|
|
303
|
+
return M(
|
|
301
304
|
() => t.params,
|
|
302
305
|
() => {
|
|
303
306
|
f();
|
|
304
307
|
},
|
|
305
308
|
{ deep: !0 }
|
|
306
|
-
),
|
|
309
|
+
), M(
|
|
307
310
|
te,
|
|
308
311
|
(e) => {
|
|
309
312
|
var l;
|
|
310
|
-
|
|
313
|
+
b.value !== void 0 || !e.length || (b.value = (l = e[0]) == null ? void 0 : l.value);
|
|
311
314
|
},
|
|
312
315
|
{ immediate: !0 }
|
|
313
|
-
),
|
|
316
|
+
), He(() => {
|
|
314
317
|
t.immediate && f();
|
|
315
318
|
}), Q({
|
|
316
319
|
/** 重新加载数据源*/
|
|
@@ -324,7 +327,7 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
324
327
|
ref: g,
|
|
325
328
|
class: j(r(p))
|
|
326
329
|
}, [
|
|
327
|
-
q(r(Z),
|
|
330
|
+
q(r(Z), Je({
|
|
328
331
|
ref_key: "selectRef",
|
|
329
332
|
ref: N,
|
|
330
333
|
modelValue: W.value,
|
|
@@ -338,19 +341,20 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
338
341
|
disabled: s.disabled,
|
|
339
342
|
"popper-class": `${r(p)}__popper vxe-table--ignore-clear`,
|
|
340
343
|
onVisibleChange: $e,
|
|
341
|
-
onChange: Ne
|
|
344
|
+
onChange: Ne,
|
|
345
|
+
onFocus: ze
|
|
342
346
|
}), {
|
|
343
|
-
empty:
|
|
344
|
-
|
|
347
|
+
empty: Qe(() => [
|
|
348
|
+
Xe((A(), z("div", {
|
|
345
349
|
"element-loading-text": "加载中",
|
|
346
350
|
class: j(`${r(p)}__panel`),
|
|
347
|
-
style:
|
|
351
|
+
style: Ye({
|
|
348
352
|
"--columns": ce.value,
|
|
349
353
|
"--panel-min-width": de.value,
|
|
350
|
-
"--panel-width":
|
|
354
|
+
"--panel-width": O.value ? `${O.value}px` : "100%"
|
|
351
355
|
})
|
|
352
356
|
}, [
|
|
353
|
-
t.showNav ? (A(), H(
|
|
357
|
+
t.showNav ? (A(), H(il, {
|
|
354
358
|
key: 0,
|
|
355
359
|
"prefix-cls": r(p),
|
|
356
360
|
keyword: y.value,
|
|
@@ -360,9 +364,9 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
360
364
|
"onUpdate:keyword": Re,
|
|
361
365
|
onSelect: Fe
|
|
362
366
|
}, null, 8, ["prefix-cls", "keyword", "tree-data", "expanded-keys", "left-placeholder"])) : J("", !0),
|
|
363
|
-
q(
|
|
367
|
+
q(rl, {
|
|
364
368
|
ref_key: "middleRef",
|
|
365
|
-
ref:
|
|
369
|
+
ref: V,
|
|
366
370
|
"prefix-cls": r(p),
|
|
367
371
|
multiple: s.multiple,
|
|
368
372
|
keyword: w.value,
|
|
@@ -375,7 +379,7 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
375
379
|
"is-all-checked": r(fe),
|
|
376
380
|
"is-indeterminate": r(he),
|
|
377
381
|
"all-checked": Oe.value,
|
|
378
|
-
"scroll-to-group-value":
|
|
382
|
+
"scroll-to-group-value": S.value,
|
|
379
383
|
"group-checked-map": Se.value,
|
|
380
384
|
"group-indeterminate-map": Ve.value,
|
|
381
385
|
"paste-search": s.pasteSearch,
|
|
@@ -388,7 +392,7 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
388
392
|
onOptionCheck: Ke,
|
|
389
393
|
onOptionsCheck: Ue
|
|
390
394
|
}, null, 8, ["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"]),
|
|
391
|
-
t.multiple ? (A(), H(
|
|
395
|
+
t.multiple ? (A(), H(ul, {
|
|
392
396
|
key: 1,
|
|
393
397
|
"prefix-cls": r(p),
|
|
394
398
|
multiple: s.multiple,
|
|
@@ -407,5 +411,5 @@ const m = 4, Tl = /* @__PURE__ */ ze({
|
|
|
407
411
|
}
|
|
408
412
|
});
|
|
409
413
|
export {
|
|
410
|
-
|
|
414
|
+
Gl as default
|
|
411
415
|
};
|