@dazhicheng/ui 1.6.40 → 1.6.42
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-api-component/index.vue2.js +73 -73
- package/dist/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-button/index.d.ts +91 -105
- package/dist/components/tt-button/index.vue.d.ts +52 -60
- package/dist/components/tt-button/index.vue2.js +1 -1
- package/dist/components/tt-drawer/index.d.ts +352 -326
- package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +196 -184
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +1 -1
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +1 -1
- 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-empty/index.js +1 -1
- package/dist/components/tt-form/index.js +1 -1
- package/dist/components/tt-form/src/components/FormActions.vue2.js +1 -1
- package/dist/components/tt-form/src/components/FormElInput.vue.d.ts +106 -110
- package/dist/components/tt-form/src/form/FormMessageToolTip.vue.js +12 -12
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +164 -164
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +34 -34
- package/dist/components/tt-form/src/form-render/expandable.js +18 -18
- package/dist/components/tt-form/src/form-render/form.vue2.js +1 -1
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +1 -1
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +124 -124
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +99 -99
- package/dist/components/tt-form/src/index.vue.d.ts +8 -12
- package/dist/components/tt-form/src/index.vue2.js +1 -1
- package/dist/components/tt-form-item-error-tooltip/index.d.ts +30 -126
- package/dist/components/tt-form-item-error-tooltip/index.vue.d.ts +15 -63
- package/dist/components/tt-icon/components/AddIcon.vue.js +6 -6
- package/dist/components/tt-icon/components/SubIcon.vue.js +6 -6
- package/dist/components/tt-icon/index.d.ts +4 -4
- package/dist/components/tt-icon/index.vue.js +2 -2
- package/dist/components/tt-icon/index.vue2.js +28 -28
- 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 +424 -440
- package/dist/components/tt-input-textarea/index.vue.js +153 -153
- package/dist/components/tt-loading/src/loading.vue.js +2 -2
- package/dist/components/tt-loading/src/loading.vue2.js +22 -22
- package/dist/components/tt-log/index.vue.js +1 -1
- package/dist/components/tt-modal/index.d.ts +182 -162
- package/dist/components/tt-modal/src/RenderModal.vue.d.ts +54 -54
- package/dist/components/tt-modal/src/RenderModal.vue.js +244 -263
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.js +1 -1
- package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +26 -22
- package/dist/components/tt-modal/src/utils/modal-z-index.d.ts +0 -7
- package/dist/components/tt-modal/src/utils/modal-z-index.js +14 -16
- package/dist/components/tt-modal/src/utils/resolve-modal-target.d.ts +0 -13
- package/dist/components/tt-modal/src/utils/resolve-modal-target.js +75 -104
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +181 -208
- package/dist/components/tt-panel-select/src/components/PanelLeft.vue.js +24 -24
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +63 -67
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +145 -145
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.d.ts +10 -12
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.js +48 -48
- package/dist/components/tt-panel-select/src/index.vue.d.ts +63 -67
- package/dist/components/tt-panel-select/src/index.vue.js +137 -137
- package/dist/components/tt-radio-group/index.vue.js +1 -1
- package/dist/components/tt-select/src/Select.vue.d.ts +8 -12
- package/dist/components/tt-select/src/Select.vue.js +1 -1
- package/dist/components/tt-select/src/components/SelectTable.vue.js +1 -1
- package/dist/components/tt-select/src/components/Table.vue.js +1 -1
- package/dist/components/tt-table/index.d.ts +20 -24
- package/dist/components/tt-table/index.js +1 -1
- package/dist/components/tt-table/src/Table.vue.d.ts +40 -48
- package/dist/components/tt-table/src/Table.vue.js +1 -1
- package/dist/components/tt-table/src/TableForm.vue.d.ts +8 -12
- package/dist/components/tt-table/src/TableForm.vue.js +1 -1
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +1 -1
- package/dist/components/tt-table/src/hooks/useSideSlot.d.ts +40 -48
- package/dist/components/tt-text/index.vue2.js +22 -22
- 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/TtUpload.vue.js +1 -1
- package/dist/components/tt-upload/src/typing.d.ts +17 -17
- package/dist/hooks/useScreenshotOss.js +1 -1
- package/dist/packages/hooks/src/propTypes.js +1 -1
- package/dist/plugins/vxeTable/switchStatus.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
- /package/dist/node_modules/.pnpm/{vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_ → vue-types@5.1.3_vue@3.5.34_typescript@5.9.3_}/node_modules/vue-types/shim/index.modern.js +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { TtIcon as
|
|
4
|
-
import { TtText as
|
|
5
|
-
import "../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.
|
|
6
|
-
import { useDesign as
|
|
1
|
+
import { defineComponent as ye, ref as h, computed as T, watch as g, useTemplateRef as Z, onMounted as xe, onActivated as we, onDeactivated as be, onBeforeUnmount as Te, watchPostEffect as $e, nextTick as oe, createElementBlock as _, openBlock as f, Fragment as ne, createElementVNode as u, createBlock as Ce, normalizeClass as l, unref as t, Teleport as Me, createCommentVNode as Y, normalizeStyle as ke, createVNode as I, withCtx as ie, createTextVNode as Re, toDisplayString as ae, renderList as Ne, renderSlot as Ve, isVNode as Ae, h as Ee } from "vue";
|
|
2
|
+
import Ie from "../../../assets/svg/drag.svg.js";
|
|
3
|
+
import { TtIcon as De } from "../../tt-icon/index.js";
|
|
4
|
+
import { TtText as Se } from "../../tt-text/index.js";
|
|
5
|
+
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";
|
|
6
|
+
import { useDesign as He } from "../../../packages/hooks/src/useDesign.js";
|
|
7
7
|
import "axios";
|
|
8
|
-
import { useZIndex as
|
|
9
|
-
import { isString as
|
|
8
|
+
import { useZIndex as Oe, ElScrollbar as Pe } from "element-plus";
|
|
9
|
+
import { isString as ze, isFunction as le, isNullOrUnDef as Be, isArray as Fe, isObject as Xe } from "../../../packages/utils/src/is.js";
|
|
10
10
|
import "dayjs";
|
|
11
11
|
import "numeral";
|
|
12
12
|
import "xe-utils";
|
|
@@ -19,9 +19,9 @@ import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-
|
|
|
19
19
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
20
20
|
import "lodash-es";
|
|
21
21
|
import "vue-router";
|
|
22
|
-
import { useElementSize as
|
|
23
|
-
import { TT_NAV_ANCHOR_DRAG_VISIBLE_SIZE_PX as
|
|
24
|
-
const
|
|
22
|
+
import { useElementSize as Le, useDraggable as We } from "@vueuse/core";
|
|
23
|
+
import { TT_NAV_ANCHOR_DRAG_VISIBLE_SIZE_PX as D, TT_NAV_ANCHOR_ROOT_WIDTH_PX as y } from "./constants.js";
|
|
24
|
+
const Ze = ["tabindex"], Ye = ["onClick"], Ue = ["title"], gt = /* @__PURE__ */ ye({
|
|
25
25
|
name: "TtNavAnchor",
|
|
26
26
|
__name: "TtNavAnchor",
|
|
27
27
|
props: {
|
|
@@ -38,294 +38,267 @@ const qe = ["tabindex"], Je = ["onClick"], Ke = ["title"], xt = /* @__PURE__ */
|
|
|
38
38
|
collapseMode: {}
|
|
39
39
|
},
|
|
40
40
|
emits: ["change", "update:modelValue"],
|
|
41
|
-
setup(
|
|
42
|
-
var
|
|
43
|
-
const { prefixCls:
|
|
44
|
-
function
|
|
45
|
-
return
|
|
41
|
+
setup(c, { emit: re }) {
|
|
42
|
+
var te;
|
|
43
|
+
const { prefixCls: n } = He("nav-anchor"), o = c, U = re;
|
|
44
|
+
function se(e) {
|
|
45
|
+
return Be(e) || Ae(e) || Fe(e) ? e : Xe(e) || le(e) ? Ee(e) : e;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
const { title:
|
|
49
|
-
return
|
|
47
|
+
function ue(e) {
|
|
48
|
+
const { title: a } = e.row;
|
|
49
|
+
return se(le(a) ? a(e.row) : a);
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
let
|
|
53
|
-
|
|
54
|
-
() =>
|
|
51
|
+
const $ = h(o.modelValue || ((te = o.items[0]) == null ? void 0 : te.key) || ""), C = T(() => o.collapseMode), j = T(() => !!C.value), v = h(!1);
|
|
52
|
+
let x;
|
|
53
|
+
g(
|
|
54
|
+
() => o.modelValue,
|
|
55
55
|
(e) => {
|
|
56
|
-
e && (
|
|
56
|
+
e && ($.value = e);
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
|
-
function
|
|
60
|
-
|
|
59
|
+
function ce(e) {
|
|
60
|
+
$.value = e, U("update:modelValue", e), U("change", e);
|
|
61
61
|
}
|
|
62
62
|
function S() {
|
|
63
|
-
|
|
63
|
+
x && (clearTimeout(x), x = void 0);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
65
|
+
function G() {
|
|
66
|
+
C.value === "hover" && (S(), v.value = !0);
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
function q() {
|
|
69
|
+
C.value === "hover" && (S(), x = setTimeout(() => {
|
|
70
|
+
v.value = !1, x = void 0;
|
|
71
71
|
}, 180));
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
var
|
|
75
|
-
if (
|
|
76
|
-
|
|
73
|
+
function de(e) {
|
|
74
|
+
var a;
|
|
75
|
+
if (L(), N) {
|
|
76
|
+
N = !1;
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
C.value === "click" && (!v.value || (a = H.value) != null && a.contains(e.target)) && (v.value = !v.value);
|
|
80
80
|
}
|
|
81
|
-
const
|
|
82
|
-
function
|
|
83
|
-
return e == null ?
|
|
81
|
+
const w = Z("navRef"), H = Z("headerRef"), M = Z("sourceRef"), k = h(!0), O = h(o.teleportTo || null), { height: P } = Le(w);
|
|
82
|
+
function d(e, a) {
|
|
83
|
+
return e == null ? a : typeof e == "number" ? e : parseInt(e, 10) || a;
|
|
84
84
|
}
|
|
85
|
-
const
|
|
86
|
-
let
|
|
87
|
-
function
|
|
88
|
-
if (typeof window > "u") return { x: e, y:
|
|
89
|
-
const
|
|
90
|
-
return { x: Math.max(0, Math.min(e,
|
|
85
|
+
const R = h(!1);
|
|
86
|
+
let z = { x: 0, y: 0 }, N = !1;
|
|
87
|
+
function fe(e, a, i) {
|
|
88
|
+
if (typeof window > "u") return { x: e, y: a };
|
|
89
|
+
const s = Math.max(0, window.innerWidth - y), r = i > 0 ? Math.max(0, window.innerHeight - i) : window.innerHeight;
|
|
90
|
+
return { x: Math.max(0, Math.min(e, s)), y: Math.max(0, Math.min(a, r)) };
|
|
91
91
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
const e = k.value;
|
|
92
|
+
function J() {
|
|
93
|
+
const e = M.value;
|
|
95
94
|
return e ? e.closest(".el-dialog, .tt-ui-modal") : null;
|
|
96
95
|
}
|
|
97
|
-
function
|
|
98
|
-
var e;
|
|
99
|
-
return ((e = Z()) == null ? void 0 : e.closest(".el-overlay")) ?? null;
|
|
100
|
-
}
|
|
101
|
-
function _e(e) {
|
|
102
|
-
const n = e.style.zIndex || getComputedStyle(e).zIndex, t = Number.parseInt(n, 10);
|
|
103
|
-
return Number.isNaN(t) ? 0 : t;
|
|
104
|
-
}
|
|
105
|
-
function ee() {
|
|
106
|
-
const e = Q();
|
|
107
|
-
if (!e) return;
|
|
108
|
-
const n = _e(e);
|
|
109
|
-
if (x.value > n) return;
|
|
110
|
-
let t = A(), r = 0;
|
|
111
|
-
for (; t <= n && r < 2e3; )
|
|
112
|
-
t = A(), r += 1;
|
|
113
|
-
x.value = t;
|
|
114
|
-
}
|
|
115
|
-
function E(e) {
|
|
96
|
+
function V(e) {
|
|
116
97
|
if (typeof window > "u") return { x: 0, y: 0 };
|
|
117
|
-
const
|
|
118
|
-
let
|
|
119
|
-
if (
|
|
120
|
-
const
|
|
121
|
-
|
|
98
|
+
const a = J(), i = a == null ? void 0 : a.getBoundingClientRect();
|
|
99
|
+
let s, r;
|
|
100
|
+
if (i && i.width > 0) {
|
|
101
|
+
const W = d(o.left, 0), _e = d(o.right, 24);
|
|
102
|
+
o.left !== void 0 ? s = i.left - y - W : s = i.right + _e, o.top !== void 0 ? r = i.top + d(o.top, 0) : o.bottom !== void 0 ? r = e > 0 ? i.bottom - e - d(o.bottom, 24) : i.top : r = i.top;
|
|
122
103
|
} else
|
|
123
|
-
|
|
124
|
-
return
|
|
104
|
+
s = o.left !== void 0 ? d(o.left, 0) : window.innerWidth - y - d(o.right, 24), o.top !== void 0 ? r = d(o.top, 24) : o.bottom !== void 0 ? r = e > 0 ? window.innerHeight - e - d(o.bottom, 24) : 0 : r = 24;
|
|
105
|
+
return fe(s, r, e);
|
|
125
106
|
}
|
|
126
|
-
function
|
|
127
|
-
|
|
107
|
+
function A() {
|
|
108
|
+
R.value || o.position === "static" || (b.value = V(P.value));
|
|
128
109
|
}
|
|
129
|
-
let
|
|
130
|
-
function
|
|
131
|
-
|
|
110
|
+
let m, p;
|
|
111
|
+
function B() {
|
|
112
|
+
m == null || m.disconnect(), m = void 0, p == null || p.disconnect(), p = void 0;
|
|
132
113
|
}
|
|
133
|
-
function
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
function L() {
|
|
137
|
-
X();
|
|
138
|
-
const e = Z();
|
|
114
|
+
function F() {
|
|
115
|
+
B();
|
|
116
|
+
const e = J();
|
|
139
117
|
if (!e) {
|
|
140
|
-
|
|
118
|
+
A();
|
|
141
119
|
return;
|
|
142
120
|
}
|
|
143
|
-
|
|
144
|
-
v = new MutationObserver(V), v.observe(e, { attributes: !0, attributeFilter: ["style", "class"] });
|
|
145
|
-
const n = Q();
|
|
146
|
-
n && (m = new MutationObserver(V), m.observe(n, { attributes: !0, attributeFilter: ["style", "class"] }));
|
|
147
|
-
}
|
|
148
|
-
typeof ResizeObserver < "u" && (p = new ResizeObserver(V), p.observe(e));
|
|
121
|
+
A(), typeof MutationObserver < "u" && (m = new MutationObserver(() => A()), m.observe(e, { attributes: !0, attributeFilter: ["style", "class"] })), typeof ResizeObserver < "u" && (p = new ResizeObserver(() => A()), p.observe(e));
|
|
149
122
|
}
|
|
150
|
-
const {
|
|
151
|
-
style:
|
|
152
|
-
isDragging:
|
|
153
|
-
position:
|
|
154
|
-
} =
|
|
155
|
-
handle:
|
|
156
|
-
initialValue:
|
|
123
|
+
const { nextZIndex: K } = Oe(), X = h(K()), {
|
|
124
|
+
style: ve,
|
|
125
|
+
isDragging: me,
|
|
126
|
+
position: b
|
|
127
|
+
} = We(w, {
|
|
128
|
+
handle: H,
|
|
129
|
+
initialValue: V(0),
|
|
157
130
|
preventDefault: !0,
|
|
158
131
|
onStart() {
|
|
159
|
-
|
|
132
|
+
R.value = !0, z = { ...b.value }, N = !1, L();
|
|
160
133
|
},
|
|
161
134
|
onMove(e) {
|
|
162
|
-
if (typeof window > "u" || !
|
|
163
|
-
(Math.abs(e.x -
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
x: Math.max(
|
|
167
|
-
y: Math.max(
|
|
135
|
+
if (typeof window > "u" || !w.value) return;
|
|
136
|
+
(Math.abs(e.x - z.x) > 3 || Math.abs(e.y - z.y) > 3) && (N = !0);
|
|
137
|
+
const a = w.value.getBoundingClientRect(), i = Math.min(0, D - a.width), s = Math.max(0, document.documentElement.clientWidth - D), r = Math.min(0, D - a.height), W = Math.max(0, document.documentElement.clientHeight - D);
|
|
138
|
+
b.value = {
|
|
139
|
+
x: Math.max(i, Math.min(e.x, s)),
|
|
140
|
+
y: Math.max(r, Math.min(e.y, W))
|
|
168
141
|
};
|
|
169
142
|
}
|
|
170
143
|
});
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}),
|
|
174
|
-
|
|
144
|
+
g(P, (e) => {
|
|
145
|
+
R.value || e <= 0 || (b.value = V(e));
|
|
146
|
+
}), g([() => o.left, () => o.right, () => o.top, () => o.bottom], () => {
|
|
147
|
+
R.value = !1, b.value = V(P.value), F();
|
|
175
148
|
});
|
|
176
|
-
const
|
|
177
|
-
const e = { "--tt-nav-anchor-root-width": `${y}px`, zIndex:
|
|
178
|
-
if (
|
|
149
|
+
const pe = T(() => {
|
|
150
|
+
const e = { "--tt-nav-anchor-root-width": `${y}px`, zIndex: X.value };
|
|
151
|
+
if (o.position === "static")
|
|
179
152
|
return { "--tt-nav-anchor-root-width": `${y}px` };
|
|
180
|
-
const
|
|
181
|
-
return typeof
|
|
182
|
-
}),
|
|
183
|
-
function
|
|
184
|
-
if (
|
|
153
|
+
const a = ve.value;
|
|
154
|
+
return typeof a == "string" ? `${a};--tt-nav-anchor-root-width:${y}px;z-index:${X.value}` : [a, e];
|
|
155
|
+
}), he = T(() => o.position === "static" || !!O.value), Q = T(() => k.value && he.value);
|
|
156
|
+
function ge() {
|
|
157
|
+
if (o.teleportTo) return o.teleportTo;
|
|
185
158
|
if (typeof window > "u" || !window.__MICRO_APP_ENVIRONMENT__) return "body";
|
|
186
|
-
const e =
|
|
159
|
+
const e = M.value;
|
|
187
160
|
return e ? e.closest("micro-app, [data-v-app], #app") ?? "body" : "body";
|
|
188
161
|
}
|
|
189
|
-
function
|
|
190
|
-
|
|
162
|
+
function ee() {
|
|
163
|
+
O.value = ge();
|
|
191
164
|
}
|
|
192
|
-
function
|
|
193
|
-
|
|
165
|
+
function L() {
|
|
166
|
+
X.value = K();
|
|
194
167
|
}
|
|
195
|
-
function
|
|
196
|
-
|
|
168
|
+
function E() {
|
|
169
|
+
ee(), oe(() => F());
|
|
197
170
|
}
|
|
198
|
-
return
|
|
199
|
-
|
|
200
|
-
}),
|
|
201
|
-
|
|
202
|
-
}),
|
|
203
|
-
|
|
204
|
-
}),
|
|
205
|
-
S(),
|
|
206
|
-
}),
|
|
207
|
-
|
|
208
|
-
}),
|
|
209
|
-
() =>
|
|
171
|
+
return xe(() => {
|
|
172
|
+
E();
|
|
173
|
+
}), we(() => {
|
|
174
|
+
k.value = !0, E();
|
|
175
|
+
}), be(() => {
|
|
176
|
+
k.value = !1, B();
|
|
177
|
+
}), Te(() => {
|
|
178
|
+
S(), B();
|
|
179
|
+
}), g(M, () => {
|
|
180
|
+
E();
|
|
181
|
+
}), g(
|
|
182
|
+
() => o.teleportTo,
|
|
210
183
|
() => {
|
|
211
|
-
|
|
184
|
+
E();
|
|
212
185
|
}
|
|
213
|
-
),
|
|
214
|
-
|
|
215
|
-
}),
|
|
216
|
-
e &&
|
|
217
|
-
}), (e,
|
|
186
|
+
), $e(() => {
|
|
187
|
+
k.value && ee();
|
|
188
|
+
}), g(Q, (e) => {
|
|
189
|
+
e && oe(() => F());
|
|
190
|
+
}), (e, a) => (f(), _(ne, null, [
|
|
218
191
|
u("span", {
|
|
219
192
|
ref_key: "sourceRef",
|
|
220
|
-
ref:
|
|
221
|
-
class:
|
|
193
|
+
ref: M,
|
|
194
|
+
class: l(`${t(n)}__source`),
|
|
222
195
|
"aria-hidden": "true"
|
|
223
196
|
}, null, 2),
|
|
224
|
-
(
|
|
225
|
-
to:
|
|
226
|
-
disabled:
|
|
197
|
+
(f(), Ce(Me, {
|
|
198
|
+
to: O.value || "body",
|
|
199
|
+
disabled: c.position === "static"
|
|
227
200
|
}, [
|
|
228
|
-
|
|
201
|
+
Q.value ? (f(), _("div", {
|
|
229
202
|
key: 0,
|
|
230
203
|
ref_key: "navRef",
|
|
231
|
-
ref:
|
|
232
|
-
class:
|
|
233
|
-
|
|
234
|
-
{ [`${
|
|
235
|
-
{ [`${
|
|
236
|
-
{ [`${
|
|
204
|
+
ref: w,
|
|
205
|
+
class: l([
|
|
206
|
+
t(n),
|
|
207
|
+
{ [`${t(n)}--dragging`]: t(me) },
|
|
208
|
+
{ [`${t(n)}--collapse-on-hover`]: j.value },
|
|
209
|
+
{ [`${t(n)}--collapse-on-hover-expanded`]: v.value }
|
|
237
210
|
]),
|
|
238
|
-
style:
|
|
239
|
-
tabindex:
|
|
240
|
-
onMouseenter:
|
|
241
|
-
onMouseleave:
|
|
242
|
-
onFocusin:
|
|
243
|
-
onFocusout:
|
|
244
|
-
onClick:
|
|
211
|
+
style: ke(pe.value),
|
|
212
|
+
tabindex: j.value ? 0 : void 0,
|
|
213
|
+
onMouseenter: G,
|
|
214
|
+
onMouseleave: q,
|
|
215
|
+
onFocusin: G,
|
|
216
|
+
onFocusout: q,
|
|
217
|
+
onClick: de
|
|
245
218
|
}, [
|
|
246
219
|
u("div", {
|
|
247
220
|
ref_key: "headerRef",
|
|
248
|
-
ref:
|
|
249
|
-
class:
|
|
250
|
-
onClick:
|
|
221
|
+
ref: H,
|
|
222
|
+
class: l(`${t(n)}__header`),
|
|
223
|
+
onClick: L
|
|
251
224
|
}, [
|
|
252
|
-
|
|
253
|
-
class:
|
|
254
|
-
icon:
|
|
225
|
+
I(t(De), {
|
|
226
|
+
class: l(["opacity-0", `${t(n)}__drag-icon`]),
|
|
227
|
+
icon: t(Ie),
|
|
255
228
|
size: 16,
|
|
256
229
|
"is-custom-svg": ""
|
|
257
230
|
}, null, 8, ["icon", "class"]),
|
|
258
|
-
|
|
259
|
-
class:
|
|
231
|
+
I(t(Se), {
|
|
232
|
+
class: l(`${t(n)}__title`),
|
|
260
233
|
"tool-tip": !1
|
|
261
234
|
}, {
|
|
262
|
-
default:
|
|
263
|
-
|
|
235
|
+
default: ie(() => [
|
|
236
|
+
Re(ae(c.title), 1)
|
|
264
237
|
]),
|
|
265
238
|
_: 1
|
|
266
239
|
}, 8, ["class"])
|
|
267
240
|
], 2),
|
|
268
241
|
u("div", {
|
|
269
|
-
class:
|
|
242
|
+
class: l(`${t(n)}__body`)
|
|
270
243
|
}, [
|
|
271
|
-
|
|
244
|
+
I(t(Pe), {
|
|
272
245
|
tag: "ul",
|
|
273
|
-
"view-class": `${
|
|
246
|
+
"view-class": `${t(n)}__list`,
|
|
274
247
|
"max-height": 400
|
|
275
248
|
}, {
|
|
276
|
-
default:
|
|
277
|
-
(
|
|
278
|
-
key:
|
|
279
|
-
class:
|
|
249
|
+
default: ie(() => [
|
|
250
|
+
(f(!0), _(ne, null, Ne(c.items, (i, s) => (f(), _("li", {
|
|
251
|
+
key: i.key,
|
|
252
|
+
class: l(`${t(n)}__node`)
|
|
280
253
|
}, [
|
|
281
254
|
u("div", {
|
|
282
|
-
class:
|
|
255
|
+
class: l(`${t(n)}__content`)
|
|
283
256
|
}, [
|
|
284
257
|
u("div", {
|
|
285
|
-
class:
|
|
286
|
-
`${
|
|
287
|
-
{ [`${
|
|
288
|
-
{ [`${
|
|
258
|
+
class: l([
|
|
259
|
+
`${t(n)}__item`,
|
|
260
|
+
{ [`${t(n)}__item--active`]: $.value === i.key },
|
|
261
|
+
{ [`${t(n)}__item--error`]: c.badgeCounts[i.key] }
|
|
289
262
|
]),
|
|
290
|
-
onClick: (
|
|
263
|
+
onClick: (r) => ce(i.key)
|
|
291
264
|
}, [
|
|
292
|
-
|
|
265
|
+
c.badgeCounts[i.key] ? (f(), _("span", {
|
|
293
266
|
key: 0,
|
|
294
|
-
class:
|
|
295
|
-
},
|
|
267
|
+
class: l(`${t(n)}__badge`)
|
|
268
|
+
}, ae(c.badgeCounts[i.key]), 3)) : Y("", !0),
|
|
296
269
|
u("span", {
|
|
297
|
-
class:
|
|
270
|
+
class: l(`${t(n)}__item-main`)
|
|
298
271
|
}, [
|
|
299
272
|
u("span", {
|
|
300
|
-
class:
|
|
301
|
-
title:
|
|
273
|
+
class: l(`${t(n)}__item-text`),
|
|
274
|
+
title: t(ze)(i.title) ? i.title : void 0
|
|
302
275
|
}, [
|
|
303
|
-
|
|
304
|
-
], 10,
|
|
305
|
-
e.$slots.description ? (
|
|
276
|
+
I(ue, { row: i }, null, 8, ["row"])
|
|
277
|
+
], 10, Ue),
|
|
278
|
+
e.$slots.description ? (f(), _("span", {
|
|
306
279
|
key: 0,
|
|
307
|
-
class:
|
|
280
|
+
class: l(`${t(n)}__item-description`)
|
|
308
281
|
}, [
|
|
309
|
-
|
|
310
|
-
], 2)) :
|
|
282
|
+
Ve(e.$slots, "description", { row: i })
|
|
283
|
+
], 2)) : Y("", !0)
|
|
311
284
|
], 2)
|
|
312
|
-
], 10,
|
|
285
|
+
], 10, Ye)
|
|
313
286
|
], 2),
|
|
314
287
|
u("div", {
|
|
315
|
-
class:
|
|
288
|
+
class: l(`${t(n)}__rail`)
|
|
316
289
|
}, [
|
|
317
290
|
u("span", {
|
|
318
|
-
class:
|
|
291
|
+
class: l([`${t(n)}__line-slot`, { [`${t(n)}__line-slot--visible`]: s > 0 }])
|
|
319
292
|
}, null, 2),
|
|
320
293
|
u("span", {
|
|
321
|
-
class:
|
|
322
|
-
`${
|
|
323
|
-
{ [`${
|
|
324
|
-
{ [`${
|
|
294
|
+
class: l([
|
|
295
|
+
`${t(n)}__dot`,
|
|
296
|
+
{ [`${t(n)}__dot--active`]: $.value === i.key },
|
|
297
|
+
{ [`${t(n)}__dot--error`]: c.badgeCounts[i.key] }
|
|
325
298
|
])
|
|
326
299
|
}, null, 2),
|
|
327
300
|
u("span", {
|
|
328
|
-
class:
|
|
301
|
+
class: l([`${t(n)}__line-slot`, { [`${t(n)}__line-slot--visible`]: s < c.items.length - 1 }])
|
|
329
302
|
}, null, 2)
|
|
330
303
|
], 2)
|
|
331
304
|
], 2))), 128))
|
|
@@ -333,11 +306,11 @@ const qe = ["tabindex"], Je = ["onClick"], Ke = ["title"], xt = /* @__PURE__ */
|
|
|
333
306
|
_: 3
|
|
334
307
|
}, 8, ["view-class"])
|
|
335
308
|
], 2)
|
|
336
|
-
], 46,
|
|
309
|
+
], 46, Ze)) : Y("", !0)
|
|
337
310
|
], 8, ["to", "disabled"]))
|
|
338
311
|
], 64));
|
|
339
312
|
}
|
|
340
313
|
});
|
|
341
314
|
export {
|
|
342
|
-
|
|
315
|
+
gt as default
|
|
343
316
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Search as
|
|
1
|
+
import { defineComponent as x, computed as E, createElementBlock as k, openBlock as y, normalizeClass as r, createVNode as a, unref as n, withCtx as i } from "vue";
|
|
2
|
+
import { Search as C } from "@element-plus/icons-vue";
|
|
3
3
|
import { ElInput as v, ElIcon as b, ElTreeV2 as H } from "element-plus";
|
|
4
|
-
const T = 26, g = 320,
|
|
4
|
+
const T = 26, g = 320, w = 60, N = /* @__PURE__ */ x({
|
|
5
5
|
name: "PanelLeft",
|
|
6
6
|
__name: "PanelLeft",
|
|
7
7
|
props: {
|
|
@@ -12,51 +12,51 @@ const T = 26, g = 320, x = 60, D = /* @__PURE__ */ E({
|
|
|
12
12
|
leftPlaceholder: {}
|
|
13
13
|
},
|
|
14
14
|
emits: ["update:keyword", "select"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
var
|
|
19
|
-
return
|
|
20
|
-
}, 0), l =
|
|
21
|
-
return l ? Math.min(l * T, g) :
|
|
15
|
+
setup(e, { emit: u }) {
|
|
16
|
+
const f = e, o = u, m = E(() => {
|
|
17
|
+
const t = (d) => d.reduce((p, c) => {
|
|
18
|
+
var s;
|
|
19
|
+
return p + 1 + ((s = c.children) != null && s.length ? t(c.children) : 0);
|
|
20
|
+
}, 0), l = t(f.treeData);
|
|
21
|
+
return l ? Math.min(l * T, g) : w;
|
|
22
22
|
});
|
|
23
|
-
function
|
|
24
|
-
l.isLeaf && o("select",
|
|
23
|
+
function h(t, l) {
|
|
24
|
+
l.isLeaf && o("select", t);
|
|
25
25
|
}
|
|
26
|
-
return (
|
|
27
|
-
class:
|
|
26
|
+
return (t, l) => (y(), k("div", {
|
|
27
|
+
class: r(`${e.prefixCls}__left`)
|
|
28
28
|
}, [
|
|
29
|
-
|
|
29
|
+
a(n(v), {
|
|
30
30
|
"model-value": e.keyword,
|
|
31
|
-
class:
|
|
31
|
+
class: r(`${e.prefixCls}__search`),
|
|
32
32
|
placeholder: e.leftPlaceholder,
|
|
33
33
|
clearable: "",
|
|
34
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
34
|
+
"onUpdate:modelValue": l[0] || (l[0] = (d) => o("update:keyword", d))
|
|
35
35
|
}, {
|
|
36
36
|
prefix: i(() => [
|
|
37
|
-
|
|
37
|
+
a(n(b), null, {
|
|
38
38
|
default: i(() => [
|
|
39
|
-
|
|
39
|
+
a(n(C))
|
|
40
40
|
]),
|
|
41
41
|
_: 1
|
|
42
42
|
})
|
|
43
43
|
]),
|
|
44
44
|
_: 1
|
|
45
45
|
}, 8, ["model-value", "class", "placeholder"]),
|
|
46
|
-
|
|
47
|
-
class:
|
|
46
|
+
a(n(H), {
|
|
47
|
+
class: r(`${e.prefixCls}__tree`),
|
|
48
48
|
data: e.treeData,
|
|
49
49
|
props: { label: "label", children: "children", disabled: "disabled", value: "value" },
|
|
50
|
-
height:
|
|
50
|
+
height: m.value,
|
|
51
51
|
"node-key": "value",
|
|
52
52
|
"default-expanded-keys": e.expandedKeys,
|
|
53
53
|
"highlight-current": "",
|
|
54
54
|
"empty-text": "暂无数据",
|
|
55
|
-
onNodeClick:
|
|
55
|
+
onNodeClick: h
|
|
56
56
|
}, null, 8, ["class", "data", "height", "default-expanded-keys"])
|
|
57
57
|
], 2));
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
export {
|
|
61
|
-
|
|
61
|
+
N as default
|
|
62
62
|
};
|