@duxweb/dvha-pro 1.0.31 → 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/component.cjs +1 -1
- 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 -0
- 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/dvha-pro.css +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/index.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 +2 -1
- package/dist/esm/component.js +31 -31
- 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 +34 -20
- 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 -30
- package/dist/esm/components/form/pageTabForm.js +159 -0
- 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 +101 -85
- 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 +20 -4
- 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/dvha-pro.css +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/index.js +130 -128
- 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 +2 -1
- package/dist/types/components/data/selectModal.d.ts +1 -1
- package/dist/types/components/form/index.d.ts +1 -0
- package/dist/types/components/form/pageForm.d.ts +0 -9
- package/dist/types/components/form/pageTabForm.d.ts +63 -0
- package/dist/types/components/layout/table.d.ts +2 -2
- package/dist/types/components/table/tablePage.d.ts +2 -2
- package/package.json +5 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useWindowSize as
|
|
4
|
-
import { NTabs as
|
|
5
|
-
import { useAction as
|
|
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
|
+
import { useI18n as X, useJsonSchema as N, useTabStore as Y } from "@duxweb/dvha-core";
|
|
3
|
+
import { useWindowSize as Z } from "@vueuse/core";
|
|
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
|
+
import { useAction as ae } from "../../hooks/action.js";
|
|
6
6
|
import "@overlastic/vue";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "vue-echarts";
|
|
@@ -18,15 +18,29 @@ import "ace-builds/src-noconflict/ext-searchbox";
|
|
|
18
18
|
import "ace-builds/src-noconflict/ext-language_tools";
|
|
19
19
|
import "ace-builds/src-noconflict/mode-snippets";
|
|
20
20
|
import "vue-cropper";
|
|
21
|
-
import
|
|
21
|
+
import re from "../modal/modalPage.js";
|
|
22
22
|
import "jinrishici";
|
|
23
23
|
import "lodash-es";
|
|
24
24
|
import "vue-draggable-plus";
|
|
25
|
-
import { DuxTableFilter as
|
|
26
|
-
import { DuxFilterLayout as
|
|
25
|
+
import { DuxTableFilter as ne } from "./filter.js";
|
|
26
|
+
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";
|
|
@@ -37,10 +51,10 @@ import "vee-validate";
|
|
|
37
51
|
import "vue-router";
|
|
38
52
|
import "vue-command-palette";
|
|
39
53
|
import "@duxweb/dvha-naiveui";
|
|
40
|
-
import { DuxPage as
|
|
54
|
+
import { DuxPage as ue } from "../../pages/page.js";
|
|
41
55
|
import "../../pages/page404.js";
|
|
42
|
-
import { DuxDrawerPage as
|
|
43
|
-
import { DuxTableTools as
|
|
56
|
+
import { DuxDrawerPage as S } from "../drawer/drawerPage.js";
|
|
57
|
+
import { DuxTableTools as ce } from "./tools.js";
|
|
44
58
|
import "short-unique-id";
|
|
45
59
|
import "aieditor";
|
|
46
60
|
import "@iconify-json/tabler/icons.json";
|
|
@@ -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
|
|
55
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
68
|
+
function de(t) {
|
|
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,70 +117,70 @@ const ut = /* @__PURE__ */ J({
|
|
|
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
|
-
} =
|
|
109
|
-
renderAction:
|
|
110
|
-
} =
|
|
122
|
+
} = X(), {
|
|
123
|
+
renderAction: j
|
|
124
|
+
} = ae(), b = me({
|
|
111
125
|
path: t.path,
|
|
112
|
-
filters:
|
|
113
|
-
columns:
|
|
126
|
+
filters: f.value,
|
|
127
|
+
columns: T,
|
|
114
128
|
pagination: t.pagination,
|
|
115
129
|
...t.hookTableProps
|
|
116
130
|
}), {
|
|
117
131
|
columns: w,
|
|
118
|
-
tablePagination:
|
|
119
|
-
table:
|
|
120
|
-
onUpdateColumnSelected:
|
|
121
|
-
onUpdateChecked:
|
|
122
|
-
columnSelected:
|
|
123
|
-
autoRefetch:
|
|
124
|
-
autoCountdown:
|
|
125
|
-
onAutoRefetch:
|
|
126
|
-
isExporting:
|
|
127
|
-
isExportingRows:
|
|
128
|
-
isImporting:
|
|
132
|
+
tablePagination: L,
|
|
133
|
+
table: P,
|
|
134
|
+
onUpdateColumnSelected: z,
|
|
135
|
+
onUpdateChecked: D,
|
|
136
|
+
columnSelected: A,
|
|
137
|
+
autoRefetch: O,
|
|
138
|
+
autoCountdown: x,
|
|
139
|
+
onAutoRefetch: U,
|
|
140
|
+
isExporting: E,
|
|
141
|
+
isExportingRows: F,
|
|
142
|
+
isImporting: I,
|
|
129
143
|
onExport: V,
|
|
130
144
|
onExportRows: W,
|
|
131
|
-
onImport:
|
|
132
|
-
} = b,
|
|
145
|
+
onImport: B
|
|
146
|
+
} = b, M = s(() => w.value.filter((o) => "title" in o && "key" in o).map((o) => ({
|
|
133
147
|
label: o.title,
|
|
134
148
|
value: o.key
|
|
135
149
|
}))), {
|
|
136
150
|
width: n
|
|
137
|
-
} =
|
|
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
|
-
tag:
|
|
163
|
+
tag: ne,
|
|
150
164
|
attrs: {
|
|
151
165
|
label: a
|
|
152
166
|
},
|
|
153
|
-
children:
|
|
167
|
+
children: d
|
|
154
168
|
};
|
|
155
169
|
})), {
|
|
156
|
-
render:
|
|
157
|
-
} =
|
|
170
|
+
render: q
|
|
171
|
+
} = N({
|
|
158
172
|
data: s(() => h.value?.slice(t.filterNumber))
|
|
159
173
|
}), {
|
|
160
|
-
render:
|
|
161
|
-
} =
|
|
174
|
+
render: J
|
|
175
|
+
} = N({
|
|
162
176
|
data: s(() => h.value?.slice(0, t.filterNumber))
|
|
163
177
|
}), g = s(() => ({
|
|
164
178
|
import: !1,
|
|
165
179
|
export: !0,
|
|
166
180
|
refresh: !0,
|
|
167
181
|
...t.tools
|
|
168
|
-
}));
|
|
169
|
-
return () => e(
|
|
182
|
+
})), y = Y(), K = y.tabs.find((o) => o.path === y.current);
|
|
183
|
+
return () => e(ue, {
|
|
170
184
|
actions: t.actions,
|
|
171
185
|
scrollbar: !1
|
|
172
186
|
}, {
|
|
@@ -178,19 +192,19 @@ const ut = /* @__PURE__ */ J({
|
|
|
178
192
|
class: "flex gap-2 justify-between flex-col lg:flex-row"
|
|
179
193
|
}, [t.tabs && e("div", {
|
|
180
194
|
class: "flex flex-none"
|
|
181
|
-
}, [e(
|
|
195
|
+
}, [e($, {
|
|
182
196
|
type: "segment",
|
|
183
197
|
size: "small",
|
|
184
198
|
style: {
|
|
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
|
-
default: () => [t.tabs?.map((o) => e(
|
|
207
|
+
default: () => [t.tabs?.map((o) => e(ee, {
|
|
194
208
|
name: o.value,
|
|
195
209
|
tab: o.label
|
|
196
210
|
}, null))]
|
|
@@ -208,11 +222,13 @@ const ut = /* @__PURE__ */ J({
|
|
|
208
222
|
}, null)
|
|
209
223
|
}), e("div", {
|
|
210
224
|
class: ["flex-1 flex flex-col lg:flex-row gap-2 flex-wrap", t.tabs ? "justify-end" : "justify-start"]
|
|
211
|
-
}, [
|
|
225
|
+
}, [!t.tabs && !t.filterSchema?.length && e("div", {
|
|
226
|
+
class: "flex flex-none items-center text-base font-medium"
|
|
227
|
+
}, [K?.label]), C(J)]), l?.sideRight && n.value < 1024 && e(r, {
|
|
212
228
|
class: "flex-none",
|
|
213
229
|
secondary: !0,
|
|
214
230
|
onClick: () => {
|
|
215
|
-
|
|
231
|
+
m.show = !m.show;
|
|
216
232
|
}
|
|
217
233
|
}, {
|
|
218
234
|
icon: () => e("div", {
|
|
@@ -232,17 +248,17 @@ const ut = /* @__PURE__ */ J({
|
|
|
232
248
|
icon: () => e("div", {
|
|
233
249
|
class: ["i-tabler:chevrons-down size-4 transition-all"]
|
|
234
250
|
}, null)
|
|
235
|
-
}), l?.tools?.(), e(
|
|
236
|
-
options:
|
|
237
|
-
value:
|
|
251
|
+
}), l?.tools?.(), e(te, {
|
|
252
|
+
options: M.value,
|
|
253
|
+
value: A.value,
|
|
238
254
|
onUpdateValue: (o) => {
|
|
239
|
-
|
|
255
|
+
z(o);
|
|
240
256
|
},
|
|
241
257
|
multiple: !0,
|
|
242
258
|
placement: "bottom-start",
|
|
243
259
|
trigger: "click"
|
|
244
260
|
}, {
|
|
245
|
-
default: () => [e(
|
|
261
|
+
default: () => [e(p, null, {
|
|
246
262
|
trigger: () => e(r, {
|
|
247
263
|
secondary: !0,
|
|
248
264
|
"icon-placement": "right"
|
|
@@ -253,10 +269,10 @@ const ut = /* @__PURE__ */ J({
|
|
|
253
269
|
}),
|
|
254
270
|
default: () => i("components.list.columnSetting")
|
|
255
271
|
})]
|
|
256
|
-
}), g.value.export && e(
|
|
272
|
+
}), g.value.export && e(p, null, {
|
|
257
273
|
trigger: () => e(r, {
|
|
258
274
|
secondary: !0,
|
|
259
|
-
loading:
|
|
275
|
+
loading: E.value,
|
|
260
276
|
onClick: V
|
|
261
277
|
}, {
|
|
262
278
|
icon: () => e("div", {
|
|
@@ -264,32 +280,32 @@ const ut = /* @__PURE__ */ J({
|
|
|
264
280
|
}, null)
|
|
265
281
|
}),
|
|
266
282
|
default: () => i("components.button.export")
|
|
267
|
-
}), g.value.import && e(
|
|
283
|
+
}), g.value.import && e(p, null, {
|
|
268
284
|
trigger: () => e(r, {
|
|
269
285
|
secondary: !0,
|
|
270
|
-
loading:
|
|
271
|
-
onClick:
|
|
286
|
+
loading: I.value,
|
|
287
|
+
onClick: B
|
|
272
288
|
}, {
|
|
273
289
|
icon: () => e("div", {
|
|
274
290
|
class: "i-tabler:database-import size-4"
|
|
275
291
|
}, null)
|
|
276
292
|
}),
|
|
277
293
|
default: () => i("components.button.import")
|
|
278
|
-
}), g.value.refresh && e(
|
|
294
|
+
}), g.value.refresh && e(p, null, {
|
|
279
295
|
trigger: () => e(r, {
|
|
280
296
|
secondary: !0,
|
|
281
|
-
onClick:
|
|
297
|
+
onClick: U
|
|
282
298
|
}, {
|
|
283
|
-
icon: () =>
|
|
299
|
+
icon: () => O.value ? e(oe, {
|
|
284
300
|
class: "size-4",
|
|
285
301
|
type: "circle",
|
|
286
|
-
percentage:
|
|
302
|
+
percentage: x.value * 10,
|
|
287
303
|
strokeWidth: 20,
|
|
288
304
|
color: "rgba(var(--ui-color-primary))"
|
|
289
305
|
}, {
|
|
290
306
|
default: () => [e("span", {
|
|
291
307
|
class: "text-8px"
|
|
292
|
-
}, [
|
|
308
|
+
}, [x.value])]
|
|
293
309
|
}) : e("div", {
|
|
294
310
|
class: "i-tabler:refresh size-4"
|
|
295
311
|
}, null)
|
|
@@ -297,40 +313,40 @@ const ut = /* @__PURE__ */ J({
|
|
|
297
313
|
default: () => i("components.button.autoRefresh")
|
|
298
314
|
})]), e("div", {
|
|
299
315
|
class: "flex gap-2 justify-end"
|
|
300
|
-
}, [l.actions?.(), t.actions?.length > 0 &&
|
|
316
|
+
}, [l.actions?.(), t.actions?.length > 0 && j({
|
|
301
317
|
type: n.value < 1024 ? "dropdown" : "button",
|
|
302
318
|
items: t.actions
|
|
303
319
|
})])])]), l?.header?.(), e("div", {
|
|
304
320
|
class: "flex-1 min-h-0"
|
|
305
321
|
}, [l?.default?.({
|
|
306
322
|
...b,
|
|
307
|
-
width:
|
|
323
|
+
width: _.value
|
|
308
324
|
})]), e("div", {
|
|
309
325
|
class: "flex justify-between"
|
|
310
|
-
}, [e("div", null, [l?.bottom?.()]), e("div", null, [t.pagination && e(
|
|
326
|
+
}, [e("div", null, [l?.bottom?.()]), e("div", null, [t.pagination && e(le, H(L.value, {
|
|
311
327
|
simple: n.value < 768
|
|
312
328
|
}), {
|
|
313
329
|
prefix: () => e("div", null, [i("components.list.total", {
|
|
314
330
|
total: b.total.value || 0
|
|
315
331
|
})])
|
|
316
|
-
})])]), e(
|
|
317
|
-
number:
|
|
332
|
+
})])]), e(ce, {
|
|
333
|
+
number: P.value.checkedRowKeys?.length || 0 || 0,
|
|
318
334
|
group: [[{
|
|
319
335
|
icon: "i-tabler:x",
|
|
320
336
|
onClick: () => {
|
|
321
|
-
|
|
337
|
+
D?.([]);
|
|
322
338
|
}
|
|
323
339
|
}], [{
|
|
324
340
|
label: i("components.button.export"),
|
|
325
341
|
icon: "i-tabler:file-export",
|
|
326
|
-
loading:
|
|
342
|
+
loading: F.value,
|
|
327
343
|
onClick: W
|
|
328
344
|
}, {
|
|
329
345
|
label: i("components.button.delete"),
|
|
330
346
|
type: "error",
|
|
331
347
|
icon: "i-tabler:trash"
|
|
332
348
|
}]]
|
|
333
|
-
}, null), e(
|
|
349
|
+
}, null), e(ie, {
|
|
334
350
|
draggable: !0,
|
|
335
351
|
class: "bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur min-w-110",
|
|
336
352
|
show: u.show,
|
|
@@ -340,41 +356,41 @@ const ut = /* @__PURE__ */ J({
|
|
|
340
356
|
draggableClass: o
|
|
341
357
|
}) => {
|
|
342
358
|
let a;
|
|
343
|
-
return e(
|
|
359
|
+
return e(re, {
|
|
344
360
|
title: i("components.button.filter"),
|
|
345
361
|
handle: o,
|
|
346
362
|
onClose: () => u.show = !1
|
|
347
363
|
}, {
|
|
348
|
-
default: () => [e(
|
|
364
|
+
default: () => [e(se, {
|
|
349
365
|
showLabel: !0,
|
|
350
366
|
labelPlacement: "top"
|
|
351
|
-
},
|
|
367
|
+
}, de(a = C(q)) ? a : {
|
|
352
368
|
default: () => [a]
|
|
353
369
|
})]
|
|
354
370
|
});
|
|
355
371
|
}
|
|
356
|
-
}), e(
|
|
372
|
+
}), e(R, {
|
|
357
373
|
show: c.show,
|
|
358
374
|
onUpdateShow: (o) => c.show = o,
|
|
359
375
|
autoFocus: !1,
|
|
360
376
|
placement: "left"
|
|
361
377
|
}, {
|
|
362
|
-
default: () => [e(
|
|
378
|
+
default: () => [e(S, {
|
|
363
379
|
title: t.sideLeftTitle || i("components.button.sideLeft"),
|
|
364
380
|
onClose: () => c.show = !1,
|
|
365
381
|
scrollbar: !1
|
|
366
382
|
}, {
|
|
367
383
|
default: () => [l?.sideLeft?.()]
|
|
368
384
|
})]
|
|
369
|
-
}), e(
|
|
370
|
-
show:
|
|
371
|
-
onUpdateShow: (o) =>
|
|
385
|
+
}), e(R, {
|
|
386
|
+
show: m.show,
|
|
387
|
+
onUpdateShow: (o) => m.show = o,
|
|
372
388
|
autoFocus: !1,
|
|
373
389
|
placement: "right"
|
|
374
390
|
}, {
|
|
375
|
-
default: () => [e(
|
|
391
|
+
default: () => [e(S, {
|
|
376
392
|
title: t.sideRightTitle || i("components.button.sideRight"),
|
|
377
|
-
onClose: () =>
|
|
393
|
+
onClose: () => m.show = !1,
|
|
378
394
|
scrollbar: !1
|
|
379
395
|
}, {
|
|
380
396
|
default: () => [l?.sideRight?.()]
|
|
@@ -384,5 +400,5 @@ const ut = /* @__PURE__ */ J({
|
|
|
384
400
|
}
|
|
385
401
|
});
|
|
386
402
|
export {
|
|
387
|
-
|
|
403
|
+
St as DuxTableLayout
|
|
388
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
|
};
|