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