china-mobile-international-custom-components 0.0.28 → 0.0.30
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/es/ApplicationIcon.mjs +30 -28
- package/es/PageContainer.mjs +178 -149
- package/es/assets/PageContainer.css +1 -1
- package/es/index.mjs +2 -2
- package/lib/ApplicationIcon.js +1 -1
- package/lib/PageContainer.js +1 -1
- package/lib/assets/PageContainer.css +1 -1
- package/lib/index.js +2 -2
- package/package.json +4 -4
- package/es/assets/AvailableRangePreview.css +0 -1
- package/es/assets/AvailableRangeSetting.css +0 -1
- package/es/assets/CustomSidebar.css +0 -1
- package/es/chunks/AvailableRangePreview.D4mZe1lQ.js +0 -217
- package/es/chunks/AvailableRangeSetting.BkSLnQ6N.js +0 -215
- package/es/chunks/CustomSidebar.BWGoPtLi.js +0 -506
- package/es/chunks/CustomTitle.BLZ7evms.js +0 -5
- package/es/chunks/CustomToggle.CP3M2_f3.js +0 -165
- package/es/chunks/PageContainer.D-G32lvP.js +0 -329
- package/es/chunks/_plugin-vue_export-helper.CVVE_0_F.js +0 -13
- package/es/chunks/_plugin-vue_export-helper.Cf-_TWPK.js +0 -6
- package/es/chunks/index.39AUVSwV.js +0 -288
- package/es/chunks/index.AHEDCg43.js +0 -160
- package/es/chunks/index.B67AnSJI.js +0 -154
- package/es/chunks/index.B9F4VYQK.js +0 -118
- package/es/chunks/index.BPxF6Amx.js +0 -157
- package/es/chunks/index.C2gKjqoA.js +0 -209
- package/es/chunks/index.DTtNnKDH.js +0 -288
- package/es/chunks/index.DtBeJlu6.js +0 -142
- package/es/chunks/index.kR57MtNP.js +0 -211
- package/es/chunks/index.wQj5YKPy.js +0 -288
- package/es/chunks/layout.BE8_kCeR.js +0 -619
- package/es/chunks/layout.BNqqXOrs.js +0 -639
- package/es/chunks/layout.C6AMos7n.js +0 -17
- package/es/chunks/layout.CWFXohJu.js +0 -622
- package/es/chunks/layout.ClkgLsEw.js +0 -640
- package/es/chunks/layout.R5FQNRjS.js +0 -619
- package/es/chunks/layout.nKB_kc-U.js +0 -26
- package/es/chunks/utils.BhlZXNZ6.js +0 -19
- package/lib/assets/AvailableRangePreview.css +0 -1
- package/lib/assets/AvailableRangeSetting.css +0 -1
- package/lib/assets/CustomSidebar.css +0 -1
- package/lib/chunks/AvailableRangePreview.CkgZsXP0.js +0 -1
- package/lib/chunks/AvailableRangeSetting.CF-jHm4x.js +0 -1
- package/lib/chunks/CustomSidebar.CMYJFb2P.js +0 -1
- package/lib/chunks/CustomTitle.BkFZ-ZIq.js +0 -1
- package/lib/chunks/CustomToggle.C0PpzKPP.js +0 -1
- package/lib/chunks/PageContainer.GH56wASV.js +0 -1
- package/lib/chunks/_plugin-vue_export-helper.C55-DZV2.js +0 -1
- package/lib/chunks/_plugin-vue_export-helper.DAGvX2Jf.js +0 -1
- package/lib/chunks/index.BfHfKST0.js +0 -1
- package/lib/chunks/index.BlXappa4.js +0 -1
- package/lib/chunks/index.CCxHaoi4.js +0 -1
- package/lib/chunks/index.CSYGhK9M.js +0 -1
- package/lib/chunks/index.C_IlZrzE.js +0 -1
- package/lib/chunks/index.DUGtabLJ.js +0 -1
- package/lib/chunks/index.Dakz8S3g.js +0 -1
- package/lib/chunks/index.DsmgWFv8.js +0 -1
- package/lib/chunks/index.DydPD8Lc.js +0 -1
- package/lib/chunks/index.k_hSuA6i.js +0 -1
- package/lib/chunks/layout.BEW4Cgni.js +0 -1
- package/lib/chunks/layout.BJjU9nKW.js +0 -1
- package/lib/chunks/layout.BQigNrr5.js +0 -1
- package/lib/chunks/layout.ClFtiz-t.js +0 -1
- package/lib/chunks/layout.CmDwUHZo.js +0 -1
- package/lib/chunks/layout.CqbDoD_v.js +0 -1
- package/lib/chunks/layout.CwJgDGuR.js +0 -1
- package/lib/chunks/layout.D0zeFdw9.js +0 -1
- package/lib/chunks/utils.BT5Uuz2Q.js +0 -1
|
@@ -1,622 +0,0 @@
|
|
|
1
|
-
import { resolveComponent as D, createElementBlock as g, openBlock as c, createCommentVNode as x, createElementVNode as y, createBlock as b, createVNode as h, withCtx as v, resolveDynamicComponent as I, normalizeStyle as C, toDisplayString as N, ref as A, watch as $, nextTick as P, unref as m, normalizeClass as F, withModifiers as U, Fragment as E, renderList as B, Transition as K, withDirectives as H, vShow as V } from "vue";
|
|
2
|
-
import { _ as k } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
3
|
-
import { ElAutoResizer as G, ElTreeV2 as Y, ElIcon as L } from "element-plus";
|
|
4
|
-
import { IconRenderer as W, iconLibraryMap as q } from "color-star-custom-components";
|
|
5
|
-
import '../assets/layout2.css';const J = { class: "nav-title overflow-hidden" }, Q = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "title-logo"
|
|
8
|
-
}, X = /* @__PURE__ */ Object.assign({
|
|
9
|
-
name: "NavTitle"
|
|
10
|
-
}, {
|
|
11
|
-
__name: "NavTitle",
|
|
12
|
-
props: {
|
|
13
|
-
// 标题文本
|
|
14
|
-
title: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: ""
|
|
17
|
-
},
|
|
18
|
-
// Logo 图标组件
|
|
19
|
-
logo: {
|
|
20
|
-
type: [Object, String],
|
|
21
|
-
default: null
|
|
22
|
-
},
|
|
23
|
-
// Logo 尺寸
|
|
24
|
-
logoSize: {
|
|
25
|
-
type: Number,
|
|
26
|
-
default: 30
|
|
27
|
-
},
|
|
28
|
-
// 标题样式
|
|
29
|
-
titleStyle: {
|
|
30
|
-
type: Object,
|
|
31
|
-
default: () => ({ fontSize: "16px" })
|
|
32
|
-
},
|
|
33
|
-
// 是否显示折叠按钮
|
|
34
|
-
showToggle: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: !0
|
|
37
|
-
},
|
|
38
|
-
// 折叠按钮图标
|
|
39
|
-
toggleIcon: {
|
|
40
|
-
type: [Object, String],
|
|
41
|
-
default: null
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
emits: ["toggle"],
|
|
45
|
-
setup(e, { emit: n }) {
|
|
46
|
-
const t = n, l = () => {
|
|
47
|
-
t("toggle");
|
|
48
|
-
};
|
|
49
|
-
return (o, f) => {
|
|
50
|
-
const s = D("el-icon");
|
|
51
|
-
return c(), g("div", J, [
|
|
52
|
-
e.logo ? (c(), g("div", Q, [
|
|
53
|
-
h(s, { size: e.logoSize }, {
|
|
54
|
-
default: v(() => [
|
|
55
|
-
(c(), b(I(e.logo)))
|
|
56
|
-
]),
|
|
57
|
-
_: 1
|
|
58
|
-
}, 8, ["size"])
|
|
59
|
-
])) : x("", !0),
|
|
60
|
-
y("span", {
|
|
61
|
-
class: "weight-500 text-1f2329 title-text",
|
|
62
|
-
style: C(e.titleStyle)
|
|
63
|
-
}, N(e.title), 5),
|
|
64
|
-
e.showToggle ? (c(), b(s, {
|
|
65
|
-
key: 1,
|
|
66
|
-
size: 20,
|
|
67
|
-
class: "collapse-unfold-icon",
|
|
68
|
-
onClick: l
|
|
69
|
-
}, {
|
|
70
|
-
default: v(() => [
|
|
71
|
-
(c(), b(I(e.toggleIcon)))
|
|
72
|
-
]),
|
|
73
|
-
_: 1
|
|
74
|
-
})) : x("", !0)
|
|
75
|
-
]);
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
}), Z = /* @__PURE__ */ k(X, [["__scopeId", "data-v-05e70761"]]), z = {
|
|
79
|
-
DIR: "DIR",
|
|
80
|
-
// 目录
|
|
81
|
-
MENU: "MENU",
|
|
82
|
-
// 菜单
|
|
83
|
-
BUTTON: "BUTTON"
|
|
84
|
-
// 按钮
|
|
85
|
-
}, _ = /* @__PURE__ */ new Map([
|
|
86
|
-
["active", "#3271FE"],
|
|
87
|
-
["parent_active", "#3271FE"],
|
|
88
|
-
["normal", "#666666"]
|
|
89
|
-
]), ee = (e, n) => !Array.isArray(e) || !n ? !1 : e.some((t) => t.path === n ? !0 : t.children?.length > 0 ? ee(t.children, n) : !1), te = (e, n = 1) => e.filter((l) => [z.DIR, z.MENU].includes(l.type)).map((l) => ({
|
|
90
|
-
...l,
|
|
91
|
-
id: l.bnid,
|
|
92
|
-
name: l.name,
|
|
93
|
-
path: l?.path || "",
|
|
94
|
-
children: l.children?.length > 0 ? te(l.children || [], n + 1) : [],
|
|
95
|
-
level: n
|
|
96
|
-
})), ne = (e, n) => e?.children?.length ? e.children.some(
|
|
97
|
-
(t) => t?.path === n || t.children?.length && ne(t, n)
|
|
98
|
-
) : !1, O = (e, n) => e?.children?.length ? e.children.some(
|
|
99
|
-
(t) => t?.id === n || t.children?.length && O(t, n)
|
|
100
|
-
) : !1, le = (e, n) => {
|
|
101
|
-
const t = e?.id === n, l = O(e, n);
|
|
102
|
-
let o = "normal";
|
|
103
|
-
return t ? o = "active" : l && (o = "parent_active"), _.get(o);
|
|
104
|
-
}, Te = (e, n) => e.includes(n) ? e : [...e, n], ze = (e, n) => e.filter((t) => t !== n), oe = (e, n, t = []) => e.some((l) => {
|
|
105
|
-
if (l?.path === n)
|
|
106
|
-
return !0;
|
|
107
|
-
if (l.children?.length > 0) {
|
|
108
|
-
t.push(l.id);
|
|
109
|
-
const o = oe(l.children, n, t);
|
|
110
|
-
return o || t.pop(), o;
|
|
111
|
-
}
|
|
112
|
-
return !1;
|
|
113
|
-
}), j = (e, n, t = []) => e.some((l) => {
|
|
114
|
-
if (l?.id === n)
|
|
115
|
-
return !0;
|
|
116
|
-
if (l.children?.length > 0) {
|
|
117
|
-
t.push(l.id);
|
|
118
|
-
const o = j(l.children, n, t);
|
|
119
|
-
return o || t.pop(), o;
|
|
120
|
-
}
|
|
121
|
-
return !1;
|
|
122
|
-
}), Me = (e, n) => {
|
|
123
|
-
const t = [];
|
|
124
|
-
return j(e, n, t), t;
|
|
125
|
-
}, ie = (e, n) => {
|
|
126
|
-
if (!Array.isArray(e) || !n) return null;
|
|
127
|
-
for (const t of e) {
|
|
128
|
-
if (t.path === n)
|
|
129
|
-
return t;
|
|
130
|
-
if (t.children?.length > 0) {
|
|
131
|
-
const l = ie(t.children, n);
|
|
132
|
-
if (l) return l;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return null;
|
|
136
|
-
}, re = (e) => Array.isArray(e) ? e.map((n) => {
|
|
137
|
-
const t = { ...n };
|
|
138
|
-
return t.children && Array.isArray(t.children) && t.children.length > 0 ? t.children = re(t.children) : t.isLeaf = !0, t;
|
|
139
|
-
}) : [], ce = (e) => {
|
|
140
|
-
if (!Array.isArray(e) || e.length === 0) return null;
|
|
141
|
-
for (const n of e) {
|
|
142
|
-
if (n.isLeaf && n.path)
|
|
143
|
-
return n;
|
|
144
|
-
if (n.children?.length > 0) {
|
|
145
|
-
const t = ce(n.children);
|
|
146
|
-
if (t) return t;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
return null;
|
|
150
|
-
}, Ce = ["/404", "/login", "/unauthorized"], w = {
|
|
151
|
-
label: "name",
|
|
152
|
-
children: "children",
|
|
153
|
-
isLeaf: "isLeaf"
|
|
154
|
-
}, M = {
|
|
155
|
-
PARENT: "parent",
|
|
156
|
-
LEAF: "leaf"
|
|
157
|
-
}, je = {
|
|
158
|
-
IDLE: "idle",
|
|
159
|
-
LOADING: "loading",
|
|
160
|
-
LOADED: "loaded",
|
|
161
|
-
ERROR: "error"
|
|
162
|
-
}, se = { class: "node-label" }, ae = ["onClick"], ue = /* @__PURE__ */ Object.assign({
|
|
163
|
-
name: "MenuList"
|
|
164
|
-
}, {
|
|
165
|
-
__name: "MenuList",
|
|
166
|
-
props: {
|
|
167
|
-
// 菜单数据(已处理好的树形结构)
|
|
168
|
-
menuData: {
|
|
169
|
-
type: Array,
|
|
170
|
-
default: () => []
|
|
171
|
-
},
|
|
172
|
-
// 当前选中的菜单ID
|
|
173
|
-
currentMenuId: {
|
|
174
|
-
type: String,
|
|
175
|
-
default: null
|
|
176
|
-
},
|
|
177
|
-
// 展开的节点ID数组
|
|
178
|
-
expandedKeys: {
|
|
179
|
-
type: Array,
|
|
180
|
-
default: () => []
|
|
181
|
-
},
|
|
182
|
-
// 树形组件配置
|
|
183
|
-
treeProps: {
|
|
184
|
-
type: Object,
|
|
185
|
-
default: () => w
|
|
186
|
-
},
|
|
187
|
-
// 菜单项高度
|
|
188
|
-
itemHeight: {
|
|
189
|
-
type: Number,
|
|
190
|
-
default: 36
|
|
191
|
-
},
|
|
192
|
-
// 缩进距离
|
|
193
|
-
indent: {
|
|
194
|
-
type: Number,
|
|
195
|
-
default: 24
|
|
196
|
-
},
|
|
197
|
-
// 图标大小
|
|
198
|
-
iconSize: {
|
|
199
|
-
type: Number,
|
|
200
|
-
default: 16
|
|
201
|
-
},
|
|
202
|
-
// 展开图标组件
|
|
203
|
-
expandedIcon: {
|
|
204
|
-
type: [Object, String],
|
|
205
|
-
default: null
|
|
206
|
-
},
|
|
207
|
-
// 收起图标组件
|
|
208
|
-
collapsedIcon: {
|
|
209
|
-
type: [Object, String],
|
|
210
|
-
default: null
|
|
211
|
-
}
|
|
212
|
-
// 图标渲染器组件(可选)
|
|
213
|
-
// iconRenderer: {
|
|
214
|
-
// type: [Object, String],
|
|
215
|
-
// default: null,
|
|
216
|
-
// },
|
|
217
|
-
// // 图标库配置
|
|
218
|
-
// iconLibrary: {
|
|
219
|
-
// type: [String, Object],
|
|
220
|
-
// default: null,
|
|
221
|
-
// },
|
|
222
|
-
},
|
|
223
|
-
emits: ["node-click", "node-expand", "node-collapse"],
|
|
224
|
-
setup(e, { emit: n }) {
|
|
225
|
-
const t = e, l = n, o = A(null), f = (i) => i?.icon && i.level === 1 || !i.isLeaf, s = (i) => le(i, t.currentMenuId), p = (i) => {
|
|
226
|
-
const S = i.isLeaf ? M.LEAF : M.PARENT;
|
|
227
|
-
l("node-click", i, S);
|
|
228
|
-
}, a = (i) => {
|
|
229
|
-
l("node-expand", i.id, i);
|
|
230
|
-
}, r = (i) => {
|
|
231
|
-
l("node-collapse", i.id, i);
|
|
232
|
-
}, u = (i) => {
|
|
233
|
-
if (!o.value) return;
|
|
234
|
-
t.expandedKeys.includes(i.data.id) ? o.value.collapseNode(i) : o.value.expandNode(i);
|
|
235
|
-
};
|
|
236
|
-
return $(
|
|
237
|
-
() => t.expandedKeys,
|
|
238
|
-
(i) => {
|
|
239
|
-
P(() => {
|
|
240
|
-
o.value && o.value.setExpandedKeys([...i]);
|
|
241
|
-
});
|
|
242
|
-
},
|
|
243
|
-
{ deep: !0 }
|
|
244
|
-
), (i, S) => (c(), b(m(G), { class: "flex-1 overflow-hidden" }, {
|
|
245
|
-
default: v(({ height: R }) => [
|
|
246
|
-
h(m(Y), {
|
|
247
|
-
ref_key: "treeRef",
|
|
248
|
-
ref: o,
|
|
249
|
-
"node-key": "id",
|
|
250
|
-
data: e.menuData,
|
|
251
|
-
props: e.treeProps,
|
|
252
|
-
height: R,
|
|
253
|
-
"current-node-key": e.currentMenuId,
|
|
254
|
-
"highlight-current": !0,
|
|
255
|
-
"expanded-keys": e.expandedKeys,
|
|
256
|
-
"show-checkbox": !1,
|
|
257
|
-
"item-size": e.itemHeight,
|
|
258
|
-
"expand-on-click-node": !1,
|
|
259
|
-
indent: e.indent,
|
|
260
|
-
onNodeClick: p,
|
|
261
|
-
onNodeExpand: a,
|
|
262
|
-
onNodeCollapse: r,
|
|
263
|
-
class: "custom-tree"
|
|
264
|
-
}, {
|
|
265
|
-
default: v(({ node: T, data: d }) => [
|
|
266
|
-
y("div", {
|
|
267
|
-
class: F(["tree-node-content-custom", {
|
|
268
|
-
"has-children": !d.isLeaf,
|
|
269
|
-
"is-current": d.id === e.currentMenuId && d.isLeaf,
|
|
270
|
-
"is-parent-active": m(O)(d, e.currentMenuId) && !d.isLeaf
|
|
271
|
-
}])
|
|
272
|
-
}, [
|
|
273
|
-
f(d) ? (c(), b(m(L), {
|
|
274
|
-
key: 0,
|
|
275
|
-
size: e.iconSize,
|
|
276
|
-
class: "node-icon",
|
|
277
|
-
color: s(d)
|
|
278
|
-
}, {
|
|
279
|
-
default: v(() => [
|
|
280
|
-
h(m(W), {
|
|
281
|
-
"icon-name": d?.icon,
|
|
282
|
-
"icon-library": m(q).aibox
|
|
283
|
-
}, null, 8, ["icon-name", "icon-library"])
|
|
284
|
-
]),
|
|
285
|
-
_: 2
|
|
286
|
-
}, 1032, ["size", "color"])) : x("", !0),
|
|
287
|
-
y("span", se, N(T.label), 1),
|
|
288
|
-
d.isLeaf ? x("", !0) : (c(), g("div", {
|
|
289
|
-
key: 1,
|
|
290
|
-
class: "expand-arrow",
|
|
291
|
-
onClick: U((Se) => u(T), ["stop"])
|
|
292
|
-
}, [
|
|
293
|
-
h(m(L), {
|
|
294
|
-
size: e.iconSize,
|
|
295
|
-
color: s(d)
|
|
296
|
-
}, {
|
|
297
|
-
default: v(() => [
|
|
298
|
-
(c(), b(I(
|
|
299
|
-
e.expandedKeys.includes(d.id) ? e.expandedIcon : e.collapsedIcon
|
|
300
|
-
)))
|
|
301
|
-
]),
|
|
302
|
-
_: 2
|
|
303
|
-
}, 1032, ["size", "color"])
|
|
304
|
-
], 8, ae))
|
|
305
|
-
], 2)
|
|
306
|
-
]),
|
|
307
|
-
_: 1
|
|
308
|
-
}, 8, ["data", "props", "height", "current-node-key", "expanded-keys", "item-size", "indent"])
|
|
309
|
-
]),
|
|
310
|
-
_: 1
|
|
311
|
-
}));
|
|
312
|
-
}
|
|
313
|
-
}), de = /* @__PURE__ */ k(ue, [["__scopeId", "data-v-0a105c70"]]), fe = { class: "user-popup-content" }, pe = ["onClick"], ye = /* @__PURE__ */ Object.assign({
|
|
314
|
-
name: "UserPopup"
|
|
315
|
-
}, {
|
|
316
|
-
__name: "UserPopup",
|
|
317
|
-
props: {
|
|
318
|
-
// 操作列表配置
|
|
319
|
-
actions: {
|
|
320
|
-
type: Array,
|
|
321
|
-
default: () => [],
|
|
322
|
-
validator: (e) => e.every(
|
|
323
|
-
(n) => n.key && n.label && (n.icon || n.iconName)
|
|
324
|
-
)
|
|
325
|
-
}
|
|
326
|
-
},
|
|
327
|
-
emits: ["action-click"],
|
|
328
|
-
setup(e, { emit: n }) {
|
|
329
|
-
const t = n, l = (o) => {
|
|
330
|
-
t("action-click", o.key, o);
|
|
331
|
-
};
|
|
332
|
-
return (o, f) => (c(), g("div", fe, [
|
|
333
|
-
(c(!0), g(E, null, B(e.actions, (s, p) => (c(), g(E, { key: p }, [
|
|
334
|
-
s.hidden ? x("", !0) : (c(), g("div", {
|
|
335
|
-
key: 0,
|
|
336
|
-
class: "list__item",
|
|
337
|
-
onClick: (a) => l(s)
|
|
338
|
-
}, [
|
|
339
|
-
h(m(L), {
|
|
340
|
-
class: "list__item-icon",
|
|
341
|
-
size: s.iconSize || 20,
|
|
342
|
-
color: "#262626"
|
|
343
|
-
}, {
|
|
344
|
-
default: v(() => [
|
|
345
|
-
(c(), b(I(s.icon)))
|
|
346
|
-
]),
|
|
347
|
-
_: 2
|
|
348
|
-
}, 1032, ["size"]),
|
|
349
|
-
y("span", null, N(s.label), 1)
|
|
350
|
-
], 8, pe))
|
|
351
|
-
], 64))), 128))
|
|
352
|
-
]));
|
|
353
|
-
}
|
|
354
|
-
}), ge = /* @__PURE__ */ k(ye, [["__scopeId", "data-v-e35d3c80"]]), he = { class: "navbar-box__footer__left" }, me = { class: "name-first" }, ve = { class: "name-text" }, be = { class: "user-id" }, xe = /* @__PURE__ */ Object.assign({
|
|
355
|
-
name: "NavFooter"
|
|
356
|
-
}, {
|
|
357
|
-
__name: "NavFooter",
|
|
358
|
-
props: {
|
|
359
|
-
// 用户信息
|
|
360
|
-
userInfo: {
|
|
361
|
-
type: Object,
|
|
362
|
-
default: null,
|
|
363
|
-
validator: (e) => e ? e.name !== void 0 : !0
|
|
364
|
-
},
|
|
365
|
-
// 用户操作列表
|
|
366
|
-
actions: {
|
|
367
|
-
type: Array,
|
|
368
|
-
default: () => []
|
|
369
|
-
},
|
|
370
|
-
// 弹窗显示延迟(毫秒)
|
|
371
|
-
popupDelay: {
|
|
372
|
-
type: Number,
|
|
373
|
-
default: 200
|
|
374
|
-
},
|
|
375
|
-
// 弹窗左侧位置(像素)
|
|
376
|
-
popupLeft: {
|
|
377
|
-
type: Number,
|
|
378
|
-
default: 240
|
|
379
|
-
}
|
|
380
|
-
},
|
|
381
|
-
emits: ["action-click"],
|
|
382
|
-
setup(e, { emit: n }) {
|
|
383
|
-
const t = e, l = n, o = A(null), f = A(!1), s = (r) => r && r[0] ? r[0] : "", p = (r) => {
|
|
384
|
-
r || (o.value = setTimeout(() => {
|
|
385
|
-
f.value = !1;
|
|
386
|
-
}, t.popupDelay)), r && (f.value = r, clearTimeout(o.value));
|
|
387
|
-
}, a = (r, u) => {
|
|
388
|
-
f.value = !1, l("action-click", r, u);
|
|
389
|
-
};
|
|
390
|
-
return (r, u) => (c(), g(E, null, [
|
|
391
|
-
e.userInfo ? (c(), g("div", {
|
|
392
|
-
key: 0,
|
|
393
|
-
class: "navbar-box__footer",
|
|
394
|
-
onMouseenter: u[0] || (u[0] = (i) => p(!0)),
|
|
395
|
-
onMouseleave: u[1] || (u[1] = (i) => p(!1))
|
|
396
|
-
}, [
|
|
397
|
-
y("div", he, [
|
|
398
|
-
y("div", me, N(s(e.userInfo?.name)), 1),
|
|
399
|
-
y("div", null, [
|
|
400
|
-
y("div", ve, N(e.userInfo?.name), 1),
|
|
401
|
-
y("div", be, N(e.userInfo?.bnid || e.userInfo?.id || ""), 1)
|
|
402
|
-
])
|
|
403
|
-
])
|
|
404
|
-
], 32)) : x("", !0),
|
|
405
|
-
h(K, { name: "fade" }, {
|
|
406
|
-
default: v(() => [
|
|
407
|
-
H(y("div", {
|
|
408
|
-
class: "footer-popup content-bg",
|
|
409
|
-
style: C({ left: e.popupLeft + "px" }),
|
|
410
|
-
onMouseenter: u[2] || (u[2] = (i) => p(!0)),
|
|
411
|
-
onMouseleave: u[3] || (u[3] = (i) => p(!1))
|
|
412
|
-
}, [
|
|
413
|
-
h(ge, {
|
|
414
|
-
actions: e.actions,
|
|
415
|
-
onActionClick: a
|
|
416
|
-
}, null, 8, ["actions"])
|
|
417
|
-
], 36), [
|
|
418
|
-
[V, f.value]
|
|
419
|
-
])
|
|
420
|
-
]),
|
|
421
|
-
_: 1
|
|
422
|
-
})
|
|
423
|
-
], 64));
|
|
424
|
-
}
|
|
425
|
-
}), Ne = /* @__PURE__ */ k(xe, [["__scopeId", "data-v-d1e53517"]]), ke = { class: "sidebar h-full pd-l-12 pd-r-12 flex flex-col overflow-hidden" }, Ie = /* @__PURE__ */ Object.assign({
|
|
426
|
-
name: "CustomSidebar"
|
|
427
|
-
}, {
|
|
428
|
-
__name: "layout",
|
|
429
|
-
props: {
|
|
430
|
-
// ========== 菜单数据 ==========
|
|
431
|
-
// 菜单树数据(已处理好的树形结构)
|
|
432
|
-
menuData: {
|
|
433
|
-
type: Array,
|
|
434
|
-
default: () => []
|
|
435
|
-
},
|
|
436
|
-
// 当前选中的菜单ID
|
|
437
|
-
currentMenuId: {
|
|
438
|
-
type: String,
|
|
439
|
-
default: null
|
|
440
|
-
},
|
|
441
|
-
// 展开的节点ID数组
|
|
442
|
-
expandedKeys: {
|
|
443
|
-
type: Array,
|
|
444
|
-
default: () => []
|
|
445
|
-
},
|
|
446
|
-
// ========== 头部配置 ==========
|
|
447
|
-
// 标题文本
|
|
448
|
-
title: {
|
|
449
|
-
type: String,
|
|
450
|
-
default: ""
|
|
451
|
-
},
|
|
452
|
-
// Logo 图标组件
|
|
453
|
-
logo: {
|
|
454
|
-
type: [Object, String],
|
|
455
|
-
default: null
|
|
456
|
-
},
|
|
457
|
-
// Logo 尺寸
|
|
458
|
-
logoSize: {
|
|
459
|
-
type: Number,
|
|
460
|
-
default: 30
|
|
461
|
-
},
|
|
462
|
-
// 是否显示折叠按钮
|
|
463
|
-
showToggle: {
|
|
464
|
-
type: Boolean,
|
|
465
|
-
default: !0
|
|
466
|
-
},
|
|
467
|
-
// 折叠按钮图标
|
|
468
|
-
toggleIcon: {
|
|
469
|
-
type: [Object, String],
|
|
470
|
-
default: null
|
|
471
|
-
},
|
|
472
|
-
// ========== 菜单配置 ==========
|
|
473
|
-
// 树形组件配置
|
|
474
|
-
treeProps: {
|
|
475
|
-
type: Object,
|
|
476
|
-
default: () => w
|
|
477
|
-
},
|
|
478
|
-
// 菜单项高度
|
|
479
|
-
itemHeight: {
|
|
480
|
-
type: Number,
|
|
481
|
-
default: 36
|
|
482
|
-
},
|
|
483
|
-
// 缩进距离
|
|
484
|
-
indent: {
|
|
485
|
-
type: Number,
|
|
486
|
-
default: 24
|
|
487
|
-
},
|
|
488
|
-
// 图标大小
|
|
489
|
-
iconSize: {
|
|
490
|
-
type: Number,
|
|
491
|
-
default: 16
|
|
492
|
-
},
|
|
493
|
-
// 标题样式
|
|
494
|
-
titleStyle: {
|
|
495
|
-
type: Object,
|
|
496
|
-
default: () => ({ fontSize: "16px" })
|
|
497
|
-
},
|
|
498
|
-
// 展开图标组件
|
|
499
|
-
expandedIcon: {
|
|
500
|
-
type: [Object, String],
|
|
501
|
-
default: null
|
|
502
|
-
},
|
|
503
|
-
// 收起图标组件
|
|
504
|
-
collapsedIcon: {
|
|
505
|
-
type: [Object, String],
|
|
506
|
-
default: null
|
|
507
|
-
},
|
|
508
|
-
// 图标渲染器组件
|
|
509
|
-
iconRenderer: {
|
|
510
|
-
type: [Object, String],
|
|
511
|
-
default: null
|
|
512
|
-
},
|
|
513
|
-
// 图标库配置
|
|
514
|
-
iconLibrary: {
|
|
515
|
-
type: [String, Object],
|
|
516
|
-
default: null
|
|
517
|
-
},
|
|
518
|
-
// ========== 底部配置 ==========
|
|
519
|
-
// 是否显示底部
|
|
520
|
-
showFooter: {
|
|
521
|
-
type: Boolean,
|
|
522
|
-
default: !0
|
|
523
|
-
},
|
|
524
|
-
// 用户信息
|
|
525
|
-
userInfo: {
|
|
526
|
-
type: Object,
|
|
527
|
-
default: null
|
|
528
|
-
},
|
|
529
|
-
// 用户操作列表
|
|
530
|
-
userActions: {
|
|
531
|
-
type: Array,
|
|
532
|
-
default: () => []
|
|
533
|
-
},
|
|
534
|
-
// 弹窗显示延迟
|
|
535
|
-
popupDelay: {
|
|
536
|
-
type: Number,
|
|
537
|
-
default: 200
|
|
538
|
-
},
|
|
539
|
-
// 弹窗左侧位置(像素)
|
|
540
|
-
popupLeft: {
|
|
541
|
-
type: Number,
|
|
542
|
-
default: 240
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
emits: [
|
|
546
|
-
"toggle",
|
|
547
|
-
"node-click",
|
|
548
|
-
"node-expand",
|
|
549
|
-
"node-collapse",
|
|
550
|
-
"user-action-click"
|
|
551
|
-
],
|
|
552
|
-
setup(e, { emit: n }) {
|
|
553
|
-
const t = n, l = () => {
|
|
554
|
-
t("toggle");
|
|
555
|
-
}, o = (a, r) => {
|
|
556
|
-
t("node-click", a, r);
|
|
557
|
-
}, f = (a, r) => {
|
|
558
|
-
t("node-expand", a, r);
|
|
559
|
-
}, s = (a, r) => {
|
|
560
|
-
t("node-collapse", a, r);
|
|
561
|
-
}, p = (a, r) => {
|
|
562
|
-
t("user-action-click", a, r);
|
|
563
|
-
};
|
|
564
|
-
return (a, r) => (c(), g("div", ke, [
|
|
565
|
-
h(Z, {
|
|
566
|
-
"title-style": e.titleStyle,
|
|
567
|
-
title: e.title,
|
|
568
|
-
logo: e.logo,
|
|
569
|
-
"logo-size": e.logoSize,
|
|
570
|
-
"show-toggle": e.showToggle,
|
|
571
|
-
"toggle-icon": e.toggleIcon,
|
|
572
|
-
onToggle: l
|
|
573
|
-
}, null, 8, ["title-style", "title", "logo", "logo-size", "show-toggle", "toggle-icon"]),
|
|
574
|
-
h(de, {
|
|
575
|
-
"menu-data": e.menuData,
|
|
576
|
-
"current-menu-id": e.currentMenuId,
|
|
577
|
-
"expanded-keys": e.expandedKeys,
|
|
578
|
-
"tree-props": e.treeProps,
|
|
579
|
-
"item-height": e.itemHeight,
|
|
580
|
-
indent: e.indent,
|
|
581
|
-
"icon-size": e.iconSize,
|
|
582
|
-
"expanded-icon": e.expandedIcon,
|
|
583
|
-
"collapsed-icon": e.collapsedIcon,
|
|
584
|
-
"icon-renderer": e.iconRenderer,
|
|
585
|
-
"icon-library": e.iconLibrary,
|
|
586
|
-
onNodeClick: o,
|
|
587
|
-
onNodeExpand: f,
|
|
588
|
-
onNodeCollapse: s
|
|
589
|
-
}, null, 8, ["menu-data", "current-menu-id", "expanded-keys", "tree-props", "item-height", "indent", "icon-size", "expanded-icon", "collapsed-icon", "icon-renderer", "icon-library"]),
|
|
590
|
-
e.showFooter ? (c(), b(Ne, {
|
|
591
|
-
key: 0,
|
|
592
|
-
"popup-left": e.popupLeft,
|
|
593
|
-
"user-info": e.userInfo,
|
|
594
|
-
actions: e.userActions,
|
|
595
|
-
"popup-delay": e.popupDelay,
|
|
596
|
-
onActionClick: p
|
|
597
|
-
}, null, 8, ["popup-left", "user-info", "actions", "popup-delay"])) : x("", !0)
|
|
598
|
-
]));
|
|
599
|
-
}
|
|
600
|
-
}), we = /* @__PURE__ */ k(Ie, [["__scopeId", "data-v-736b2e19"]]);
|
|
601
|
-
export {
|
|
602
|
-
z as M,
|
|
603
|
-
M as N,
|
|
604
|
-
Ce as S,
|
|
605
|
-
w as T,
|
|
606
|
-
_ as a,
|
|
607
|
-
ne as b,
|
|
608
|
-
O as c,
|
|
609
|
-
ze as d,
|
|
610
|
-
Te as e,
|
|
611
|
-
oe as f,
|
|
612
|
-
le as g,
|
|
613
|
-
j as h,
|
|
614
|
-
ee as i,
|
|
615
|
-
Me as j,
|
|
616
|
-
ie as k,
|
|
617
|
-
we as l,
|
|
618
|
-
ce as m,
|
|
619
|
-
je as n,
|
|
620
|
-
re as p,
|
|
621
|
-
te as t
|
|
622
|
-
};
|