@duxweb/dvha-pro 1.0.23 → 1.0.24
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/card/card.cjs +1 -1
- package/dist/cjs/components/card/store.cjs +1 -1
- package/dist/cjs/components/carousel/carousel.cjs +1 -1
- package/dist/cjs/components/crop/imageCrop.cjs +1 -1
- package/dist/cjs/components/crop/imageCropModal.cjs +1 -1
- package/dist/cjs/components/dashboard/hello.cjs +1 -1
- package/dist/cjs/components/dashboard/helloBig.cjs +1 -1
- package/dist/cjs/components/dashboard/quick.cjs +1 -1
- package/dist/cjs/components/data/dynamicData.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/dialog/dialog.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/editor/aiEditor.cjs +1 -1
- package/dist/cjs/components/form/drawerForm.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/iconPicker.cjs +1 -1
- package/dist/cjs/components/layout/filter.cjs +1 -1
- package/dist/cjs/components/layout/filterLayout.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/layout/tools.cjs +1 -1
- package/dist/cjs/components/list/card.cjs +1 -1
- package/dist/cjs/components/list/list.cjs +1 -1
- package/dist/cjs/components/media/media.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/modal/modalTab.cjs +1 -1
- package/dist/cjs/components/panel/alert.cjs +1 -1
- package/dist/cjs/components/panel/collapse.cjs +1 -1
- package/dist/cjs/components/panel/setting.cjs +1 -1
- package/dist/cjs/components/select/cardSelect.cjs +1 -1
- package/dist/cjs/components/status/listEmpty.cjs +1 -1
- 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 -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/components/widget/connect.cjs +1 -1
- package/dist/cjs/dvha-pro.css +1 -1
- package/dist/cjs/hooks/action.cjs +1 -1
- package/dist/cjs/hooks/download.cjs +1 -1
- package/dist/cjs/hooks/echart.cjs +1 -1
- package/dist/cjs/hooks/image.cjs +1 -1
- package/dist/cjs/hooks/level.cjs +1 -1
- package/dist/cjs/hooks/table/color.cjs +1 -0
- package/dist/cjs/hooks/table/column.cjs +1 -1
- package/dist/cjs/hooks/table/image.cjs +1 -1
- package/dist/cjs/hooks/table/input.cjs +1 -1
- package/dist/cjs/hooks/table/map.cjs +1 -1
- package/dist/cjs/hooks/table/status.cjs +1 -1
- package/dist/cjs/hooks/table/switch.cjs +1 -1
- package/dist/cjs/hooks/table.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/pages/layout/global.cjs +1 -1
- package/dist/cjs/pages/layout/tab.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/page.cjs +1 -1
- package/dist/cjs/pages/pageStatus.cjs +1 -1
- package/dist/cjs/stores/ui.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +2 -1
- package/dist/esm/components/card/card.js +24 -27
- package/dist/esm/components/card/store.js +33 -39
- package/dist/esm/components/carousel/carousel.js +16 -19
- package/dist/esm/components/crop/imageCrop.js +32 -35
- package/dist/esm/components/crop/imageCropModal.js +36 -37
- package/dist/esm/components/dashboard/hello.js +27 -30
- package/dist/esm/components/dashboard/helloBig.js +328 -331
- package/dist/esm/components/dashboard/quick.js +30 -33
- package/dist/esm/components/data/dynamicData.js +86 -98
- package/dist/esm/components/data/dynamicSelect.js +29 -31
- package/dist/esm/components/data/selectModal.js +45 -49
- package/dist/esm/components/dialog/dialog.js +54 -55
- package/dist/esm/components/drawer/drawer.js +23 -23
- package/dist/esm/components/drawer/drawerPage.js +39 -49
- package/dist/esm/components/editor/aiEditor.js +64 -70
- package/dist/esm/components/form/drawerForm.js +48 -48
- package/dist/esm/components/form/formItem.js +45 -51
- package/dist/esm/components/form/formLayout.js +7 -10
- package/dist/esm/components/form/modalForm.js +50 -50
- package/dist/esm/components/form/pageForm.js +47 -50
- package/dist/esm/components/form/settingForm.js +34 -37
- package/dist/esm/components/icon/iconPicker.js +54 -58
- package/dist/esm/components/layout/filter.js +13 -16
- package/dist/esm/components/layout/filterLayout.js +7 -10
- package/dist/esm/components/layout/list.js +299 -326
- package/dist/esm/components/layout/table.js +268 -283
- package/dist/esm/components/layout/tools.js +38 -41
- package/dist/esm/components/list/card.js +35 -38
- package/dist/esm/components/list/list.js +15 -18
- package/dist/esm/components/media/media.js +35 -36
- package/dist/esm/components/modal/modal.js +10 -10
- package/dist/esm/components/modal/modalPage.js +32 -36
- package/dist/esm/components/modal/modalTab.js +39 -45
- package/dist/esm/components/panel/alert.js +19 -22
- package/dist/esm/components/panel/collapse.js +33 -36
- package/dist/esm/components/panel/setting.js +25 -31
- package/dist/esm/components/select/cardSelect.js +27 -28
- package/dist/esm/components/status/listEmpty.js +13 -13
- package/dist/esm/components/table/tablePage.js +25 -25
- package/dist/esm/components/tree/treeFilter.js +137 -147
- package/dist/esm/components/upload/config.js +15 -27
- package/dist/esm/components/upload/file.js +90 -94
- package/dist/esm/components/upload/image.js +116 -123
- package/dist/esm/components/upload/manage/item.js +44 -47
- package/dist/esm/components/upload/manager.js +190 -207
- package/dist/esm/components/widget/connect.js +103 -106
- package/dist/esm/dvha-pro.css +1 -1
- package/dist/esm/hooks/action.js +115 -131
- package/dist/esm/hooks/download.js +55 -56
- package/dist/esm/hooks/echart.js +156 -179
- package/dist/esm/hooks/image.js +14 -15
- package/dist/esm/hooks/level.js +7 -7
- package/dist/esm/hooks/table/color.js +19 -0
- package/dist/esm/hooks/table/column.js +25 -23
- package/dist/esm/hooks/table/image.js +2 -2
- package/dist/esm/hooks/table/input.js +28 -28
- package/dist/esm/hooks/table/map.js +7 -7
- package/dist/esm/hooks/table/status.js +8 -9
- package/dist/esm/hooks/table/switch.js +19 -19
- package/dist/esm/hooks/table.js +27 -31
- package/dist/esm/index.js +167 -165
- package/dist/esm/pages/layout/global.js +12 -15
- package/dist/esm/pages/layout/tab.js +58 -71
- package/dist/esm/pages/login.js +81 -85
- package/dist/esm/pages/menu/avatar.js +136 -149
- package/dist/esm/pages/menu/button.js +16 -20
- package/dist/esm/pages/menu/cmd.js +68 -74
- package/dist/esm/pages/page.js +21 -25
- package/dist/esm/pages/pageStatus.js +21 -24
- package/dist/esm/stores/ui.js +15 -15
- package/dist/esm/theme/uno.css.js +2 -1
- package/dist/types/components/form/drawerForm.d.ts +6 -0
- package/dist/types/components/form/modalForm.d.ts +6 -0
- package/dist/types/components/form/pageForm.d.ts +6 -0
- package/dist/types/components/form/settingForm.d.ts +6 -0
- package/dist/types/components/layout/table.d.ts +9 -0
- package/dist/types/components/table/tablePage.d.ts +9 -0
- package/dist/types/hooks/table/color.d.ts +13 -0
- package/dist/types/hooks/table/column.d.ts +1 -0
- package/dist/types/hooks/table/index.d.ts +1 -0
- package/package.json +3 -3
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useWindowSize as
|
|
4
|
-
import { NTooltip as
|
|
5
|
-
import { useAction as
|
|
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 ae, useJsonSchema as A } from "@duxweb/dvha-core";
|
|
3
|
+
import { useWindowSize as ie } from "@vueuse/core";
|
|
4
|
+
import { NTooltip as f, NCheckbox as F, NTabs as oe, NTab as ne, NButton as s, NSpin as re, NProgress as se, NPagination as ue, NModal as ce, NDrawer as j } from "naive-ui";
|
|
5
|
+
import { useAction as de } 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
|
|
10
|
+
import pe from "../modal/modalPage.js";
|
|
11
11
|
import "jinrishici";
|
|
12
12
|
import "lodash-es";
|
|
13
13
|
import "vue-draggable-plus";
|
|
14
|
-
import { DuxDrawerPage as
|
|
14
|
+
import { DuxDrawerPage as N } from "../drawer/drawerPage.js";
|
|
15
15
|
import "aieditor";
|
|
16
16
|
import "vee-validate";
|
|
17
17
|
import "vue-router";
|
|
@@ -26,13 +26,13 @@ import "@vee-validate/i18n/dist/locale/en.json";
|
|
|
26
26
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
27
27
|
import "vue-command-palette";
|
|
28
28
|
import "@duxweb/dvha-naiveui";
|
|
29
|
-
import { DuxPage as
|
|
29
|
+
import { DuxPage as me } from "../../pages/page.js";
|
|
30
30
|
import "../../pages/page404.js";
|
|
31
|
-
import { DuxPageEmpty as
|
|
31
|
+
import { DuxPageEmpty as fe } from "../../pages/pageEmpty.js";
|
|
32
32
|
import "@iconify-json/tabler/icons.json";
|
|
33
|
-
import { DuxTableFilter as
|
|
34
|
-
import { DuxFilterLayout as
|
|
35
|
-
import { DuxTableTools as
|
|
33
|
+
import { DuxTableFilter as ge } from "./filter.js";
|
|
34
|
+
import { DuxFilterLayout as he } from "./filterLayout.js";
|
|
35
|
+
import { DuxTableTools as ve } from "./tools.js";
|
|
36
36
|
import "mime";
|
|
37
37
|
import "vue3-ace-editor";
|
|
38
38
|
import "ace-builds/src-noconflict/mode-vue";
|
|
@@ -48,10 +48,10 @@ import "ace-builds/src-noconflict/mode-snippets";
|
|
|
48
48
|
import "dayjs";
|
|
49
49
|
import "@tanstack/vue-query";
|
|
50
50
|
import "pinia";
|
|
51
|
-
function
|
|
52
|
-
return typeof
|
|
51
|
+
function be(t) {
|
|
52
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !te(t);
|
|
53
53
|
}
|
|
54
|
-
const
|
|
54
|
+
const gt = /* @__PURE__ */ Y({
|
|
55
55
|
name: "DuxListLayout",
|
|
56
56
|
props: {
|
|
57
57
|
rowKey: {
|
|
@@ -97,360 +97,333 @@ const yt = /* @__PURE__ */ ie({
|
|
|
97
97
|
type: Object
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
|
-
setup(
|
|
101
|
-
slots:
|
|
100
|
+
setup(t, {
|
|
101
|
+
slots: o
|
|
102
102
|
}) {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
} = se(), B = U(i.pagination && typeof i.pagination == "object" ? i.pagination : {
|
|
103
|
+
const D = z(t.filter || {}), {
|
|
104
|
+
t: i
|
|
105
|
+
} = le(), {
|
|
106
|
+
renderAction: U
|
|
107
|
+
} = de(), T = z(t.pagination && typeof t.pagination == "object" ? t.pagination : {
|
|
109
108
|
page: 1,
|
|
110
109
|
pageSize: 20
|
|
111
|
-
}),
|
|
112
|
-
Object.assign(
|
|
113
|
-
},
|
|
114
|
-
path:
|
|
115
|
-
filters:
|
|
116
|
-
pagination:
|
|
117
|
-
...
|
|
110
|
+
}), g = P({}), O = () => {
|
|
111
|
+
Object.assign(g.value, D.value);
|
|
112
|
+
}, a = ae({
|
|
113
|
+
path: t.path,
|
|
114
|
+
filters: g.value,
|
|
115
|
+
pagination: T.value,
|
|
116
|
+
...t.hookListProps
|
|
118
117
|
}), {
|
|
119
|
-
meta:
|
|
120
|
-
list:
|
|
121
|
-
isLoading:
|
|
122
|
-
autoRefetch:
|
|
123
|
-
autoCountdown:
|
|
124
|
-
onAutoRefetch:
|
|
125
|
-
isExporting:
|
|
126
|
-
isExportingRows:
|
|
127
|
-
isImporting:
|
|
128
|
-
onExport:
|
|
129
|
-
onExportRows:
|
|
130
|
-
onImport:
|
|
131
|
-
} =
|
|
132
|
-
page:
|
|
133
|
-
pageSize:
|
|
134
|
-
pageCount:
|
|
135
|
-
pageSizes:
|
|
118
|
+
meta: E,
|
|
119
|
+
list: x,
|
|
120
|
+
isLoading: w,
|
|
121
|
+
autoRefetch: q,
|
|
122
|
+
autoCountdown: y,
|
|
123
|
+
onAutoRefetch: I,
|
|
124
|
+
isExporting: M,
|
|
125
|
+
isExportingRows: V,
|
|
126
|
+
isImporting: S,
|
|
127
|
+
onExport: W,
|
|
128
|
+
onExportRows: B,
|
|
129
|
+
onImport: J
|
|
130
|
+
} = a, _ = c(() => ({
|
|
131
|
+
page: a.page.value,
|
|
132
|
+
pageSize: a.pageSize.value,
|
|
133
|
+
pageCount: a.pageCount.value,
|
|
134
|
+
pageSizes: a.pageSizes,
|
|
136
135
|
pageSlot: 5,
|
|
137
|
-
onUpdatePage:
|
|
138
|
-
onUpdatePageSize:
|
|
136
|
+
onUpdatePage: a.onUpdatePage,
|
|
137
|
+
onUpdatePageSize: a.onUpdatePageSize,
|
|
139
138
|
showSizePicker: !0,
|
|
140
139
|
showQuickJumper: !0
|
|
141
|
-
})),
|
|
140
|
+
})), d = b({
|
|
142
141
|
show: !1
|
|
143
|
-
}),
|
|
142
|
+
}), p = b({
|
|
144
143
|
show: !1
|
|
145
|
-
}),
|
|
144
|
+
}), m = b({
|
|
146
145
|
show: !1
|
|
147
|
-
}),
|
|
148
|
-
width:
|
|
149
|
-
} =
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
return c >= 1280 ? o = 4 : c >= 1024 ? o = 3 : c >= 768 ? o = 2 : o = 1, Math.min(n, o);
|
|
146
|
+
}), h = P(t.filterSchema?.length || 0), {
|
|
147
|
+
width: n
|
|
148
|
+
} = ie(), k = () => {
|
|
149
|
+
if (!t.filterSchema?.length) return 0;
|
|
150
|
+
const l = t.filterSchema.length;
|
|
151
|
+
if (l <= 3)
|
|
152
|
+
return l;
|
|
153
|
+
const r = n.value || 1024;
|
|
154
|
+
let u = 3;
|
|
155
|
+
return r >= 1280 ? u = 4 : r >= 1024 ? u = 3 : r >= 768 ? u = 2 : u = 1, Math.min(l, u);
|
|
158
156
|
};
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}),
|
|
162
|
-
|
|
157
|
+
Z(n, () => {
|
|
158
|
+
h.value = k();
|
|
159
|
+
}), $(() => {
|
|
160
|
+
h.value = k();
|
|
163
161
|
});
|
|
164
|
-
const
|
|
162
|
+
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((r) => {
|
|
165
163
|
const {
|
|
166
|
-
title:
|
|
167
|
-
...
|
|
168
|
-
} =
|
|
164
|
+
title: u,
|
|
165
|
+
...X
|
|
166
|
+
} = r;
|
|
169
167
|
return {
|
|
170
|
-
tag:
|
|
168
|
+
tag: ge,
|
|
171
169
|
attrs: {
|
|
172
|
-
label:
|
|
170
|
+
label: u,
|
|
173
171
|
class: "flex-1 min-w-0"
|
|
174
172
|
},
|
|
175
|
-
children:
|
|
173
|
+
children: X
|
|
176
174
|
};
|
|
177
175
|
}), {
|
|
178
|
-
render:
|
|
179
|
-
} =
|
|
180
|
-
data:
|
|
176
|
+
render: G
|
|
177
|
+
} = A({
|
|
178
|
+
data: c(() => L(K.value))
|
|
181
179
|
}), {
|
|
182
|
-
render:
|
|
183
|
-
} =
|
|
184
|
-
data:
|
|
185
|
-
}),
|
|
180
|
+
render: H
|
|
181
|
+
} = A({
|
|
182
|
+
data: c(() => L(C.value))
|
|
183
|
+
}), v = c(() => ({
|
|
186
184
|
import: !1,
|
|
187
185
|
export: !0,
|
|
188
186
|
refresh: !0,
|
|
189
|
-
...
|
|
187
|
+
...t.tools
|
|
190
188
|
}));
|
|
191
|
-
return () => e(
|
|
189
|
+
return () => e(me, {
|
|
192
190
|
padding: !1,
|
|
193
191
|
scrollbar: !1
|
|
194
192
|
}, {
|
|
195
|
-
sideLeft: () =>
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
193
|
+
sideLeft: () => o?.sideLeft && n.value >= 1024 ? o?.sideLeft?.() : void 0,
|
|
194
|
+
sideRight: () => o?.sideRight && n.value >= 1024 ? o?.sideRight?.() : void 0,
|
|
195
|
+
default: () => e("div", {
|
|
196
|
+
class: "flex flex-col h-full relative"
|
|
197
|
+
}, [e("div", {
|
|
198
|
+
class: "lg:justify-between gap-2 p-3"
|
|
199
|
+
}, [e("div", {
|
|
200
|
+
class: "flex flex-col lg:flex-row lg:items-center gap-2"
|
|
201
|
+
}, [t.checkable && e("div", {
|
|
202
|
+
class: "hidden lg:flex items-center pl-2"
|
|
203
|
+
}, [e(f, null, {
|
|
204
|
+
trigger: () => e("div", {
|
|
205
|
+
class: "flex items-center"
|
|
206
|
+
}, [e(F, {
|
|
207
|
+
checked: a.isAllChecked.value,
|
|
208
|
+
indeterminate: a.isIndeterminate.value,
|
|
209
|
+
onUpdateChecked: a.toggleSelectAll
|
|
210
|
+
}, null)]),
|
|
211
|
+
default: () => i("components.list.selectAll")
|
|
212
|
+
})]), t.tabs && e("div", null, [e(oe, {
|
|
213
|
+
type: "segment",
|
|
214
|
+
size: "small",
|
|
215
|
+
style: {
|
|
216
|
+
"--n-tab-padding": "4px 10px"
|
|
217
|
+
},
|
|
218
|
+
"default-value": t.tabs?.[0]?.value,
|
|
219
|
+
value: g.value?.tab,
|
|
220
|
+
onUpdateValue: (l) => {
|
|
221
|
+
g.value.tab = l;
|
|
222
|
+
}
|
|
223
|
+
}, {
|
|
224
|
+
default: () => [t.tabs?.map((l) => e(ne, {
|
|
225
|
+
name: l.value,
|
|
226
|
+
tab: l.label
|
|
227
|
+
}, null))]
|
|
228
|
+
})]), e("div", {
|
|
229
|
+
class: "flex gap-2"
|
|
230
|
+
}, [o?.sideLeft && n.value < 1024 && e(s, {
|
|
231
|
+
class: "flex-none",
|
|
232
|
+
secondary: !0,
|
|
233
|
+
onClick: () => {
|
|
234
|
+
p.show = !p.show;
|
|
235
|
+
}
|
|
236
|
+
}, {
|
|
237
|
+
icon: () => e("div", {
|
|
238
|
+
class: "i-tabler:layout-sidebar-inactive size-4"
|
|
239
|
+
}, null)
|
|
240
|
+
}), e("div", {
|
|
241
|
+
class: "flex flex-wrap gap-2 items-center flex-1 lg:flex-none"
|
|
242
|
+
}, [R(G)]), e(s, {
|
|
243
|
+
type: "primary",
|
|
244
|
+
secondary: !0,
|
|
245
|
+
onClick: O
|
|
246
|
+
}, {
|
|
247
|
+
icon: () => e("div", {
|
|
248
|
+
class: "i-tabler:search size-4"
|
|
249
|
+
}, null),
|
|
250
|
+
default: () => i("components.button.search")
|
|
251
|
+
}), o?.sideRight && n.value < 1024 && e(s, {
|
|
252
|
+
class: "flex-none",
|
|
253
|
+
secondary: !0,
|
|
254
|
+
onClick: () => {
|
|
255
|
+
m.show = !m.show;
|
|
256
|
+
}
|
|
257
|
+
}, {
|
|
258
|
+
icon: () => e("div", {
|
|
259
|
+
class: "i-tabler:layout-sidebar-right-inactive size-4"
|
|
260
|
+
}, null)
|
|
261
|
+
}), Q.value && e(s, {
|
|
262
|
+
iconPlacement: "right",
|
|
263
|
+
onClick: () => {
|
|
264
|
+
d.show = !d.show;
|
|
265
|
+
}
|
|
266
|
+
}, {
|
|
267
|
+
default: () => i("components.button.advanced"),
|
|
268
|
+
icon: () => e("div", {
|
|
269
|
+
class: ["i-tabler:chevrons-down size-4 transition-all"]
|
|
270
|
+
}, null)
|
|
271
|
+
})])]), e("div", {
|
|
272
|
+
class: "flex gap-2"
|
|
273
|
+
}, [o.actions?.(), t.actions?.length > 0 && U({
|
|
274
|
+
type: n.value < 1024 ? "dropdown" : "button",
|
|
275
|
+
text: n.value < 1024,
|
|
276
|
+
items: t.actions
|
|
277
|
+
})])]), e(re, {
|
|
278
|
+
show: w.value,
|
|
279
|
+
class: "flex-1 min-h-0",
|
|
280
|
+
contentClass: "h-full"
|
|
281
|
+
}, {
|
|
282
|
+
default: () => [e("div", {
|
|
283
|
+
class: ["h-full overflow-auto rounded-lg px-3"]
|
|
284
|
+
}, [!w.value && x.value.length === 0 && e("div", {
|
|
285
|
+
class: "flex justify-center items-center h-full"
|
|
286
|
+
}, [e(fe, null, null)]), x.value.length > 0 && o?.default?.(a)])]
|
|
287
|
+
}), e("div", {
|
|
288
|
+
class: "flex justify-between px-3 py-2 gap-2"
|
|
289
|
+
}, [e("div", null, [e("div", {
|
|
290
|
+
class: "flex gap-1 items-center"
|
|
291
|
+
}, [t.checkable && e(f, null, {
|
|
292
|
+
trigger: () => e(s, {
|
|
293
|
+
loading: S.value,
|
|
294
|
+
circle: !0,
|
|
295
|
+
quaternary: !0
|
|
233
296
|
}, {
|
|
234
|
-
default: () => {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
h.show = !h.show;
|
|
248
|
-
}
|
|
297
|
+
default: () => [e(F, {
|
|
298
|
+
checked: a.isAllChecked.value,
|
|
299
|
+
indeterminate: a.isIndeterminate.value,
|
|
300
|
+
onUpdateChecked: a.toggleSelectAll
|
|
301
|
+
}, null)]
|
|
302
|
+
}),
|
|
303
|
+
default: () => i("components.list.selectAll")
|
|
304
|
+
}), o?.tools?.(), v.value.export && e(f, null, {
|
|
305
|
+
trigger: () => e(s, {
|
|
306
|
+
loading: M.value,
|
|
307
|
+
onClick: W,
|
|
308
|
+
circle: !0,
|
|
309
|
+
quaternary: !0
|
|
249
310
|
}, {
|
|
250
311
|
icon: () => e("div", {
|
|
251
|
-
class: "i-tabler:
|
|
312
|
+
class: "i-tabler:database-export size-4"
|
|
252
313
|
}, null)
|
|
253
|
-
}),
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
onClick: J
|
|
314
|
+
}),
|
|
315
|
+
default: () => i("components.button.export")
|
|
316
|
+
}), v.value.import && e(f, null, {
|
|
317
|
+
trigger: () => e(s, {
|
|
318
|
+
loading: S.value,
|
|
319
|
+
onClick: J,
|
|
320
|
+
circle: !0,
|
|
321
|
+
quaternary: !0
|
|
259
322
|
}, {
|
|
260
323
|
icon: () => e("div", {
|
|
261
|
-
class: "i-tabler:
|
|
262
|
-
}, null)
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
onClick:
|
|
268
|
-
|
|
269
|
-
|
|
324
|
+
class: "i-tabler:database-import size-4"
|
|
325
|
+
}, null)
|
|
326
|
+
}),
|
|
327
|
+
default: () => i("components.button.import")
|
|
328
|
+
}), v.value.refresh && e(f, null, {
|
|
329
|
+
trigger: () => e(s, {
|
|
330
|
+
onClick: I,
|
|
331
|
+
circle: !0,
|
|
332
|
+
quaternary: !0
|
|
270
333
|
}, {
|
|
271
|
-
icon: () => e(
|
|
272
|
-
class: "
|
|
334
|
+
icon: () => q.value ? e(se, {
|
|
335
|
+
class: "size-4",
|
|
336
|
+
type: "circle",
|
|
337
|
+
percentage: y.value * 10,
|
|
338
|
+
strokeWidth: 20,
|
|
339
|
+
color: "rgba(var(--ui-color-primary))"
|
|
340
|
+
}, {
|
|
341
|
+
default: () => [e("span", {
|
|
342
|
+
class: "text-8px"
|
|
343
|
+
}, [y.value])]
|
|
344
|
+
}) : e("div", {
|
|
345
|
+
class: "i-tabler:refresh size-4"
|
|
273
346
|
}, null)
|
|
274
|
-
}),
|
|
275
|
-
|
|
347
|
+
}),
|
|
348
|
+
default: () => i("components.button.autoRefresh")
|
|
349
|
+
})])]), e("div", {
|
|
350
|
+
class: "flex items-center gap-2"
|
|
351
|
+
}, [o?.bottom?.(), t.pagination && e(ue, ee(_.value, {
|
|
352
|
+
simple: n.value < 768
|
|
353
|
+
}), {
|
|
354
|
+
prefix: () => e("div", null, [i("components.list.total", {
|
|
355
|
+
total: E?.value?.total || 0
|
|
356
|
+
})])
|
|
357
|
+
})])]), e(ve, {
|
|
358
|
+
number: a.checkeds.value.length,
|
|
359
|
+
group: [[{
|
|
360
|
+
icon: "i-tabler:x",
|
|
276
361
|
onClick: () => {
|
|
277
|
-
|
|
362
|
+
a.checkeds.value = [], a.onUpdateChecked?.([]);
|
|
278
363
|
}
|
|
364
|
+
}], [{
|
|
365
|
+
label: i("components.button.export"),
|
|
366
|
+
icon: "i-tabler:file-export",
|
|
367
|
+
loading: V.value,
|
|
368
|
+
onClick: B
|
|
279
369
|
}, {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
class: ["h-full overflow-auto rounded-lg px-3"]
|
|
299
|
-
}, [!C.value && k.value.length === 0 && e("div", {
|
|
300
|
-
class: "flex justify-center items-center h-full"
|
|
301
|
-
}, [e(we, null, null)]), k.value.length > 0 && ((a = t == null ? void 0 : t.default) == null ? void 0 : a.call(t, l))])];
|
|
302
|
-
}
|
|
303
|
-
}), e("div", {
|
|
304
|
-
class: "flex justify-between px-3 py-2 gap-2"
|
|
305
|
-
}, [e("div", null, [e("div", {
|
|
306
|
-
class: "flex gap-1 items-center"
|
|
307
|
-
}, [i.checkable && e(s, null, {
|
|
308
|
-
trigger: () => e(d, {
|
|
309
|
-
loading: z.value,
|
|
310
|
-
circle: !0,
|
|
311
|
-
quaternary: !0
|
|
312
|
-
}, {
|
|
313
|
-
default: () => [e(q, {
|
|
314
|
-
checked: l.isAllChecked.value,
|
|
315
|
-
indeterminate: l.isIndeterminate.value,
|
|
316
|
-
onUpdateChecked: l.toggleSelectAll
|
|
317
|
-
}, null)]
|
|
318
|
-
}),
|
|
319
|
-
default: () => r("components.list.selectAll")
|
|
320
|
-
}), (N = t == null ? void 0 : t.tools) == null ? void 0 : N.call(t), y.value.export && e(s, null, {
|
|
321
|
-
trigger: () => e(d, {
|
|
322
|
-
loading: Q.value,
|
|
323
|
-
onClick: H,
|
|
324
|
-
circle: !0,
|
|
325
|
-
quaternary: !0
|
|
370
|
+
label: i("components.button.delete"),
|
|
371
|
+
type: "error",
|
|
372
|
+
icon: "i-tabler:trash"
|
|
373
|
+
}]]
|
|
374
|
+
}, null), e(ce, {
|
|
375
|
+
draggable: !0,
|
|
376
|
+
class: "bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur",
|
|
377
|
+
show: d.show,
|
|
378
|
+
onUpdateShow: (l) => d.show = l
|
|
379
|
+
}, {
|
|
380
|
+
default: ({
|
|
381
|
+
draggableClass: l
|
|
382
|
+
}) => {
|
|
383
|
+
let r;
|
|
384
|
+
return e(pe, {
|
|
385
|
+
title: i("components.button.filter"),
|
|
386
|
+
handle: l,
|
|
387
|
+
onClose: () => d.show = !1
|
|
326
388
|
}, {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
trigger: () => e(d, {
|
|
346
|
-
onClick: K,
|
|
347
|
-
circle: !0,
|
|
348
|
-
quaternary: !0
|
|
349
|
-
}, {
|
|
350
|
-
icon: () => _.value ? e(ge, {
|
|
351
|
-
class: "size-4",
|
|
352
|
-
type: "circle",
|
|
353
|
-
percentage: L.value * 10,
|
|
354
|
-
strokeWidth: 20,
|
|
355
|
-
color: "rgba(var(--ui-color-primary))"
|
|
356
|
-
}, {
|
|
357
|
-
default: () => [e("span", {
|
|
358
|
-
class: "text-8px"
|
|
359
|
-
}, [L.value])]
|
|
360
|
-
}) : e("div", {
|
|
361
|
-
class: "i-tabler:refresh size-4"
|
|
362
|
-
}, null)
|
|
363
|
-
}),
|
|
364
|
-
default: () => r("components.button.autoRefresh")
|
|
365
|
-
})])]), e("div", {
|
|
366
|
-
class: "flex items-center gap-2"
|
|
367
|
-
}, [(D = t == null ? void 0 : t.bottom) == null ? void 0 : D.call(t), i.pagination && e(he, re(Z.value, {
|
|
368
|
-
simple: u.value < 768
|
|
369
|
-
}), {
|
|
370
|
-
prefix: () => {
|
|
371
|
-
var a;
|
|
372
|
-
return e("div", null, [r("components.list.total", {
|
|
373
|
-
total: ((a = w == null ? void 0 : w.value) == null ? void 0 : a.total) || 0
|
|
374
|
-
})]);
|
|
375
|
-
}
|
|
376
|
-
})])]), e(ke, {
|
|
377
|
-
number: l.checkeds.value.length,
|
|
378
|
-
group: [[{
|
|
379
|
-
icon: "i-tabler:x",
|
|
380
|
-
onClick: () => {
|
|
381
|
-
var a;
|
|
382
|
-
l.checkeds.value = [], (a = l.onUpdateChecked) == null || a.call(l, []);
|
|
383
|
-
}
|
|
384
|
-
}], [{
|
|
385
|
-
label: r("components.button.export"),
|
|
386
|
-
icon: "i-tabler:file-export",
|
|
387
|
-
loading: G.value,
|
|
388
|
-
onClick: X
|
|
389
|
-
}, {
|
|
390
|
-
label: r("components.button.delete"),
|
|
391
|
-
type: "error",
|
|
392
|
-
icon: "i-tabler:trash"
|
|
393
|
-
}]]
|
|
394
|
-
}, null), e(ve, {
|
|
395
|
-
draggable: !0,
|
|
396
|
-
class: "bg-white rounded dark:shadow-gray-950/80 dark:bg-gray-800/60 backdrop-blur",
|
|
397
|
-
show: g.show,
|
|
398
|
-
onUpdateShow: (a) => g.show = a
|
|
389
|
+
default: () => [e(he, {
|
|
390
|
+
showLabel: !0,
|
|
391
|
+
labelPlacement: "top"
|
|
392
|
+
}, be(r = R(H)) ? r : {
|
|
393
|
+
default: () => [r]
|
|
394
|
+
})]
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
}), e(j, {
|
|
398
|
+
show: p.show,
|
|
399
|
+
onUpdateShow: (l) => p.show = l,
|
|
400
|
+
autoFocus: !1,
|
|
401
|
+
placement: "left"
|
|
402
|
+
}, {
|
|
403
|
+
default: () => [e(N, {
|
|
404
|
+
title: t.sideLeftTitle || i("components.button.sideLeft"),
|
|
405
|
+
onClose: () => p.show = !1,
|
|
406
|
+
scrollbar: !1
|
|
399
407
|
}, {
|
|
400
|
-
default: (
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
}, Ce(f = O(ae)) ? f : {
|
|
413
|
-
default: () => [f]
|
|
414
|
-
})]
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
}), e(I, {
|
|
418
|
-
show: h.show,
|
|
419
|
-
onUpdateShow: (a) => h.show = a,
|
|
420
|
-
autoFocus: !1,
|
|
421
|
-
placement: "left"
|
|
408
|
+
default: () => [o?.sideLeft?.()]
|
|
409
|
+
})]
|
|
410
|
+
}), e(j, {
|
|
411
|
+
show: m.show,
|
|
412
|
+
onUpdateShow: (l) => m.show = l,
|
|
413
|
+
autoFocus: !1,
|
|
414
|
+
placement: "right"
|
|
415
|
+
}, {
|
|
416
|
+
default: () => [e(N, {
|
|
417
|
+
title: t.sideRightTitle || i("components.button.sideRight"),
|
|
418
|
+
onClose: () => m.show = !1,
|
|
419
|
+
scrollbar: !1
|
|
422
420
|
}, {
|
|
423
|
-
default: () => [
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
scrollbar: !1
|
|
427
|
-
}, {
|
|
428
|
-
default: () => {
|
|
429
|
-
var a;
|
|
430
|
-
return [(a = t == null ? void 0 : t.sideLeft) == null ? void 0 : a.call(t)];
|
|
431
|
-
}
|
|
432
|
-
})]
|
|
433
|
-
}), e(I, {
|
|
434
|
-
show: v.show,
|
|
435
|
-
onUpdateShow: (a) => v.show = a,
|
|
436
|
-
autoFocus: !1,
|
|
437
|
-
placement: "right"
|
|
438
|
-
}, {
|
|
439
|
-
default: () => [e(M, {
|
|
440
|
-
title: i.sideRightTitle || r("components.button.sideRight"),
|
|
441
|
-
onClose: () => v.show = !1,
|
|
442
|
-
scrollbar: !1
|
|
443
|
-
}, {
|
|
444
|
-
default: () => {
|
|
445
|
-
var a;
|
|
446
|
-
return [(a = t == null ? void 0 : t.sideRight) == null ? void 0 : a.call(t)];
|
|
447
|
-
}
|
|
448
|
-
})]
|
|
449
|
-
})]);
|
|
450
|
-
}
|
|
421
|
+
default: () => [o?.sideRight?.()]
|
|
422
|
+
})]
|
|
423
|
+
})])
|
|
451
424
|
});
|
|
452
425
|
}
|
|
453
426
|
});
|
|
454
427
|
export {
|
|
455
|
-
|
|
428
|
+
gt as DuxListLayout
|
|
456
429
|
};
|