@duxweb/dvha-pro 1.0.32 → 1.0.33
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/cjs/components/chart/echart.cjs +1 -1
- package/dist/cjs/components/crop/imageCrop.cjs +1 -1
- package/dist/cjs/components/data/dynamicSelect.cjs +1 -1
- package/dist/cjs/components/data/selectModal.cjs +1 -1
- package/dist/cjs/components/designEditor/components/grid.cjs +1 -1
- package/dist/cjs/components/designEditor/editor/setting.cjs +1 -1
- package/dist/cjs/components/form/drawerForm.cjs +1 -1
- package/dist/cjs/components/form/modalForm.cjs +1 -1
- package/dist/cjs/components/form/pageForm.cjs +1 -1
- package/dist/cjs/components/form/pageTabForm.cjs +1 -1
- package/dist/cjs/components/form/settingForm.cjs +1 -1
- package/dist/cjs/components/formEditor/base/base.cjs +1 -1
- package/dist/cjs/components/formEditor/base/setting.cjs +1 -1
- package/dist/cjs/components/formEditor/components/cascader.cjs +1 -1
- package/dist/cjs/components/formEditor/components/cascaderAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/checkbox.cjs +1 -1
- package/dist/cjs/components/formEditor/components/color.cjs +1 -1
- package/dist/cjs/components/formEditor/components/date.cjs +1 -1
- package/dist/cjs/components/formEditor/components/dynamicInput.cjs +1 -1
- package/dist/cjs/components/formEditor/components/dynamicTags.cjs +1 -1
- package/dist/cjs/components/formEditor/components/editor.cjs +1 -1
- package/dist/cjs/components/formEditor/components/input.cjs +1 -1
- package/dist/cjs/components/formEditor/components/inputNumber.cjs +1 -1
- package/dist/cjs/components/formEditor/components/mentionAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/radio.cjs +1 -1
- package/dist/cjs/components/formEditor/components/region.cjs +1 -1
- package/dist/cjs/components/formEditor/components/select.cjs +1 -1
- package/dist/cjs/components/formEditor/components/selectAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/sider.cjs +1 -1
- package/dist/cjs/components/formEditor/components/switch.cjs +1 -1
- package/dist/cjs/components/formEditor/components/time.cjs +1 -1
- package/dist/cjs/components/formEditor/components/transferAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/treeSelect.cjs +1 -1
- package/dist/cjs/components/formEditor/components/treeSelectAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/editor.cjs +1 -1
- package/dist/cjs/components/formEditor/renderer.cjs +1 -1
- package/dist/cjs/components/icon/icon.cjs +1 -1
- package/dist/cjs/components/layout/list.cjs +1 -1
- package/dist/cjs/components/layout/table.cjs +1 -1
- package/dist/cjs/components/level/level.cjs +1 -1
- package/dist/cjs/components/posterEditor/pages/RightPanel.cjs +1 -1
- package/dist/cjs/components/posterEditor/posterEditor.cjs +1 -1
- package/dist/cjs/components/table/table.cjs +1 -1
- package/dist/cjs/components/upload/file.cjs +1 -1
- package/dist/cjs/components/upload/image.cjs +1 -1
- package/dist/cjs/components/upload/manage/item.cjs +1 -1
- package/dist/cjs/components/upload/manager.cjs +1 -1
- package/dist/cjs/config/echart.cjs +1 -1
- package/dist/cjs/hooks/dialog.cjs +1 -1
- package/dist/cjs/hooks/drawer.cjs +1 -1
- package/dist/cjs/hooks/modal.cjs +1 -1
- package/dist/cjs/hooks/table/image.cjs +1 -1
- package/dist/cjs/hooks/table/media.cjs +1 -1
- package/dist/cjs/pages/layout/global.cjs +1 -1
- package/dist/cjs/pages/layout/page.cjs +1 -1
- package/dist/cjs/pages/login.cjs +1 -1
- package/dist/cjs/pages/menu/avatar.cjs +1 -1
- package/dist/cjs/pages/menu/button.cjs +1 -1
- package/dist/cjs/pages/menu/cmd.cjs +1 -1
- package/dist/cjs/pages/menu/main.cjs +1 -1
- package/dist/cjs/pages/menu/mobile.cjs +1 -1
- package/dist/cjs/pages/page404.cjs +1 -1
- package/dist/cjs/pages/pageStatus.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +1 -1
- package/dist/esm/components/chart/echart.js +16 -2
- package/dist/esm/components/crop/imageCrop.js +26 -12
- package/dist/esm/components/data/dynamicSelect.js +33 -19
- package/dist/esm/components/data/selectModal.js +41 -27
- package/dist/esm/components/designEditor/components/grid.js +39 -25
- package/dist/esm/components/designEditor/editor/setting.js +36 -22
- package/dist/esm/components/form/drawerForm.js +32 -18
- package/dist/esm/components/form/modalForm.js +31 -17
- package/dist/esm/components/form/pageForm.js +40 -26
- package/dist/esm/components/form/pageTabForm.js +30 -16
- package/dist/esm/components/form/settingForm.js +32 -18
- package/dist/esm/components/formEditor/base/base.js +29 -15
- package/dist/esm/components/formEditor/base/setting.js +21 -7
- package/dist/esm/components/formEditor/components/cascader.js +65 -51
- package/dist/esm/components/formEditor/components/cascaderAsync.js +95 -81
- package/dist/esm/components/formEditor/components/checkbox.js +43 -29
- package/dist/esm/components/formEditor/components/color.js +34 -20
- package/dist/esm/components/formEditor/components/date.js +51 -37
- package/dist/esm/components/formEditor/components/dynamicInput.js +42 -28
- package/dist/esm/components/formEditor/components/dynamicTags.js +39 -25
- package/dist/esm/components/formEditor/components/editor.js +23 -9
- package/dist/esm/components/formEditor/components/input.js +66 -52
- package/dist/esm/components/formEditor/components/inputNumber.js +37 -23
- package/dist/esm/components/formEditor/components/mentionAsync.js +60 -46
- package/dist/esm/components/formEditor/components/radio.js +28 -14
- package/dist/esm/components/formEditor/components/region.js +37 -23
- package/dist/esm/components/formEditor/components/select.js +16 -2
- package/dist/esm/components/formEditor/components/selectAsync.js +72 -58
- package/dist/esm/components/formEditor/components/sider.js +40 -26
- package/dist/esm/components/formEditor/components/switch.js +33 -19
- package/dist/esm/components/formEditor/components/time.js +60 -46
- package/dist/esm/components/formEditor/components/transferAsync.js +49 -35
- package/dist/esm/components/formEditor/components/treeSelect.js +54 -40
- package/dist/esm/components/formEditor/components/treeSelectAsync.js +74 -60
- package/dist/esm/components/formEditor/editor.js +16 -2
- package/dist/esm/components/formEditor/renderer.js +28 -14
- package/dist/esm/components/icon/icon.js +23 -9
- package/dist/esm/components/layout/list.js +69 -55
- package/dist/esm/components/layout/table.js +37 -23
- package/dist/esm/components/level/level.js +37 -23
- package/dist/esm/components/posterEditor/pages/RightPanel.js +46 -32
- package/dist/esm/components/posterEditor/posterEditor.js +26 -12
- package/dist/esm/components/table/table.js +21 -7
- package/dist/esm/components/upload/file.js +16 -2
- package/dist/esm/components/upload/image.js +42 -28
- package/dist/esm/components/upload/manage/item.js +24 -10
- package/dist/esm/components/upload/manager.js +16 -2
- package/dist/esm/config/echart.js +1 -1
- package/dist/esm/hooks/dialog.js +16 -2
- package/dist/esm/hooks/drawer.js +16 -2
- package/dist/esm/hooks/modal.js +16 -2
- package/dist/esm/hooks/table/image.js +20 -6
- package/dist/esm/hooks/table/media.js +20 -6
- package/dist/esm/pages/layout/global.js +52 -37
- package/dist/esm/pages/layout/page.js +26 -12
- package/dist/esm/pages/login.js +33 -19
- package/dist/esm/pages/menu/avatar.js +46 -32
- package/dist/esm/pages/menu/button.js +22 -8
- package/dist/esm/pages/menu/cmd.js +51 -37
- package/dist/esm/pages/menu/main.js +42 -28
- package/dist/esm/pages/menu/mobile.js +16 -2
- package/dist/esm/pages/page404.js +14 -0
- package/dist/esm/pages/pageStatus.js +18 -4
- package/dist/esm/theme/uno.css.js +1 -1
- package/package.json +5 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as Y, toRef as z, ref as P, computed as c, reactive as b, watch as Z, onMounted as $, createVNode as e, h as R, mergeProps as ee, isVNode as te } from "vue";
|
|
2
|
-
import { useI18n as le, useExtendList as
|
|
3
|
-
import { useWindowSize as
|
|
4
|
-
import { NTooltip as f, NCheckbox as F, NTabs as oe, NTab as
|
|
2
|
+
import { useI18n as le, useExtendList as ie, useJsonSchema as A } from "@duxweb/dvha-core";
|
|
3
|
+
import { useWindowSize as ae } from "@vueuse/core";
|
|
4
|
+
import { NTooltip as f, NCheckbox as F, NTabs as oe, NTab as re, NButton as s, NSpin as ne, NProgress as se, NPagination as ue, NModal as ce, NDrawer as j } from "naive-ui";
|
|
5
5
|
import { useAction as de } from "../../hooks/action.js";
|
|
6
6
|
import "@overlastic/vue";
|
|
7
7
|
import "clsx";
|
|
@@ -27,6 +27,20 @@ import { DuxFilterLayout as fe } from "./filterLayout.js";
|
|
|
27
27
|
import "@vee-validate/i18n";
|
|
28
28
|
import "colorizr";
|
|
29
29
|
import "echarts";
|
|
30
|
+
import "highlight.js/lib/core";
|
|
31
|
+
import "highlight.js/lib/languages/bash";
|
|
32
|
+
import "highlight.js/lib/languages/css";
|
|
33
|
+
import "highlight.js/lib/languages/go";
|
|
34
|
+
import "highlight.js/lib/languages/java";
|
|
35
|
+
import "highlight.js/lib/languages/javascript";
|
|
36
|
+
import "highlight.js/lib/languages/json";
|
|
37
|
+
import "highlight.js/lib/languages/markdown";
|
|
38
|
+
import "highlight.js/lib/languages/php";
|
|
39
|
+
import "highlight.js/lib/languages/python";
|
|
40
|
+
import "highlight.js/lib/languages/shell";
|
|
41
|
+
import "highlight.js/lib/languages/sql";
|
|
42
|
+
import "highlight.js/lib/languages/typescript";
|
|
43
|
+
import "highlight.js/lib/languages/xml";
|
|
30
44
|
import "@ant-design/colors";
|
|
31
45
|
import "@unocss/preset-icons/browser";
|
|
32
46
|
import "@unocss/preset-typography";
|
|
@@ -54,7 +68,7 @@ import "pinia";
|
|
|
54
68
|
function be(t) {
|
|
55
69
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !te(t);
|
|
56
70
|
}
|
|
57
|
-
const
|
|
71
|
+
const Nt = /* @__PURE__ */ Y({
|
|
58
72
|
name: "DuxListLayout",
|
|
59
73
|
props: {
|
|
60
74
|
rowKey: {
|
|
@@ -104,7 +118,7 @@ const bt = /* @__PURE__ */ Y({
|
|
|
104
118
|
slots: o
|
|
105
119
|
}) {
|
|
106
120
|
const D = z(t.filter || {}), {
|
|
107
|
-
t:
|
|
121
|
+
t: a
|
|
108
122
|
} = le(), {
|
|
109
123
|
renderAction: U
|
|
110
124
|
} = de(), T = z(t.pagination && typeof t.pagination == "object" ? t.pagination : {
|
|
@@ -112,7 +126,7 @@ const bt = /* @__PURE__ */ Y({
|
|
|
112
126
|
pageSize: 20
|
|
113
127
|
}), g = P({}), O = () => {
|
|
114
128
|
Object.assign(g.value, D.value);
|
|
115
|
-
},
|
|
129
|
+
}, i = ie({
|
|
116
130
|
path: t.path,
|
|
117
131
|
filters: g.value,
|
|
118
132
|
pagination: T.value,
|
|
@@ -130,14 +144,14 @@ const bt = /* @__PURE__ */ Y({
|
|
|
130
144
|
onExport: W,
|
|
131
145
|
onExportRows: B,
|
|
132
146
|
onImport: J
|
|
133
|
-
} =
|
|
134
|
-
page:
|
|
135
|
-
pageSize:
|
|
136
|
-
pageCount:
|
|
137
|
-
pageSizes:
|
|
147
|
+
} = i, _ = c(() => ({
|
|
148
|
+
page: i.page.value,
|
|
149
|
+
pageSize: i.pageSize.value,
|
|
150
|
+
pageCount: i.pageCount.value,
|
|
151
|
+
pageSizes: i.pageSizes,
|
|
138
152
|
pageSlot: 5,
|
|
139
|
-
onUpdatePage:
|
|
140
|
-
onUpdatePageSize:
|
|
153
|
+
onUpdatePage: i.onUpdatePage,
|
|
154
|
+
onUpdatePageSize: i.onUpdatePageSize,
|
|
141
155
|
showSizePicker: !0,
|
|
142
156
|
showQuickJumper: !0
|
|
143
157
|
})), d = b({
|
|
@@ -147,26 +161,26 @@ const bt = /* @__PURE__ */ Y({
|
|
|
147
161
|
}), m = b({
|
|
148
162
|
show: !1
|
|
149
163
|
}), h = P(t.filterSchema?.length || 0), {
|
|
150
|
-
width:
|
|
151
|
-
} =
|
|
164
|
+
width: r
|
|
165
|
+
} = ae(), k = () => {
|
|
152
166
|
if (!t.filterSchema?.length) return 0;
|
|
153
167
|
const l = t.filterSchema.length;
|
|
154
168
|
if (l <= 3)
|
|
155
169
|
return l;
|
|
156
|
-
const
|
|
170
|
+
const n = r.value || 1024;
|
|
157
171
|
let u = 3;
|
|
158
|
-
return
|
|
172
|
+
return n >= 1280 ? u = 4 : n >= 1024 ? u = 3 : n >= 768 ? u = 2 : u = 1, Math.min(l, u);
|
|
159
173
|
};
|
|
160
|
-
Z(
|
|
174
|
+
Z(r, () => {
|
|
161
175
|
h.value = k();
|
|
162
176
|
}), $(() => {
|
|
163
177
|
h.value = k();
|
|
164
178
|
});
|
|
165
|
-
const K = c(() => (t.filterSchema || []).slice(0, h.value)), C = c(() => (t.filterSchema || []).slice(h.value)), Q = c(() => C.value.length > 0), L = (l) => l.map((
|
|
179
|
+
const K = c(() => (t.filterSchema || []).slice(0, h.value)), C = c(() => (t.filterSchema || []).slice(h.value)), Q = c(() => C.value.length > 0), L = (l) => l.map((n) => {
|
|
166
180
|
const {
|
|
167
181
|
title: u,
|
|
168
182
|
...X
|
|
169
|
-
} =
|
|
183
|
+
} = n;
|
|
170
184
|
return {
|
|
171
185
|
tag: me,
|
|
172
186
|
attrs: {
|
|
@@ -193,8 +207,8 @@ const bt = /* @__PURE__ */ Y({
|
|
|
193
207
|
padding: !1,
|
|
194
208
|
scrollbar: !1
|
|
195
209
|
}, {
|
|
196
|
-
sideLeft: () => o?.sideLeft &&
|
|
197
|
-
sideRight: () => o?.sideRight &&
|
|
210
|
+
sideLeft: () => o?.sideLeft && r.value >= 1024 ? o?.sideLeft?.() : void 0,
|
|
211
|
+
sideRight: () => o?.sideRight && r.value >= 1024 ? o?.sideRight?.() : void 0,
|
|
198
212
|
default: () => e("div", {
|
|
199
213
|
class: "flex flex-col h-full relative"
|
|
200
214
|
}, [e("div", {
|
|
@@ -207,11 +221,11 @@ const bt = /* @__PURE__ */ Y({
|
|
|
207
221
|
trigger: () => e("div", {
|
|
208
222
|
class: "flex items-center"
|
|
209
223
|
}, [e(F, {
|
|
210
|
-
checked:
|
|
211
|
-
indeterminate:
|
|
212
|
-
onUpdateChecked:
|
|
224
|
+
checked: i.isAllChecked.value,
|
|
225
|
+
indeterminate: i.isIndeterminate.value,
|
|
226
|
+
onUpdateChecked: i.toggleSelectAll
|
|
213
227
|
}, null)]),
|
|
214
|
-
default: () =>
|
|
228
|
+
default: () => a("components.list.selectAll")
|
|
215
229
|
})]), t.tabs && e("div", null, [e(oe, {
|
|
216
230
|
type: "segment",
|
|
217
231
|
size: "small",
|
|
@@ -224,13 +238,13 @@ const bt = /* @__PURE__ */ Y({
|
|
|
224
238
|
g.value.tab = l;
|
|
225
239
|
}
|
|
226
240
|
}, {
|
|
227
|
-
default: () => [t.tabs?.map((l) => e(
|
|
241
|
+
default: () => [t.tabs?.map((l) => e(re, {
|
|
228
242
|
name: l.value,
|
|
229
243
|
tab: l.label
|
|
230
244
|
}, null))]
|
|
231
245
|
})]), e("div", {
|
|
232
246
|
class: "flex gap-2"
|
|
233
|
-
}, [o?.sideLeft &&
|
|
247
|
+
}, [o?.sideLeft && r.value < 1024 && e(s, {
|
|
234
248
|
class: "flex-none",
|
|
235
249
|
secondary: !0,
|
|
236
250
|
onClick: () => {
|
|
@@ -250,8 +264,8 @@ const bt = /* @__PURE__ */ Y({
|
|
|
250
264
|
icon: () => e("div", {
|
|
251
265
|
class: "i-tabler:search size-4"
|
|
252
266
|
}, null),
|
|
253
|
-
default: () =>
|
|
254
|
-
}), o?.sideRight &&
|
|
267
|
+
default: () => a("components.button.search")
|
|
268
|
+
}), o?.sideRight && r.value < 1024 && e(s, {
|
|
255
269
|
class: "flex-none",
|
|
256
270
|
secondary: !0,
|
|
257
271
|
onClick: () => {
|
|
@@ -267,17 +281,17 @@ const bt = /* @__PURE__ */ Y({
|
|
|
267
281
|
d.show = !d.show;
|
|
268
282
|
}
|
|
269
283
|
}, {
|
|
270
|
-
default: () =>
|
|
284
|
+
default: () => a("components.button.advanced"),
|
|
271
285
|
icon: () => e("div", {
|
|
272
286
|
class: ["i-tabler:chevrons-down size-4 transition-all"]
|
|
273
287
|
}, null)
|
|
274
288
|
})])]), e("div", {
|
|
275
289
|
class: "flex gap-2"
|
|
276
290
|
}, [o.actions?.(), t.actions?.length > 0 && U({
|
|
277
|
-
type:
|
|
278
|
-
text:
|
|
291
|
+
type: r.value < 1024 ? "dropdown" : "button",
|
|
292
|
+
text: r.value < 1024,
|
|
279
293
|
items: t.actions
|
|
280
|
-
})])]), e(
|
|
294
|
+
})])]), e(ne, {
|
|
281
295
|
show: w.value,
|
|
282
296
|
class: "flex-1 min-h-0",
|
|
283
297
|
contentClass: "h-full"
|
|
@@ -286,7 +300,7 @@ const bt = /* @__PURE__ */ Y({
|
|
|
286
300
|
class: ["h-full overflow-auto rounded-lg px-3"]
|
|
287
301
|
}, [!w.value && x.value.length === 0 && e("div", {
|
|
288
302
|
class: "flex justify-center items-center h-full"
|
|
289
|
-
}, [e(he, null, null)]), x.value.length > 0 && o?.default?.(
|
|
303
|
+
}, [e(he, null, null)]), x.value.length > 0 && o?.default?.(i)])]
|
|
290
304
|
}), e("div", {
|
|
291
305
|
class: "flex justify-between px-3 py-2 gap-2"
|
|
292
306
|
}, [e("div", null, [e("div", {
|
|
@@ -298,12 +312,12 @@ const bt = /* @__PURE__ */ Y({
|
|
|
298
312
|
quaternary: !0
|
|
299
313
|
}, {
|
|
300
314
|
default: () => [e(F, {
|
|
301
|
-
checked:
|
|
302
|
-
indeterminate:
|
|
303
|
-
onUpdateChecked:
|
|
315
|
+
checked: i.isAllChecked.value,
|
|
316
|
+
indeterminate: i.isIndeterminate.value,
|
|
317
|
+
onUpdateChecked: i.toggleSelectAll
|
|
304
318
|
}, null)]
|
|
305
319
|
}),
|
|
306
|
-
default: () =>
|
|
320
|
+
default: () => a("components.list.selectAll")
|
|
307
321
|
}), o?.tools?.(), v.value.export && e(f, null, {
|
|
308
322
|
trigger: () => e(s, {
|
|
309
323
|
loading: M.value,
|
|
@@ -315,7 +329,7 @@ const bt = /* @__PURE__ */ Y({
|
|
|
315
329
|
class: "i-tabler:database-export size-4"
|
|
316
330
|
}, null)
|
|
317
331
|
}),
|
|
318
|
-
default: () =>
|
|
332
|
+
default: () => a("components.button.export")
|
|
319
333
|
}), v.value.import && e(f, null, {
|
|
320
334
|
trigger: () => e(s, {
|
|
321
335
|
loading: S.value,
|
|
@@ -327,7 +341,7 @@ const bt = /* @__PURE__ */ Y({
|
|
|
327
341
|
class: "i-tabler:database-import size-4"
|
|
328
342
|
}, null)
|
|
329
343
|
}),
|
|
330
|
-
default: () =>
|
|
344
|
+
default: () => a("components.button.import")
|
|
331
345
|
}), v.value.refresh && e(f, null, {
|
|
332
346
|
trigger: () => e(s, {
|
|
333
347
|
onClick: I,
|
|
@@ -348,29 +362,29 @@ const bt = /* @__PURE__ */ Y({
|
|
|
348
362
|
class: "i-tabler:refresh size-4"
|
|
349
363
|
}, null)
|
|
350
364
|
}),
|
|
351
|
-
default: () =>
|
|
365
|
+
default: () => a("components.button.autoRefresh")
|
|
352
366
|
})])]), e("div", {
|
|
353
367
|
class: "flex items-center gap-2"
|
|
354
368
|
}, [o?.bottom?.(), t.pagination && e(ue, ee(_.value, {
|
|
355
|
-
simple:
|
|
369
|
+
simple: r.value < 768
|
|
356
370
|
}), {
|
|
357
|
-
prefix: () => e("div", null, [
|
|
371
|
+
prefix: () => e("div", null, [a("components.list.total", {
|
|
358
372
|
total: E?.value?.total || 0
|
|
359
373
|
})])
|
|
360
374
|
})])]), e(ve, {
|
|
361
|
-
number:
|
|
375
|
+
number: i.checkeds.value.length,
|
|
362
376
|
group: [[{
|
|
363
377
|
icon: "i-tabler:x",
|
|
364
378
|
onClick: () => {
|
|
365
|
-
|
|
379
|
+
i.checkeds.value = [], i.onUpdateChecked?.([]);
|
|
366
380
|
}
|
|
367
381
|
}], [{
|
|
368
|
-
label:
|
|
382
|
+
label: a("components.button.export"),
|
|
369
383
|
icon: "i-tabler:file-export",
|
|
370
384
|
loading: V.value,
|
|
371
385
|
onClick: B
|
|
372
386
|
}, {
|
|
373
|
-
label:
|
|
387
|
+
label: a("components.button.delete"),
|
|
374
388
|
type: "error",
|
|
375
389
|
icon: "i-tabler:trash"
|
|
376
390
|
}]]
|
|
@@ -383,17 +397,17 @@ const bt = /* @__PURE__ */ Y({
|
|
|
383
397
|
default: ({
|
|
384
398
|
draggableClass: l
|
|
385
399
|
}) => {
|
|
386
|
-
let
|
|
400
|
+
let n;
|
|
387
401
|
return e(pe, {
|
|
388
|
-
title:
|
|
402
|
+
title: a("components.button.filter"),
|
|
389
403
|
handle: l,
|
|
390
404
|
onClose: () => d.show = !1
|
|
391
405
|
}, {
|
|
392
406
|
default: () => [e(fe, {
|
|
393
407
|
showLabel: !0,
|
|
394
408
|
labelPlacement: "top"
|
|
395
|
-
}, be(
|
|
396
|
-
default: () => [
|
|
409
|
+
}, be(n = R(H)) ? n : {
|
|
410
|
+
default: () => [n]
|
|
397
411
|
})]
|
|
398
412
|
});
|
|
399
413
|
}
|
|
@@ -404,7 +418,7 @@ const bt = /* @__PURE__ */ Y({
|
|
|
404
418
|
placement: "left"
|
|
405
419
|
}, {
|
|
406
420
|
default: () => [e(N, {
|
|
407
|
-
title: t.sideLeftTitle ||
|
|
421
|
+
title: t.sideLeftTitle || a("components.button.sideLeft"),
|
|
408
422
|
onClose: () => p.show = !1,
|
|
409
423
|
scrollbar: !1
|
|
410
424
|
}, {
|
|
@@ -417,7 +431,7 @@ const bt = /* @__PURE__ */ Y({
|
|
|
417
431
|
placement: "right"
|
|
418
432
|
}, {
|
|
419
433
|
default: () => [e(N, {
|
|
420
|
-
title: t.sideRightTitle ||
|
|
434
|
+
title: t.sideRightTitle || a("components.button.sideRight"),
|
|
421
435
|
onClose: () => m.show = !1,
|
|
422
436
|
scrollbar: !1
|
|
423
437
|
}, {
|
|
@@ -428,5 +442,5 @@ const bt = /* @__PURE__ */ Y({
|
|
|
428
442
|
}
|
|
429
443
|
});
|
|
430
444
|
export {
|
|
431
|
-
|
|
445
|
+
Nt as DuxListLayout
|
|
432
446
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as G, toRef as k, computed as s, reactive as v, createVNode as e, h as C, mergeProps as H, isVNode as Q } from "vue";
|
|
2
2
|
import { useI18n as X, useJsonSchema as N, useTabStore as Y } from "@duxweb/dvha-core";
|
|
3
3
|
import { useWindowSize as Z } from "@vueuse/core";
|
|
4
|
-
import { NTabs as $, NTab as ee, NButton as r, NPopselect as te, NTooltip as
|
|
4
|
+
import { NTabs as $, NTab as ee, NButton as r, NPopselect as te, NTooltip as p, NProgress as oe, NPagination as le, NModal as ie, NDrawer as R } from "naive-ui";
|
|
5
5
|
import { useAction as ae } from "../../hooks/action.js";
|
|
6
6
|
import "@overlastic/vue";
|
|
7
7
|
import "clsx";
|
|
@@ -27,6 +27,20 @@ import { DuxFilterLayout as se } from "./filterLayout.js";
|
|
|
27
27
|
import "@vee-validate/i18n";
|
|
28
28
|
import "colorizr";
|
|
29
29
|
import "echarts";
|
|
30
|
+
import "highlight.js/lib/core";
|
|
31
|
+
import "highlight.js/lib/languages/bash";
|
|
32
|
+
import "highlight.js/lib/languages/css";
|
|
33
|
+
import "highlight.js/lib/languages/go";
|
|
34
|
+
import "highlight.js/lib/languages/java";
|
|
35
|
+
import "highlight.js/lib/languages/javascript";
|
|
36
|
+
import "highlight.js/lib/languages/json";
|
|
37
|
+
import "highlight.js/lib/languages/markdown";
|
|
38
|
+
import "highlight.js/lib/languages/php";
|
|
39
|
+
import "highlight.js/lib/languages/python";
|
|
40
|
+
import "highlight.js/lib/languages/shell";
|
|
41
|
+
import "highlight.js/lib/languages/sql";
|
|
42
|
+
import "highlight.js/lib/languages/typescript";
|
|
43
|
+
import "highlight.js/lib/languages/xml";
|
|
30
44
|
import "@ant-design/colors";
|
|
31
45
|
import "@unocss/preset-icons/browser";
|
|
32
46
|
import "@unocss/preset-typography";
|
|
@@ -49,12 +63,12 @@ import "fabric";
|
|
|
49
63
|
import "mime";
|
|
50
64
|
import "dayjs";
|
|
51
65
|
import "@tanstack/vue-query";
|
|
52
|
-
import { useTable as
|
|
66
|
+
import { useTable as me } from "../../hooks/table.js";
|
|
53
67
|
import "pinia";
|
|
54
|
-
function
|
|
68
|
+
function de(t) {
|
|
55
69
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Q(t);
|
|
56
70
|
}
|
|
57
|
-
const
|
|
71
|
+
const St = /* @__PURE__ */ G({
|
|
58
72
|
name: "DuxTableLayout",
|
|
59
73
|
props: {
|
|
60
74
|
path: {
|
|
@@ -103,13 +117,13 @@ const mt = /* @__PURE__ */ G({
|
|
|
103
117
|
setup(t, {
|
|
104
118
|
slots: l
|
|
105
119
|
}) {
|
|
106
|
-
const
|
|
120
|
+
const f = k(t, "filter", {}), T = k(t, "columns", []), {
|
|
107
121
|
t: i
|
|
108
122
|
} = X(), {
|
|
109
123
|
renderAction: j
|
|
110
|
-
} = ae(), b =
|
|
124
|
+
} = ae(), b = me({
|
|
111
125
|
path: t.path,
|
|
112
|
-
filters:
|
|
126
|
+
filters: f.value,
|
|
113
127
|
columns: T,
|
|
114
128
|
pagination: t.pagination,
|
|
115
129
|
...t.hookTableProps
|
|
@@ -134,23 +148,23 @@ const mt = /* @__PURE__ */ G({
|
|
|
134
148
|
value: o.key
|
|
135
149
|
}))), {
|
|
136
150
|
width: n
|
|
137
|
-
} = Z(), _ = s(() => w.value.reduce((a,
|
|
151
|
+
} = Z(), _ = s(() => w.value.reduce((a, d) => a + (Number(d?.width) || Number(d?.minWidth) || 110), 0)), u = v({
|
|
138
152
|
show: !1
|
|
139
153
|
}), c = v({
|
|
140
154
|
show: !1
|
|
141
|
-
}),
|
|
155
|
+
}), m = v({
|
|
142
156
|
show: !1
|
|
143
157
|
}), h = s(() => (t.filterSchema || []).map((o) => {
|
|
144
158
|
const {
|
|
145
159
|
label: a,
|
|
146
|
-
...
|
|
160
|
+
...d
|
|
147
161
|
} = o;
|
|
148
162
|
return {
|
|
149
163
|
tag: ne,
|
|
150
164
|
attrs: {
|
|
151
165
|
label: a
|
|
152
166
|
},
|
|
153
|
-
children:
|
|
167
|
+
children: d
|
|
154
168
|
};
|
|
155
169
|
})), {
|
|
156
170
|
render: q
|
|
@@ -185,9 +199,9 @@ const mt = /* @__PURE__ */ G({
|
|
|
185
199
|
"--n-tab-padding": "4px 10px"
|
|
186
200
|
},
|
|
187
201
|
"default-value": t.tabs?.[0]?.value,
|
|
188
|
-
value:
|
|
202
|
+
value: f.value?.tab,
|
|
189
203
|
onUpdateValue: (o) => {
|
|
190
|
-
|
|
204
|
+
f.value.tab = o;
|
|
191
205
|
}
|
|
192
206
|
}, {
|
|
193
207
|
default: () => [t.tabs?.map((o) => e(ee, {
|
|
@@ -214,7 +228,7 @@ const mt = /* @__PURE__ */ G({
|
|
|
214
228
|
class: "flex-none",
|
|
215
229
|
secondary: !0,
|
|
216
230
|
onClick: () => {
|
|
217
|
-
|
|
231
|
+
m.show = !m.show;
|
|
218
232
|
}
|
|
219
233
|
}, {
|
|
220
234
|
icon: () => e("div", {
|
|
@@ -244,7 +258,7 @@ const mt = /* @__PURE__ */ G({
|
|
|
244
258
|
placement: "bottom-start",
|
|
245
259
|
trigger: "click"
|
|
246
260
|
}, {
|
|
247
|
-
default: () => [e(
|
|
261
|
+
default: () => [e(p, null, {
|
|
248
262
|
trigger: () => e(r, {
|
|
249
263
|
secondary: !0,
|
|
250
264
|
"icon-placement": "right"
|
|
@@ -255,7 +269,7 @@ const mt = /* @__PURE__ */ G({
|
|
|
255
269
|
}),
|
|
256
270
|
default: () => i("components.list.columnSetting")
|
|
257
271
|
})]
|
|
258
|
-
}), g.value.export && e(
|
|
272
|
+
}), g.value.export && e(p, null, {
|
|
259
273
|
trigger: () => e(r, {
|
|
260
274
|
secondary: !0,
|
|
261
275
|
loading: E.value,
|
|
@@ -266,7 +280,7 @@ const mt = /* @__PURE__ */ G({
|
|
|
266
280
|
}, null)
|
|
267
281
|
}),
|
|
268
282
|
default: () => i("components.button.export")
|
|
269
|
-
}), g.value.import && e(
|
|
283
|
+
}), g.value.import && e(p, null, {
|
|
270
284
|
trigger: () => e(r, {
|
|
271
285
|
secondary: !0,
|
|
272
286
|
loading: I.value,
|
|
@@ -277,7 +291,7 @@ const mt = /* @__PURE__ */ G({
|
|
|
277
291
|
}, null)
|
|
278
292
|
}),
|
|
279
293
|
default: () => i("components.button.import")
|
|
280
|
-
}), g.value.refresh && e(
|
|
294
|
+
}), g.value.refresh && e(p, null, {
|
|
281
295
|
trigger: () => e(r, {
|
|
282
296
|
secondary: !0,
|
|
283
297
|
onClick: U
|
|
@@ -350,7 +364,7 @@ const mt = /* @__PURE__ */ G({
|
|
|
350
364
|
default: () => [e(se, {
|
|
351
365
|
showLabel: !0,
|
|
352
366
|
labelPlacement: "top"
|
|
353
|
-
},
|
|
367
|
+
}, de(a = C(q)) ? a : {
|
|
354
368
|
default: () => [a]
|
|
355
369
|
})]
|
|
356
370
|
});
|
|
@@ -369,14 +383,14 @@ const mt = /* @__PURE__ */ G({
|
|
|
369
383
|
default: () => [l?.sideLeft?.()]
|
|
370
384
|
})]
|
|
371
385
|
}), e(R, {
|
|
372
|
-
show:
|
|
373
|
-
onUpdateShow: (o) =>
|
|
386
|
+
show: m.show,
|
|
387
|
+
onUpdateShow: (o) => m.show = o,
|
|
374
388
|
autoFocus: !1,
|
|
375
389
|
placement: "right"
|
|
376
390
|
}, {
|
|
377
391
|
default: () => [e(S, {
|
|
378
392
|
title: t.sideRightTitle || i("components.button.sideRight"),
|
|
379
|
-
onClose: () =>
|
|
393
|
+
onClose: () => m.show = !1,
|
|
380
394
|
scrollbar: !1
|
|
381
395
|
}, {
|
|
382
396
|
default: () => [l?.sideRight?.()]
|
|
@@ -386,5 +400,5 @@ const mt = /* @__PURE__ */ G({
|
|
|
386
400
|
}
|
|
387
401
|
});
|
|
388
402
|
export {
|
|
389
|
-
|
|
403
|
+
St as DuxTableLayout
|
|
390
404
|
};
|
|
@@ -24,6 +24,20 @@ import "vue-draggable-plus";
|
|
|
24
24
|
import "@vee-validate/i18n";
|
|
25
25
|
import "colorizr";
|
|
26
26
|
import "echarts";
|
|
27
|
+
import "highlight.js/lib/core";
|
|
28
|
+
import "highlight.js/lib/languages/bash";
|
|
29
|
+
import "highlight.js/lib/languages/css";
|
|
30
|
+
import "highlight.js/lib/languages/go";
|
|
31
|
+
import "highlight.js/lib/languages/java";
|
|
32
|
+
import "highlight.js/lib/languages/javascript";
|
|
33
|
+
import "highlight.js/lib/languages/json";
|
|
34
|
+
import "highlight.js/lib/languages/markdown";
|
|
35
|
+
import "highlight.js/lib/languages/php";
|
|
36
|
+
import "highlight.js/lib/languages/python";
|
|
37
|
+
import "highlight.js/lib/languages/shell";
|
|
38
|
+
import "highlight.js/lib/languages/sql";
|
|
39
|
+
import "highlight.js/lib/languages/typescript";
|
|
40
|
+
import "highlight.js/lib/languages/xml";
|
|
27
41
|
import "@ant-design/colors";
|
|
28
42
|
import "@unocss/preset-icons/browser";
|
|
29
43
|
import "@unocss/preset-typography";
|
|
@@ -43,7 +57,7 @@ import "mime";
|
|
|
43
57
|
import "dayjs";
|
|
44
58
|
import { useLevel as c } from "../../hooks/level.js";
|
|
45
59
|
import "pinia";
|
|
46
|
-
const
|
|
60
|
+
const bt = /* @__PURE__ */ v({
|
|
47
61
|
name: "DuxLevel",
|
|
48
62
|
props: {
|
|
49
63
|
value: {
|
|
@@ -72,29 +86,29 @@ const pe = /* @__PURE__ */ v({
|
|
|
72
86
|
}
|
|
73
87
|
},
|
|
74
88
|
emits: ["update:value"],
|
|
75
|
-
setup(
|
|
89
|
+
setup(t, {
|
|
76
90
|
emit: m
|
|
77
91
|
}) {
|
|
78
|
-
const r = g(
|
|
92
|
+
const r = g(t, "value", m, {
|
|
79
93
|
passive: !0,
|
|
80
94
|
defaultValue: []
|
|
81
95
|
}), {
|
|
82
|
-
regions:
|
|
83
|
-
onChange:
|
|
84
|
-
isLoading:
|
|
96
|
+
regions: p,
|
|
97
|
+
onChange: a,
|
|
98
|
+
isLoading: l
|
|
85
99
|
} = c({
|
|
86
100
|
value: r,
|
|
87
|
-
path:
|
|
88
|
-
nameField:
|
|
89
|
-
maxLevel:
|
|
90
|
-
labelField:
|
|
91
|
-
valueField:
|
|
92
|
-
}), u = (
|
|
93
|
-
|
|
101
|
+
path: t.path,
|
|
102
|
+
nameField: t.nameField,
|
|
103
|
+
maxLevel: t.maxLevel,
|
|
104
|
+
labelField: t.labelField,
|
|
105
|
+
valueField: t.valueField
|
|
106
|
+
}), u = (e, i) => {
|
|
107
|
+
a(e, i);
|
|
94
108
|
}, n = f(() => Array.from({
|
|
95
|
-
length:
|
|
96
|
-
}, (
|
|
97
|
-
const d =
|
|
109
|
+
length: t.maxLevel
|
|
110
|
+
}, (e, i) => {
|
|
111
|
+
const d = p.value[i] || [];
|
|
98
112
|
return {
|
|
99
113
|
index: i,
|
|
100
114
|
options: d,
|
|
@@ -103,16 +117,16 @@ const pe = /* @__PURE__ */ v({
|
|
|
103
117
|
}));
|
|
104
118
|
return () => o("div", {
|
|
105
119
|
class: ["grid grid-cols-1 gap-2", "lg:grid-cols-[repeat(auto-fit,minmax(120px,1fr))]"]
|
|
106
|
-
}, [n.value.map((
|
|
107
|
-
key:
|
|
108
|
-
value:
|
|
109
|
-
options:
|
|
120
|
+
}, [n.value.map((e) => o(s, {
|
|
121
|
+
key: e.index,
|
|
122
|
+
value: e.value,
|
|
123
|
+
options: e.options,
|
|
110
124
|
clearable: !0,
|
|
111
|
-
loading:
|
|
112
|
-
onUpdateValue: (i) => u(i,
|
|
125
|
+
loading: l.value,
|
|
126
|
+
onUpdateValue: (i) => u(i, e.index)
|
|
113
127
|
}, null))]);
|
|
114
128
|
}
|
|
115
129
|
});
|
|
116
130
|
export {
|
|
117
|
-
|
|
131
|
+
bt as DuxLevel
|
|
118
132
|
};
|