@duxweb/dvha-pro 1.0.17 → 1.0.19
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/card/card.cjs +1 -1
- package/dist/cjs/components/chart/echart.cjs +1 -1
- package/dist/cjs/components/code/code.cjs +1 -0
- 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/drawer/drawer.cjs +1 -1
- package/dist/cjs/components/drawer/drawerPage.cjs +1 -1
- package/dist/cjs/components/form/formItem.cjs +1 -1
- package/dist/cjs/components/form/formLayout.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/settingForm.cjs +1 -1
- package/dist/cjs/components/icon/icon.cjs +1 -0
- package/dist/cjs/components/icon/iconPicker.cjs +1 -0
- package/dist/cjs/components/layout/filter.cjs +1 -1
- package/dist/cjs/components/layout/filterLayout.cjs +1 -0
- 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/modal/modal.cjs +1 -1
- package/dist/cjs/components/modal/modalPage.cjs +1 -1
- package/dist/cjs/components/panel/collapse.cjs +1 -0
- package/dist/cjs/components/panel/setting.cjs +1 -1
- package/dist/cjs/components/status/listEmpty.cjs +1 -0
- package/dist/cjs/components/table/table.cjs +1 -0
- package/dist/cjs/components/table/tablePage.cjs +1 -1
- package/dist/cjs/components/tree/treeFilter.cjs +1 -0
- package/dist/cjs/components/upload/config.cjs +1 -0
- 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/dvha-pro.css +1 -1
- package/dist/cjs/hooks/action.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/hooks/table.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/langs/en-US.json.cjs +1 -1
- package/dist/cjs/langs/zh-CN.json.cjs +1 -1
- package/dist/cjs/pages/authLayout.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/page.cjs +1 -1
- package/dist/cjs/pages/page404.cjs +1 -1
- package/dist/cjs/pages/pageStatus.cjs +1 -1
- package/dist/cjs/theme/naiveTheme.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +27 -7
- package/dist/esm/component.js +52 -47
- package/dist/esm/components/card/card.js +6 -6
- package/dist/esm/components/chart/echart.js +18 -6
- package/dist/esm/components/code/code.js +53 -0
- package/dist/esm/components/crop/imageCrop.js +38 -26
- package/dist/esm/components/data/dynamicSelect.js +31 -19
- package/dist/esm/components/data/selectModal.js +50 -38
- package/dist/esm/components/drawer/drawer.js +17 -28
- package/dist/esm/components/drawer/drawerPage.js +54 -17
- package/dist/esm/components/form/formItem.js +13 -13
- package/dist/esm/components/form/formLayout.js +8 -8
- package/dist/esm/components/form/modalForm.js +46 -36
- package/dist/esm/components/form/pageForm.js +82 -43
- package/dist/esm/components/form/settingForm.js +39 -27
- package/dist/esm/components/icon/icon.js +89 -0
- package/dist/esm/components/icon/iconPicker.js +83 -0
- package/dist/esm/components/layout/filter.js +15 -11
- package/dist/esm/components/layout/filterLayout.js +34 -0
- package/dist/esm/components/layout/list.js +207 -160
- package/dist/esm/components/layout/table.js +213 -185
- package/dist/esm/components/level/level.js +29 -17
- package/dist/esm/components/modal/modal.js +9 -9
- package/dist/esm/components/modal/modalPage.js +2 -2
- package/dist/esm/components/panel/collapse.js +49 -0
- package/dist/esm/components/panel/setting.js +3 -3
- package/dist/esm/components/status/listEmpty.js +26 -0
- package/dist/esm/components/table/table.js +110 -0
- package/dist/esm/components/table/tablePage.js +24 -18
- package/dist/esm/components/tree/treeFilter.js +212 -0
- package/dist/esm/components/upload/config.js +32 -0
- package/dist/esm/components/upload/file.js +143 -116
- package/dist/esm/components/upload/image.js +96 -66
- package/dist/esm/components/upload/manage/item.js +18 -6
- package/dist/esm/components/upload/manager.js +203 -164
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/hooks/action.js +77 -75
- package/dist/esm/hooks/dialog.js +14 -2
- package/dist/esm/hooks/drawer.js +14 -2
- package/dist/esm/hooks/modal.js +14 -2
- package/dist/esm/hooks/table/image.js +22 -10
- package/dist/esm/hooks/table/media.js +22 -10
- package/dist/esm/hooks/table.js +16 -13
- package/dist/esm/index.js +200 -184
- package/dist/esm/langs/en-US.json.js +1 -1
- package/dist/esm/langs/zh-CN.json.js +1 -1
- package/dist/esm/pages/authLayout.js +23 -11
- package/dist/esm/pages/layout/page.js +29 -17
- package/dist/esm/pages/login.js +41 -29
- package/dist/esm/pages/menu/avatar.js +46 -34
- package/dist/esm/pages/menu/button.js +26 -14
- package/dist/esm/pages/menu/cmd.js +46 -34
- package/dist/esm/pages/menu/main.js +41 -27
- package/dist/esm/pages/menu/mobile.js +14 -2
- package/dist/esm/pages/page.js +1 -1
- package/dist/esm/pages/page404.js +21 -9
- package/dist/esm/pages/pageStatus.js +33 -16
- package/dist/esm/theme/naiveTheme.js +6 -6
- package/dist/esm/theme/uno.css.js +27 -7
- package/dist/types/components/code/code.d.ts +44 -0
- package/dist/types/components/code/index.d.ts +1 -0
- package/dist/types/components/drawer/drawer.d.ts +2 -0
- package/dist/types/components/drawer/drawerPage.d.ts +20 -1
- package/dist/types/components/form/formItem.d.ts +2 -2
- package/dist/types/components/form/formLayout.d.ts +3 -3
- package/dist/types/components/form/modalForm.d.ts +3 -3
- package/dist/types/components/form/pageForm.d.ts +12 -0
- package/dist/types/components/icon/icon.d.ts +7 -0
- package/dist/types/components/icon/iconPicker.d.ts +9 -0
- package/dist/types/components/icon/index.d.ts +2 -0
- package/dist/types/components/index.d.ts +3 -0
- package/dist/types/components/layout/filterLayout.d.ts +32 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/dist/types/components/layout/table.d.ts +3 -0
- package/dist/types/components/panel/collapse.d.ts +14 -0
- package/dist/types/components/panel/index.d.ts +1 -0
- package/dist/types/components/select/cardSelect.d.ts +1 -1
- package/dist/types/components/status/index.d.ts +1 -0
- package/dist/types/components/status/listEmpty.d.ts +11 -0
- package/dist/types/components/table/index.d.ts +1 -0
- package/dist/types/components/table/table.d.ts +6552 -0
- package/dist/types/components/table/tablePage.d.ts +3 -0
- package/dist/types/components/tree/index.d.ts +1 -0
- package/dist/types/components/tree/treeFilter.d.ts +24 -0
- package/dist/types/components/upload/config.d.ts +13 -0
- package/dist/types/components/upload/file.d.ts +4 -0
- package/dist/types/components/upload/image.d.ts +30 -2
- package/dist/types/components/upload/manager.d.ts +4 -0
- package/dist/types/hooks/drawer.d.ts +1 -0
- package/dist/types/hooks/table/types.d.ts +1 -0
- package/dist/types/main.d.ts +6 -0
- package/dist/types/pages/pageStatus.d.ts +11 -1
- package/package.json +6 -4
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useWindowSize as
|
|
4
|
-
import {
|
|
5
|
-
import { useAction as
|
|
1
|
+
import { defineComponent as te, toRef as P, computed as b, reactive as s, createVNode as t, h as A, mergeProps as ie, isVNode as ae } from "vue";
|
|
2
|
+
import { useI18n as re, useJsonSchema as O } from "@duxweb/dvha-core";
|
|
3
|
+
import { useWindowSize as ne } from "@vueuse/core";
|
|
4
|
+
import { NTabs as oe, NTab as le, NButton as l, NPopselect as ue, NTooltip as h, NProgress as ce, NPagination as de, NModal as pe, NDrawer as U } from "naive-ui";
|
|
5
|
+
import { useAction as fe } from "../../hooks/action.js";
|
|
6
6
|
import "@overlastic/vue";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "vue-echarts";
|
|
9
9
|
import "vue-cropper";
|
|
10
|
+
import me from "../modal/modalPage.js";
|
|
10
11
|
import "jinrishici";
|
|
11
12
|
import "lodash-es";
|
|
12
13
|
import "vue-draggable-plus";
|
|
14
|
+
import { DuxDrawerPage as E } from "../drawer/drawerPage.js";
|
|
13
15
|
import "aieditor";
|
|
14
16
|
import "vee-validate";
|
|
17
|
+
import "vue-router";
|
|
15
18
|
import "@vee-validate/i18n";
|
|
16
19
|
import "colorizr";
|
|
17
20
|
import "echarts";
|
|
@@ -21,20 +24,34 @@ import "@unocss/preset-typography";
|
|
|
21
24
|
import "unocss/preset-wind4";
|
|
22
25
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
23
26
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
24
|
-
import "vue-router";
|
|
25
27
|
import "vue-command-palette";
|
|
26
28
|
import "@duxweb/dvha-naiveui";
|
|
27
|
-
import { DuxPage as
|
|
29
|
+
import { DuxPage as be } from "../../pages/page.js";
|
|
28
30
|
import "../../pages/page404.js";
|
|
29
|
-
import
|
|
30
|
-
import {
|
|
31
|
+
import "@iconify-json/tabler/icons.json";
|
|
32
|
+
import { DuxTableFilter as he } from "./filter.js";
|
|
33
|
+
import { DuxFilterLayout as ge } from "./filterLayout.js";
|
|
34
|
+
import { DuxTableTools as ve } from "./tools.js";
|
|
31
35
|
import "mime";
|
|
36
|
+
import "vue3-ace-editor";
|
|
37
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
38
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
39
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
40
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
41
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
42
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
43
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
44
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
45
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
46
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
32
47
|
import "dayjs";
|
|
33
|
-
import { useDrawer as xe } from "../../hooks/drawer.js";
|
|
34
48
|
import "@tanstack/vue-query";
|
|
35
|
-
import { useTable as
|
|
49
|
+
import { useTable as we } from "../../hooks/table.js";
|
|
36
50
|
import "pinia";
|
|
37
|
-
|
|
51
|
+
function ye(i) {
|
|
52
|
+
return typeof i == "function" || Object.prototype.toString.call(i) === "[object Object]" && !ae(i);
|
|
53
|
+
}
|
|
54
|
+
const gt = /* @__PURE__ */ te({
|
|
38
55
|
name: "DuxTableLayout",
|
|
39
56
|
props: {
|
|
40
57
|
path: {
|
|
@@ -51,7 +68,8 @@ const it = /* @__PURE__ */ $({
|
|
|
51
68
|
type: Array
|
|
52
69
|
},
|
|
53
70
|
pagination: {
|
|
54
|
-
type: [Boolean, Object]
|
|
71
|
+
type: [Boolean, Object],
|
|
72
|
+
default: !0
|
|
55
73
|
},
|
|
56
74
|
tabs: {
|
|
57
75
|
type: Array
|
|
@@ -72,164 +90,130 @@ const it = /* @__PURE__ */ $({
|
|
|
72
90
|
default: ""
|
|
73
91
|
}
|
|
74
92
|
},
|
|
75
|
-
setup(
|
|
93
|
+
setup(i, {
|
|
76
94
|
slots: e
|
|
77
95
|
}) {
|
|
78
|
-
var
|
|
79
|
-
const
|
|
80
|
-
t:
|
|
81
|
-
} =
|
|
82
|
-
renderAction:
|
|
83
|
-
} =
|
|
84
|
-
path:
|
|
85
|
-
filters:
|
|
86
|
-
columns:
|
|
87
|
-
pagination:
|
|
96
|
+
var S, k;
|
|
97
|
+
const g = P(i, "filter", {}), F = P(i, "columns", []), {
|
|
98
|
+
t: n
|
|
99
|
+
} = re(), {
|
|
100
|
+
renderAction: V
|
|
101
|
+
} = fe(), v = we({
|
|
102
|
+
path: i.path,
|
|
103
|
+
filters: g.value,
|
|
104
|
+
columns: F,
|
|
105
|
+
pagination: i.pagination
|
|
88
106
|
}), {
|
|
89
|
-
|
|
90
|
-
columns: w,
|
|
107
|
+
columns: R,
|
|
91
108
|
tablePagination: W,
|
|
92
|
-
table:
|
|
109
|
+
table: I,
|
|
93
110
|
onUpdateColumnSelected: B,
|
|
94
|
-
onUpdateChecked:
|
|
95
|
-
columnSelected:
|
|
96
|
-
autoRefetch:
|
|
97
|
-
autoCountdown:
|
|
98
|
-
onAutoRefetch:
|
|
99
|
-
isExporting:
|
|
100
|
-
isExportingRows:
|
|
101
|
-
isImporting:
|
|
102
|
-
onExport:
|
|
103
|
-
onExportRows:
|
|
104
|
-
onImport:
|
|
105
|
-
} =
|
|
106
|
-
label:
|
|
107
|
-
value:
|
|
111
|
+
onUpdateChecked: w,
|
|
112
|
+
columnSelected: M,
|
|
113
|
+
autoRefetch: _,
|
|
114
|
+
autoCountdown: C,
|
|
115
|
+
onAutoRefetch: q,
|
|
116
|
+
isExporting: J,
|
|
117
|
+
isExportingRows: K,
|
|
118
|
+
isImporting: G,
|
|
119
|
+
onExport: H,
|
|
120
|
+
onExportRows: Q,
|
|
121
|
+
onImport: X
|
|
122
|
+
} = v, Y = b(() => R.value.filter((r) => "title" in r && "key" in r).map((r) => ({
|
|
123
|
+
label: r.title,
|
|
124
|
+
value: r.key
|
|
108
125
|
}))), {
|
|
109
126
|
width: u
|
|
110
|
-
} =
|
|
111
|
-
show: !1
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
i > 35 ? d.show = !0 : d.show = !1;
|
|
118
|
-
}, {
|
|
119
|
-
immediate: !0,
|
|
120
|
-
deep: !0
|
|
121
|
-
});
|
|
122
|
-
const h = p(() => (a.filterSchema || []).map((i) => {
|
|
127
|
+
} = ne(), Z = b(() => R.value.reduce((c, o) => c + (Number(o == null ? void 0 : o.width) || Number(o == null ? void 0 : o.minWidth) || 110), 0)), p = s({
|
|
128
|
+
show: !1
|
|
129
|
+
}), f = s({
|
|
130
|
+
show: !1
|
|
131
|
+
}), m = s({
|
|
132
|
+
show: !1
|
|
133
|
+
}), y = b(() => (i.filterSchema || []).map((r) => {
|
|
123
134
|
const {
|
|
124
|
-
|
|
125
|
-
...
|
|
126
|
-
} =
|
|
135
|
+
label: c,
|
|
136
|
+
...o
|
|
137
|
+
} = r;
|
|
127
138
|
return {
|
|
128
|
-
tag:
|
|
139
|
+
tag: he,
|
|
129
140
|
attrs: {
|
|
130
141
|
label: c
|
|
131
142
|
},
|
|
132
|
-
children:
|
|
143
|
+
children: o
|
|
133
144
|
};
|
|
134
145
|
})), {
|
|
135
|
-
render:
|
|
136
|
-
} =
|
|
137
|
-
data: (
|
|
138
|
-
components: {
|
|
139
|
-
NInput: I
|
|
140
|
-
}
|
|
146
|
+
render: $
|
|
147
|
+
} = O({
|
|
148
|
+
data: (S = y.value) == null ? void 0 : S.slice(1)
|
|
141
149
|
}), {
|
|
142
|
-
render:
|
|
143
|
-
} =
|
|
144
|
-
data: (
|
|
145
|
-
|
|
146
|
-
NInput: I
|
|
147
|
-
}
|
|
148
|
-
}), x = p(() => ({
|
|
150
|
+
render: ee
|
|
151
|
+
} = O({
|
|
152
|
+
data: (k = y.value) == null ? void 0 : k.slice(0, 1)
|
|
153
|
+
}), x = b(() => ({
|
|
149
154
|
import: !0,
|
|
150
155
|
export: !0,
|
|
151
156
|
refresh: !0,
|
|
152
|
-
...
|
|
153
|
-
}))
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
return () => t(ve, {
|
|
157
|
-
actions: a.actions,
|
|
157
|
+
...i.tools
|
|
158
|
+
}));
|
|
159
|
+
return () => t(be, {
|
|
160
|
+
actions: i.actions,
|
|
158
161
|
scrollbar: !1
|
|
159
162
|
}, {
|
|
160
163
|
sideLeft: () => {
|
|
161
|
-
var
|
|
162
|
-
return e != null && e.sideLeft && u.value >= 1024 ? (
|
|
164
|
+
var r;
|
|
165
|
+
return e != null && e.sideLeft && u.value >= 1024 ? (r = e == null ? void 0 : e.sideLeft) == null ? void 0 : r.call(e) : void 0;
|
|
163
166
|
},
|
|
164
167
|
sideRight: () => {
|
|
165
|
-
var
|
|
166
|
-
return e != null && e.sideRight && u.value >= 1024 ? (
|
|
168
|
+
var r;
|
|
169
|
+
return e != null && e.sideRight && u.value >= 1024 ? (r = e == null ? void 0 : e.sideRight) == null ? void 0 : r.call(e) : void 0;
|
|
167
170
|
},
|
|
168
171
|
default: () => {
|
|
169
|
-
var
|
|
172
|
+
var r, c, o, j, L, N, T, z, D;
|
|
170
173
|
return t("div", {
|
|
171
|
-
class: "flex flex-col gap-
|
|
174
|
+
class: "flex flex-col gap-2 h-full relative"
|
|
172
175
|
}, [t("div", {
|
|
173
|
-
class: "flex gap-
|
|
174
|
-
}, [
|
|
176
|
+
class: "flex gap-2 justify-between flex-col lg:flex-row"
|
|
177
|
+
}, [i.tabs && t("div", {
|
|
175
178
|
class: "flex flex-none"
|
|
176
|
-
}, [t(
|
|
179
|
+
}, [t(oe, {
|
|
177
180
|
type: "segment",
|
|
178
181
|
size: "small",
|
|
179
182
|
style: {
|
|
180
183
|
"--n-tab-padding": "4px 10px"
|
|
181
184
|
},
|
|
182
|
-
"default-value": (c = (
|
|
183
|
-
value: (
|
|
184
|
-
onUpdateValue: (
|
|
185
|
-
|
|
185
|
+
"default-value": (c = (r = i.tabs) == null ? void 0 : r[0]) == null ? void 0 : c.value,
|
|
186
|
+
value: (o = g.value) == null ? void 0 : o.tab,
|
|
187
|
+
onUpdateValue: (a) => {
|
|
188
|
+
g.value.tab = a;
|
|
186
189
|
}
|
|
187
190
|
}, {
|
|
188
191
|
default: () => {
|
|
189
|
-
var
|
|
190
|
-
return [(
|
|
191
|
-
name:
|
|
192
|
-
tab:
|
|
192
|
+
var a;
|
|
193
|
+
return [(a = i.tabs) == null ? void 0 : a.map((d) => t(le, {
|
|
194
|
+
name: d.value,
|
|
195
|
+
tab: d.label
|
|
193
196
|
}, null))];
|
|
194
197
|
}
|
|
195
198
|
})]), t("div", {
|
|
196
|
-
class: ["overflow-hidden flex-1 flex gap-2"
|
|
197
|
-
}, [(e == null ? void 0 : e.sideLeft) && u.value < 1024 && t(
|
|
199
|
+
class: ["overflow-hidden flex-1 flex gap-2"]
|
|
200
|
+
}, [(e == null ? void 0 : e.sideLeft) && u.value < 1024 && t(l, {
|
|
198
201
|
class: "flex-none",
|
|
199
202
|
secondary: !0,
|
|
200
|
-
loading: b.value,
|
|
201
203
|
onClick: () => {
|
|
202
|
-
|
|
203
|
-
title: a.sideLeftTitle,
|
|
204
|
-
component: () => {
|
|
205
|
-
var r;
|
|
206
|
-
return t("div", null, [(r = e == null ? void 0 : e.sideLeft) == null ? void 0 : r.call(e)]);
|
|
207
|
-
},
|
|
208
|
-
width: 300,
|
|
209
|
-
placement: "left"
|
|
210
|
-
});
|
|
204
|
+
f.show = !f.show;
|
|
211
205
|
}
|
|
212
206
|
}, {
|
|
213
207
|
icon: () => t("div", {
|
|
214
208
|
class: "i-tabler:layout-sidebar-inactive size-4"
|
|
215
209
|
}, null)
|
|
216
210
|
}), t("div", {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}, [D(_)]), (e == null ? void 0 : e.sideRight) && u.value < 1024 && t(o, {
|
|
211
|
+
class: ["flex-1 lg:flex gap-2 flex-wrap", i.tabs ? "justify-end" : "justify-start"]
|
|
212
|
+
}, [A(ee)]), (e == null ? void 0 : e.sideRight) && u.value < 1024 && t(l, {
|
|
220
213
|
class: "flex-none",
|
|
221
214
|
secondary: !0,
|
|
222
|
-
loading: b.value,
|
|
223
215
|
onClick: () => {
|
|
224
|
-
|
|
225
|
-
title: a.sideRightTitle,
|
|
226
|
-
component: () => {
|
|
227
|
-
var r;
|
|
228
|
-
return t("div", null, [(r = e == null ? void 0 : e.sideRight) == null ? void 0 : r.call(e)]);
|
|
229
|
-
},
|
|
230
|
-
width: 300,
|
|
231
|
-
placement: "right"
|
|
232
|
-
});
|
|
216
|
+
m.show = !m.show;
|
|
233
217
|
}
|
|
234
218
|
}, {
|
|
235
219
|
icon: () => t("div", {
|
|
@@ -237,38 +221,30 @@ const it = /* @__PURE__ */ $({
|
|
|
237
221
|
}, null)
|
|
238
222
|
})]), t("div", {
|
|
239
223
|
class: "flex gap-2 justify-between lg:justify-end"
|
|
240
|
-
}, [
|
|
241
|
-
trigger: "click",
|
|
242
|
-
displayDirective: "show"
|
|
243
|
-
}, {
|
|
244
|
-
trigger: () => t(o, {
|
|
245
|
-
iconPlacement: "right",
|
|
246
|
-
onClick: () => {
|
|
247
|
-
d.collapse = !d.collapse;
|
|
248
|
-
}
|
|
249
|
-
}, {
|
|
250
|
-
default: () => l("components.button.filter"),
|
|
251
|
-
icon: () => t("div", {
|
|
252
|
-
class: ["i-tabler:chevrons-down size-4 transition-all"]
|
|
253
|
-
}, null)
|
|
254
|
-
}),
|
|
255
|
-
default: () => t("div", {
|
|
256
|
-
class: "flex flex-col gap-2 py-1"
|
|
257
|
-
}, [D(Z)])
|
|
258
|
-
}), t("div", {
|
|
224
|
+
}, [t("div", {
|
|
259
225
|
class: "flex gap-2 items-center"
|
|
260
|
-
}, [
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
226
|
+
}, [y.value.length > 1 && t(l, {
|
|
227
|
+
iconPlacement: "right",
|
|
228
|
+
onClick: () => {
|
|
229
|
+
p.show = !p.show;
|
|
230
|
+
}
|
|
231
|
+
}, {
|
|
232
|
+
default: () => n("components.button.filter"),
|
|
233
|
+
icon: () => t("div", {
|
|
234
|
+
class: ["i-tabler:chevrons-down size-4 transition-all"]
|
|
235
|
+
}, null)
|
|
236
|
+
}), (j = e == null ? void 0 : e.tools) == null ? void 0 : j.call(e), t(ue, {
|
|
237
|
+
options: Y.value,
|
|
238
|
+
value: M.value,
|
|
239
|
+
onUpdateValue: (a) => {
|
|
240
|
+
B(a);
|
|
265
241
|
},
|
|
266
242
|
multiple: !0,
|
|
267
243
|
placement: "bottom-start",
|
|
268
244
|
trigger: "click"
|
|
269
245
|
}, {
|
|
270
|
-
default: () => [t(
|
|
271
|
-
trigger: () => t(
|
|
246
|
+
default: () => [t(h, null, {
|
|
247
|
+
trigger: () => t(l, {
|
|
272
248
|
secondary: !0,
|
|
273
249
|
"icon-placement": "right"
|
|
274
250
|
}, {
|
|
@@ -276,93 +252,145 @@ const it = /* @__PURE__ */ $({
|
|
|
276
252
|
class: "i-tabler:columns size-4"
|
|
277
253
|
}, null)
|
|
278
254
|
}),
|
|
279
|
-
default: () =>
|
|
255
|
+
default: () => n("components.list.columnSetting")
|
|
280
256
|
})]
|
|
281
|
-
}), x.value.export && t(
|
|
282
|
-
trigger: () => t(
|
|
257
|
+
}), x.value.export && t(h, null, {
|
|
258
|
+
trigger: () => t(l, {
|
|
283
259
|
secondary: !0,
|
|
284
|
-
loading:
|
|
285
|
-
onClick:
|
|
260
|
+
loading: J.value,
|
|
261
|
+
onClick: H
|
|
286
262
|
}, {
|
|
287
263
|
icon: () => t("div", {
|
|
288
264
|
class: "i-tabler:database-export size-4"
|
|
289
265
|
}, null)
|
|
290
266
|
}),
|
|
291
|
-
default: () =>
|
|
292
|
-
}), x.value.import && t(
|
|
293
|
-
trigger: () => t(
|
|
267
|
+
default: () => n("components.button.export")
|
|
268
|
+
}), x.value.import && t(h, null, {
|
|
269
|
+
trigger: () => t(l, {
|
|
294
270
|
secondary: !0,
|
|
295
|
-
loading:
|
|
296
|
-
onClick:
|
|
271
|
+
loading: G.value,
|
|
272
|
+
onClick: X
|
|
297
273
|
}, {
|
|
298
274
|
icon: () => t("div", {
|
|
299
275
|
class: "i-tabler:database-import size-4"
|
|
300
276
|
}, null)
|
|
301
277
|
}),
|
|
302
|
-
default: () =>
|
|
303
|
-
}), x.value.refresh && t(
|
|
304
|
-
trigger: () => t(
|
|
278
|
+
default: () => n("components.button.import")
|
|
279
|
+
}), x.value.refresh && t(h, null, {
|
|
280
|
+
trigger: () => t(l, {
|
|
305
281
|
secondary: !0,
|
|
306
|
-
onClick:
|
|
282
|
+
onClick: q
|
|
307
283
|
}, {
|
|
308
|
-
icon: () =>
|
|
284
|
+
icon: () => _.value ? t(ce, {
|
|
309
285
|
class: "size-4",
|
|
310
286
|
type: "circle",
|
|
311
|
-
percentage:
|
|
287
|
+
percentage: C.value * 10,
|
|
312
288
|
strokeWidth: 20,
|
|
313
289
|
color: "rgba(var(--ui-color-primary))"
|
|
314
290
|
}, {
|
|
315
291
|
default: () => [t("span", {
|
|
316
292
|
class: "text-8px"
|
|
317
|
-
}, [
|
|
293
|
+
}, [C.value])]
|
|
318
294
|
}) : t("div", {
|
|
319
295
|
class: "i-tabler:refresh size-4"
|
|
320
296
|
}, null)
|
|
321
297
|
}),
|
|
322
|
-
default: () =>
|
|
298
|
+
default: () => n("components.button.autoRefresh")
|
|
323
299
|
})]), t("div", {
|
|
324
300
|
class: "flex gap-2 justify-end"
|
|
325
|
-
}, [(
|
|
301
|
+
}, [(L = e.actions) == null ? void 0 : L.call(e), ((N = i.actions) == null ? void 0 : N.length) > 0 && V({
|
|
326
302
|
type: u.value < 1024 ? "dropdown" : "button",
|
|
327
|
-
items:
|
|
303
|
+
items: i.actions
|
|
328
304
|
})])])]), t("div", {
|
|
329
305
|
class: "flex-1 min-h-0"
|
|
330
|
-
}, [(
|
|
331
|
-
...
|
|
332
|
-
width:
|
|
306
|
+
}, [(T = e == null ? void 0 : e.default) == null ? void 0 : T.call(e, {
|
|
307
|
+
...v,
|
|
308
|
+
width: Z.value
|
|
333
309
|
})]), t("div", {
|
|
334
310
|
class: "flex justify-between"
|
|
335
|
-
}, [t("div", null, [(
|
|
311
|
+
}, [t("div", null, [(z = e == null ? void 0 : e.bottom) == null ? void 0 : z.call(e)]), t("div", null, [i.pagination && t(de, ie(W.value, {
|
|
336
312
|
simple: u.value < 768
|
|
337
313
|
}), {
|
|
338
|
-
prefix: () => {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
})])]), t(he, {
|
|
345
|
-
number: ((P = V.value.checkedRowKeys) == null ? void 0 : P.length) || 0 || 0,
|
|
314
|
+
prefix: () => t("div", null, [n("components.list.total", {
|
|
315
|
+
total: v.total.value || 0
|
|
316
|
+
})])
|
|
317
|
+
})])]), t(ve, {
|
|
318
|
+
number: ((D = I.value.checkedRowKeys) == null ? void 0 : D.length) || 0 || 0,
|
|
346
319
|
group: [[{
|
|
347
320
|
icon: "i-tabler:x",
|
|
348
321
|
onClick: () => {
|
|
349
|
-
|
|
322
|
+
w == null || w([]);
|
|
350
323
|
}
|
|
351
324
|
}], [{
|
|
352
|
-
label:
|
|
325
|
+
label: n("components.button.export"),
|
|
353
326
|
icon: "i-tabler:file-export",
|
|
354
|
-
loading:
|
|
355
|
-
onClick:
|
|
327
|
+
loading: K.value,
|
|
328
|
+
onClick: Q
|
|
356
329
|
}, {
|
|
357
|
-
label:
|
|
330
|
+
label: n("components.button.delete"),
|
|
358
331
|
type: "error",
|
|
359
332
|
icon: "i-tabler:trash"
|
|
360
333
|
}]]
|
|
361
|
-
}, null)
|
|
334
|
+
}, null), t(pe, {
|
|
335
|
+
draggable: !0,
|
|
336
|
+
class: "bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur",
|
|
337
|
+
show: p.show,
|
|
338
|
+
onUpdateShow: (a) => p.show = a
|
|
339
|
+
}, {
|
|
340
|
+
default: ({
|
|
341
|
+
draggableClass: a
|
|
342
|
+
}) => {
|
|
343
|
+
let d;
|
|
344
|
+
return t(me, {
|
|
345
|
+
title: n("components.button.filter"),
|
|
346
|
+
handle: a,
|
|
347
|
+
onClose: () => p.show = !1
|
|
348
|
+
}, {
|
|
349
|
+
default: () => [t(ge, {
|
|
350
|
+
showLabel: !0,
|
|
351
|
+
labelPlacement: "top"
|
|
352
|
+
}, ye(d = A($)) ? d : {
|
|
353
|
+
default: () => [d]
|
|
354
|
+
})]
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
}), t(U, {
|
|
358
|
+
show: f.show,
|
|
359
|
+
onUpdateShow: (a) => f.show = a,
|
|
360
|
+
autoFocus: !1,
|
|
361
|
+
placement: "left"
|
|
362
|
+
}, {
|
|
363
|
+
default: () => [t(E, {
|
|
364
|
+
title: i.sideLeftTitle || n("components.button.sideLeft"),
|
|
365
|
+
onClose: () => f.show = !1,
|
|
366
|
+
scrollbar: !1
|
|
367
|
+
}, {
|
|
368
|
+
default: () => {
|
|
369
|
+
var a;
|
|
370
|
+
return [(a = e == null ? void 0 : e.sideLeft) == null ? void 0 : a.call(e)];
|
|
371
|
+
}
|
|
372
|
+
})]
|
|
373
|
+
}), t(U, {
|
|
374
|
+
show: m.show,
|
|
375
|
+
onUpdateShow: (a) => m.show = a,
|
|
376
|
+
autoFocus: !1,
|
|
377
|
+
placement: "right"
|
|
378
|
+
}, {
|
|
379
|
+
default: () => [t(E, {
|
|
380
|
+
title: i.sideRightTitle || n("components.button.sideRight"),
|
|
381
|
+
onClose: () => m.show = !1,
|
|
382
|
+
scrollbar: !1
|
|
383
|
+
}, {
|
|
384
|
+
default: () => {
|
|
385
|
+
var a;
|
|
386
|
+
return [(a = e == null ? void 0 : e.sideRight) == null ? void 0 : a.call(e)];
|
|
387
|
+
}
|
|
388
|
+
})]
|
|
389
|
+
})]);
|
|
362
390
|
}
|
|
363
391
|
});
|
|
364
392
|
}
|
|
365
393
|
});
|
|
366
394
|
export {
|
|
367
|
-
|
|
395
|
+
gt as DuxTableLayout
|
|
368
396
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as v, computed as f, createVNode as
|
|
1
|
+
import { defineComponent as v, computed as f, createVNode as o } from "vue";
|
|
2
2
|
import { useVModel as g } from "@vueuse/core";
|
|
3
3
|
import { NSelect as s } from "naive-ui";
|
|
4
4
|
import "@duxweb/dvha-core";
|
|
@@ -24,11 +24,23 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
24
24
|
import "vue-command-palette";
|
|
25
25
|
import "@duxweb/dvha-naiveui";
|
|
26
26
|
import "../../pages/page404.js";
|
|
27
|
+
import "@iconify-json/tabler/icons.json";
|
|
27
28
|
import "mime";
|
|
29
|
+
import "vue3-ace-editor";
|
|
30
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
31
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
32
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
33
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
34
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
35
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
36
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
37
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
38
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
39
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
28
40
|
import "dayjs";
|
|
29
41
|
import { useLevel as c } from "../../hooks/level.js";
|
|
30
42
|
import "pinia";
|
|
31
|
-
const
|
|
43
|
+
const me = /* @__PURE__ */ v({
|
|
32
44
|
name: "DuxLevel",
|
|
33
45
|
props: {
|
|
34
46
|
value: {
|
|
@@ -58,46 +70,46 @@ const R = /* @__PURE__ */ v({
|
|
|
58
70
|
},
|
|
59
71
|
emits: ["update:value"],
|
|
60
72
|
setup(e, {
|
|
61
|
-
emit:
|
|
73
|
+
emit: m
|
|
62
74
|
}) {
|
|
63
|
-
const
|
|
75
|
+
const r = g(e, "value", m, {
|
|
64
76
|
passive: !0,
|
|
65
77
|
defaultValue: []
|
|
66
78
|
}), {
|
|
67
|
-
regions:
|
|
68
|
-
onChange:
|
|
79
|
+
regions: a,
|
|
80
|
+
onChange: l,
|
|
69
81
|
isLoading: p
|
|
70
82
|
} = c({
|
|
71
|
-
value:
|
|
83
|
+
value: r,
|
|
72
84
|
path: e.path,
|
|
73
85
|
nameField: e.nameField,
|
|
74
86
|
maxLevel: e.maxLevel,
|
|
75
87
|
labelField: e.labelField,
|
|
76
88
|
valueField: e.valueField
|
|
77
|
-
}), u = (t,
|
|
78
|
-
|
|
89
|
+
}), u = (t, i) => {
|
|
90
|
+
l(t, i);
|
|
79
91
|
}, n = f(() => Array.from({
|
|
80
92
|
length: e.maxLevel
|
|
81
|
-
}, (t,
|
|
82
|
-
const d =
|
|
93
|
+
}, (t, i) => {
|
|
94
|
+
const d = a.value[i] || [];
|
|
83
95
|
return {
|
|
84
|
-
index:
|
|
96
|
+
index: i,
|
|
85
97
|
options: d,
|
|
86
|
-
value:
|
|
98
|
+
value: r.value[i] || null
|
|
87
99
|
};
|
|
88
100
|
}));
|
|
89
|
-
return () =>
|
|
101
|
+
return () => o("div", {
|
|
90
102
|
class: ["grid grid-cols-1 gap-2", "lg:grid-cols-[repeat(auto-fit,minmax(120px,1fr))]"]
|
|
91
|
-
}, [n.value.map((t) =>
|
|
103
|
+
}, [n.value.map((t) => o(s, {
|
|
92
104
|
key: t.index,
|
|
93
105
|
value: t.value,
|
|
94
106
|
options: t.options,
|
|
95
107
|
clearable: !0,
|
|
96
108
|
loading: p.value,
|
|
97
|
-
onUpdateValue: (
|
|
109
|
+
onUpdateValue: (i) => u(i, t.index)
|
|
98
110
|
}, null))]);
|
|
99
111
|
}
|
|
100
112
|
});
|
|
101
113
|
export {
|
|
102
|
-
|
|
114
|
+
me as DuxLevel
|
|
103
115
|
};
|