@duxweb/dvha-pro 1.0.23 → 1.0.25
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/card/store.cjs +1 -1
- package/dist/cjs/components/carousel/carousel.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/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/icon.cjs +1 -1
- package/dist/cjs/components/icon/iconPicker.cjs +1 -1
- package/dist/cjs/components/image/components/CanvasRuler.cjs +1 -0
- package/dist/cjs/components/image/elements/circle.cjs +1 -0
- package/dist/cjs/components/image/elements/image.cjs +1 -0
- package/dist/cjs/components/image/elements/index.cjs +1 -0
- package/dist/cjs/components/image/elements/rect.cjs +1 -0
- package/dist/cjs/components/image/elements/text.cjs +1 -0
- package/dist/cjs/components/image/hooks/usePosterEditor.cjs +1 -0
- package/dist/cjs/components/image/pages/LeftToolbar.cjs +1 -0
- package/dist/cjs/components/image/pages/Panel.cjs +1 -0
- package/dist/cjs/components/image/pages/PanelItem.cjs +1 -0
- package/dist/cjs/components/image/pages/RightPanel.cjs +1 -0
- package/dist/cjs/components/image/posterEditor.cjs +1 -0
- 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/level/level.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/table.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/dialog.cjs +1 -1
- package/dist/cjs/hooks/download.cjs +1 -1
- package/dist/cjs/hooks/drawer.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/modal.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/media.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/authLayout.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/layout/tab.cjs +1 -1
- package/dist/cjs/pages/layout.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/stores/ui.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +26 -1
- package/dist/esm/component.js +49 -47
- 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/chart/echart.js +15 -13
- package/dist/esm/components/crop/imageCrop.js +45 -46
- 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 +42 -42
- package/dist/esm/components/data/selectModal.js +58 -60
- 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 +61 -59
- 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 +63 -61
- package/dist/esm/components/form/pageForm.js +56 -57
- package/dist/esm/components/form/settingForm.js +43 -44
- package/dist/esm/components/icon/icon.js +15 -13
- package/dist/esm/components/icon/iconPicker.js +54 -58
- package/dist/esm/components/image/components/CanvasRuler.js +113 -0
- package/dist/esm/components/image/elements/circle.js +127 -0
- package/dist/esm/components/image/elements/image.js +131 -0
- package/dist/esm/components/image/elements/index.js +46 -0
- package/dist/esm/components/image/elements/rect.js +171 -0
- package/dist/esm/components/image/elements/text.js +206 -0
- package/dist/esm/components/image/hooks/usePosterEditor.js +434 -0
- package/dist/esm/components/image/pages/LeftToolbar.js +40 -0
- package/dist/esm/components/image/pages/Panel.js +31 -0
- package/dist/esm/components/image/pages/PanelItem.js +22 -0
- package/dist/esm/components/image/pages/RightPanel.js +421 -0
- package/dist/esm/components/image/posterEditor.js +227 -0
- 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 +312 -337
- package/dist/esm/components/layout/table.js +281 -294
- package/dist/esm/components/layout/tools.js +38 -41
- package/dist/esm/components/level/level.js +15 -13
- 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/table.js +15 -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 +115 -109
- package/dist/esm/components/upload/image.js +135 -130
- package/dist/esm/components/upload/manage/item.js +59 -60
- package/dist/esm/components/upload/manager.js +203 -218
- 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/dialog.js +15 -13
- package/dist/esm/hooks/download.js +55 -56
- package/dist/esm/hooks/drawer.js +15 -13
- 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/modal.js +15 -13
- 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 +17 -15
- package/dist/esm/hooks/table/input.js +28 -28
- package/dist/esm/hooks/table/map.js +7 -7
- package/dist/esm/hooks/table/media.js +15 -13
- 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 +213 -200
- package/dist/esm/pages/authLayout.js +15 -13
- package/dist/esm/pages/layout/global.js +12 -15
- package/dist/esm/pages/layout/page.js +15 -13
- package/dist/esm/pages/layout/tab.js +58 -71
- package/dist/esm/pages/layout.js +7 -6
- package/dist/esm/pages/login.js +95 -98
- package/dist/esm/pages/menu/avatar.js +151 -162
- package/dist/esm/pages/menu/button.js +29 -31
- package/dist/esm/pages/menu/cmd.js +83 -87
- package/dist/esm/pages/menu/main.js +25 -23
- package/dist/esm/pages/menu/mobile.js +15 -13
- package/dist/esm/pages/page.js +21 -25
- package/dist/esm/pages/page404.js +13 -11
- package/dist/esm/pages/pageStatus.js +33 -34
- package/dist/esm/stores/ui.js +15 -15
- package/dist/esm/theme/uno.css.js +26 -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/image/components/CanvasRuler.d.ts +43 -0
- package/dist/types/components/image/components/index.d.ts +1 -0
- package/dist/types/components/image/elements/circle.d.ts +3 -0
- package/dist/types/components/image/elements/image.d.ts +3 -0
- package/dist/types/components/image/elements/index.d.ts +15 -0
- package/dist/types/components/image/elements/rect.d.ts +3 -0
- package/dist/types/components/image/elements/text.d.ts +3 -0
- package/dist/types/components/image/elements/types.d.ts +51 -0
- package/dist/types/components/image/hooks/index.d.ts +1 -0
- package/dist/types/components/image/hooks/usePosterEditor.d.ts +48 -0
- package/dist/types/components/image/index.d.ts +4 -0
- package/dist/types/components/image/pages/LeftToolbar.d.ts +33 -0
- package/dist/types/components/image/pages/Panel.d.ts +11 -0
- package/dist/types/components/image/pages/PanelItem.d.ts +11 -0
- package/dist/types/components/image/pages/RightPanel.d.ts +208 -0
- package/dist/types/components/image/pages/index.d.ts +4 -0
- package/dist/types/components/image/posterEditor.d.ts +61 -0
- package/dist/types/components/image/types/editor.d.ts +47 -0
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/components/layout/table.d.ts +9 -0
- package/dist/types/components/stats/number.d.ts +1 -1
- package/dist/types/components/table/tablePage.d.ts +9 -0
- package/dist/types/components/upload/file.d.ts +5 -3
- 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/dist/types/index.d.ts +1 -0
- package/dist/types/pages/layout/global.d.ts +0 -1
- package/package.json +6 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as l, createVNode as t } from "vue";
|
|
2
2
|
import o from "clsx";
|
|
3
|
-
import { ceil as
|
|
4
|
-
const
|
|
3
|
+
import { ceil as a } from "lodash-es";
|
|
4
|
+
const u = /* @__PURE__ */ l({
|
|
5
5
|
name: "DuxDashboardQuickItem",
|
|
6
6
|
props: {
|
|
7
7
|
icon: String,
|
|
@@ -9,21 +9,21 @@ const f = /* @__PURE__ */ u({
|
|
|
9
9
|
color: String,
|
|
10
10
|
onClick: Function
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
return () =>
|
|
12
|
+
setup(e) {
|
|
13
|
+
return () => t("div", {
|
|
14
14
|
class: "flex flex-col justify-center items-center "
|
|
15
|
-
}, [
|
|
15
|
+
}, [t("div", {
|
|
16
16
|
class: "flex flex-col gap-1 justify-center items-center p-2 pb-1 hover:bg-elevated cursor-pointer",
|
|
17
|
-
onClick:
|
|
18
|
-
}, [
|
|
19
|
-
class: o(["p-1 rounded flex justify-center items-center text-white", `bg-${
|
|
20
|
-
}, [
|
|
21
|
-
class: o(["size-7",
|
|
22
|
-
}, null)]),
|
|
17
|
+
onClick: e?.onClick
|
|
18
|
+
}, [t("div", {
|
|
19
|
+
class: o(["p-1 rounded flex justify-center items-center text-white", `bg-${e.color || "primary"}`])
|
|
20
|
+
}, [t("div", {
|
|
21
|
+
class: o(["size-7", e.icon])
|
|
22
|
+
}, null)]), t("div", {
|
|
23
23
|
class: "text-muted"
|
|
24
|
-
}, [
|
|
24
|
+
}, [e.title])])]);
|
|
25
25
|
}
|
|
26
|
-
}),
|
|
26
|
+
}), x = /* @__PURE__ */ l({
|
|
27
27
|
name: "DuxDashboardQuick",
|
|
28
28
|
props: {
|
|
29
29
|
data: Array,
|
|
@@ -32,28 +32,25 @@ const f = /* @__PURE__ */ u({
|
|
|
32
32
|
default: 6
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
-
setup(
|
|
35
|
+
setup(e, {
|
|
36
36
|
slots: n
|
|
37
37
|
}) {
|
|
38
|
-
const
|
|
39
|
-
return () => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}, null);
|
|
52
|
-
}), (i = n.default) == null ? void 0 : i.call(n)]);
|
|
53
|
-
};
|
|
38
|
+
const r = ["primary", "info", "success", "warning", "error"];
|
|
39
|
+
return () => t("div", {
|
|
40
|
+
class: o(["grid gap-2", `grid-cols-${a(e.col / 2)}`, `xl:grid-cols-${e.col}`])
|
|
41
|
+
}, [e.data?.map((c, i) => {
|
|
42
|
+
const s = r[i % r.length];
|
|
43
|
+
return t(u, {
|
|
44
|
+
icon: c?.icon,
|
|
45
|
+
title: c?.title,
|
|
46
|
+
color: s,
|
|
47
|
+
onClick: c?.onClick,
|
|
48
|
+
key: i
|
|
49
|
+
}, null);
|
|
50
|
+
}), n.default?.()]);
|
|
54
51
|
}
|
|
55
52
|
});
|
|
56
53
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
x as DuxDashboardQuick,
|
|
55
|
+
u as DuxDashboardQuickItem
|
|
59
56
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useJsonSchema as
|
|
3
|
-
import { useVModel as
|
|
4
|
-
import { NTable as
|
|
5
|
-
import { VueDraggable as
|
|
6
|
-
import { DuxBlockEmpty as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as m, computed as y, createVNode as e, mergeProps as v, h as f } from "vue";
|
|
2
|
+
import { useJsonSchema as h } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as A } from "@vueuse/core";
|
|
4
|
+
import { NTable as b, NButton as c } from "naive-ui";
|
|
5
|
+
import { VueDraggable as k } from "vue-draggable-plus";
|
|
6
|
+
import { DuxBlockEmpty as g } from "../status/blockEmpty.js";
|
|
7
|
+
const B = /* @__PURE__ */ m({
|
|
8
8
|
name: "DuxDynamicData",
|
|
9
9
|
props: {
|
|
10
10
|
createAction: {
|
|
@@ -28,31 +28,29 @@ const E = /* @__PURE__ */ h({
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
setup(t, {
|
|
31
|
-
emit:
|
|
31
|
+
emit: o
|
|
32
32
|
}) {
|
|
33
|
-
const
|
|
33
|
+
const a = A(t, "value", o, {
|
|
34
34
|
passive: !0,
|
|
35
35
|
defaultValue: t.defaultValue || [],
|
|
36
36
|
deep: !0
|
|
37
37
|
}), {
|
|
38
|
-
renderAsync:
|
|
39
|
-
} =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
[n]: r
|
|
38
|
+
renderAsync: i
|
|
39
|
+
} = h(), d = (l) => {
|
|
40
|
+
const u = a.value?.[0][l], n = [...a.value || []].map((r) => ({
|
|
41
|
+
...r,
|
|
42
|
+
[l]: u
|
|
44
43
|
}));
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return (t.createAction || t.deleteAction) && (n += 1), n;
|
|
44
|
+
a.value = [...n];
|
|
45
|
+
}, s = y(() => {
|
|
46
|
+
let l = t.columns?.length || 0;
|
|
47
|
+
return (t.createAction || t.deleteAction) && (l += 1), l;
|
|
50
48
|
});
|
|
51
|
-
return () => e(
|
|
52
|
-
modelValue:
|
|
49
|
+
return () => e(k, v({
|
|
50
|
+
modelValue: a.value
|
|
53
51
|
}, {
|
|
54
|
-
"onUpdate:modelValue": (
|
|
55
|
-
|
|
52
|
+
"onUpdate:modelValue": (l) => {
|
|
53
|
+
a.value = l;
|
|
56
54
|
}
|
|
57
55
|
}, {
|
|
58
56
|
handle: ".sort-handle",
|
|
@@ -61,85 +59,75 @@ const E = /* @__PURE__ */ h({
|
|
|
61
59
|
}), {
|
|
62
60
|
default: () => [e("div", {
|
|
63
61
|
class: "overflow-auto w-full"
|
|
64
|
-
}, [e(
|
|
62
|
+
}, [e(b, {
|
|
65
63
|
class: "table-fixed w-full"
|
|
66
64
|
}, {
|
|
67
|
-
default: () => {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
class: "i-tabler:trash h-4 w-4"
|
|
130
|
-
}, null),
|
|
131
|
-
onClick: () => {
|
|
132
|
-
l.value.splice(u, 1);
|
|
133
|
-
}
|
|
134
|
-
}, null)])]);
|
|
135
|
-
}) : e("tr", null, [e("td", {
|
|
136
|
-
colspan: v.value
|
|
137
|
-
}, [e(V, null, null)])])])];
|
|
138
|
-
}
|
|
65
|
+
default: () => [e("thead", null, [e("tr", null, [e("th", {
|
|
66
|
+
style: {
|
|
67
|
+
width: "40px"
|
|
68
|
+
}
|
|
69
|
+
}, null), t.columns?.map((l, u) => e("th", {
|
|
70
|
+
key: u,
|
|
71
|
+
style: {
|
|
72
|
+
width: `${l.width}px`
|
|
73
|
+
}
|
|
74
|
+
}, [e("div", {
|
|
75
|
+
class: "flex items-center justify-between"
|
|
76
|
+
}, [e("div", null, [l.title]), l.copy && e("div", null, [e(c, {
|
|
77
|
+
onClick: () => {
|
|
78
|
+
d(l.key);
|
|
79
|
+
},
|
|
80
|
+
renderIcon: () => e("div", {
|
|
81
|
+
class: "i-tabler:pencil-down t-icon"
|
|
82
|
+
}, null),
|
|
83
|
+
text: !0,
|
|
84
|
+
type: "primary"
|
|
85
|
+
}, null)])])])), (t.createAction || t.deleteAction) && e("th", {
|
|
86
|
+
class: "w-15"
|
|
87
|
+
}, [t.createAction && e(c, {
|
|
88
|
+
tertiary: !0,
|
|
89
|
+
type: "primary",
|
|
90
|
+
circle: !0,
|
|
91
|
+
renderIcon: () => e("div", {
|
|
92
|
+
class: "i-tabler:plus h-4 w-4"
|
|
93
|
+
}, null),
|
|
94
|
+
onClick: () => {
|
|
95
|
+
t?.onCreate ? t.onCreate() : (a.value || (a.value = []), a.value?.push(t?.createCallback?.(a.value) || {}));
|
|
96
|
+
}
|
|
97
|
+
}, null)])])]), e("tbody", {
|
|
98
|
+
class: "sort-target"
|
|
99
|
+
}, [a.value && a.value?.length > 0 ? a.value.map((l, u) => e("tr", {
|
|
100
|
+
key: u
|
|
101
|
+
}, [e("td", null, [e("div", {
|
|
102
|
+
class: "sort-handle i-tabler:grid-dots size-4 cursor-move"
|
|
103
|
+
}, null)]), t.columns?.map((n, r) => e("td", {
|
|
104
|
+
key: r
|
|
105
|
+
}, [n.schema ? f(i({
|
|
106
|
+
data: Array.isArray(n.schema) ? n.schema : [n.schema],
|
|
107
|
+
context: {
|
|
108
|
+
rowIndex: u,
|
|
109
|
+
model: a.value,
|
|
110
|
+
row: l
|
|
111
|
+
}
|
|
112
|
+
})) : n.render?.(l, u) || l[n.key]])), (t.createAction || t.deleteAction) && e("td", {
|
|
113
|
+
class: "w-15"
|
|
114
|
+
}, [t.deleteAction && e(c, {
|
|
115
|
+
tertiary: !0,
|
|
116
|
+
type: "error",
|
|
117
|
+
circle: !0,
|
|
118
|
+
renderIcon: () => e("div", {
|
|
119
|
+
class: "i-tabler:trash h-4 w-4"
|
|
120
|
+
}, null),
|
|
121
|
+
onClick: () => {
|
|
122
|
+
a.value.splice(u, 1);
|
|
123
|
+
}
|
|
124
|
+
}, null)])])) : e("tr", null, [e("td", {
|
|
125
|
+
colspan: s.value
|
|
126
|
+
}, [e(g, null, null)])])])]
|
|
139
127
|
})])]
|
|
140
128
|
});
|
|
141
129
|
}
|
|
142
130
|
});
|
|
143
131
|
export {
|
|
144
|
-
|
|
132
|
+
B as DuxDynamicData
|
|
145
133
|
};
|
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useClient as
|
|
3
|
-
import { useVModel as
|
|
1
|
+
import { defineComponent as f, ref as s, watch as v, createVNode as y } from "vue";
|
|
2
|
+
import { useClient as d, useI18n as h } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as D } from "@vueuse/core";
|
|
4
4
|
import "naive-ui";
|
|
5
5
|
import "vue-router";
|
|
6
6
|
import "@overlastic/vue";
|
|
7
7
|
import "clsx";
|
|
8
8
|
import "vue-echarts";
|
|
9
|
+
import "vue3-ace-editor";
|
|
10
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
11
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
12
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
13
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
14
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
15
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
16
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
17
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
18
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
19
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
9
20
|
import "vue-cropper";
|
|
10
21
|
import "jinrishici";
|
|
11
22
|
import "lodash-es";
|
|
12
|
-
import { DuxDynamicData as
|
|
23
|
+
import { DuxDynamicData as S } from "./dynamicData.js";
|
|
13
24
|
import "aieditor";
|
|
14
25
|
import "vee-validate";
|
|
15
26
|
import "@vee-validate/i18n";
|
|
@@ -25,24 +36,15 @@ import "vue-command-palette";
|
|
|
25
36
|
import "@duxweb/dvha-naiveui";
|
|
26
37
|
import "../../pages/page404.js";
|
|
27
38
|
import "@iconify-json/tabler/icons.json";
|
|
39
|
+
import "../image/elements/index.js";
|
|
40
|
+
import "fabric";
|
|
28
41
|
import "mime";
|
|
29
42
|
import "vue-draggable-plus";
|
|
30
|
-
import "
|
|
31
|
-
import "ace-builds/src-noconflict/mode-vue";
|
|
32
|
-
import "ace-builds/src-noconflict/mode-javascript";
|
|
33
|
-
import "ace-builds/src-noconflict/mode-html";
|
|
34
|
-
import "ace-builds/src-noconflict/mode-json";
|
|
35
|
-
import "ace-builds/src-noconflict/mode-json5";
|
|
36
|
-
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
37
|
-
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
38
|
-
import "ace-builds/src-noconflict/ext-searchbox";
|
|
39
|
-
import "ace-builds/src-noconflict/ext-language_tools";
|
|
40
|
-
import "ace-builds/src-noconflict/mode-snippets";
|
|
41
|
-
import { useModal as C } from "../../hooks/modal.js";
|
|
43
|
+
import { useModal as w } from "../../hooks/modal.js";
|
|
42
44
|
import "dayjs";
|
|
43
45
|
import "@tanstack/vue-query";
|
|
44
46
|
import "pinia";
|
|
45
|
-
const
|
|
47
|
+
const st = /* @__PURE__ */ f({
|
|
46
48
|
name: "DuxDynamicSelect",
|
|
47
49
|
props: {
|
|
48
50
|
rowKey: {
|
|
@@ -65,40 +67,38 @@ const vt = /* @__PURE__ */ y({
|
|
|
65
67
|
}
|
|
66
68
|
},
|
|
67
69
|
setup(t, {
|
|
68
|
-
emit:
|
|
70
|
+
emit: l
|
|
69
71
|
}) {
|
|
70
|
-
const e =
|
|
72
|
+
const e = D(t, "value", l, {
|
|
71
73
|
passive: !0,
|
|
72
74
|
defaultValue: t.defaultValue,
|
|
73
75
|
deep: !0
|
|
74
|
-
}),
|
|
75
|
-
t:
|
|
76
|
-
} =
|
|
77
|
-
return
|
|
78
|
-
var r;
|
|
76
|
+
}), u = w(), p = d(), {
|
|
77
|
+
t: n
|
|
78
|
+
} = h(), i = s(!0);
|
|
79
|
+
return v([e, i], () => {
|
|
79
80
|
if (!i.value || !e.value || e.value.length === 0)
|
|
80
81
|
return;
|
|
81
|
-
const
|
|
82
|
-
|
|
82
|
+
const r = e.value?.map((o) => o[t.rowKey]) || [];
|
|
83
|
+
p.request({
|
|
83
84
|
path: t.path,
|
|
84
85
|
query: {
|
|
85
|
-
ids:
|
|
86
|
+
ids: r?.join(",") || ""
|
|
86
87
|
}
|
|
87
|
-
}).then((
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
...
|
|
92
|
-
|
|
93
|
-
} : e.value.push(a);
|
|
88
|
+
}).then((o) => {
|
|
89
|
+
i.value = !1, o?.data?.forEach((m, a) => {
|
|
90
|
+
e.value.some((c) => c[t.rowKey] === m[t.rowKey]) ? e.value[a] = {
|
|
91
|
+
...e.value[a],
|
|
92
|
+
...m
|
|
93
|
+
} : e.value.push(m);
|
|
94
94
|
});
|
|
95
95
|
});
|
|
96
|
-
}), () =>
|
|
96
|
+
}), () => y(S, {
|
|
97
97
|
value: e.value,
|
|
98
|
-
"onUpdate:value": (
|
|
98
|
+
"onUpdate:value": (r) => e.value = r,
|
|
99
99
|
columns: t.columns,
|
|
100
100
|
onCreate: () => {
|
|
101
|
-
|
|
101
|
+
u.show({
|
|
102
102
|
component: () => import("./selectModal.js"),
|
|
103
103
|
componentProps: {
|
|
104
104
|
path: t.path,
|
|
@@ -106,10 +106,10 @@ const vt = /* @__PURE__ */ y({
|
|
|
106
106
|
filterSchema: t.filterSchema
|
|
107
107
|
},
|
|
108
108
|
width: 1e3,
|
|
109
|
-
title:
|
|
110
|
-
}).then((
|
|
111
|
-
i.value = !1,
|
|
112
|
-
e.value.some((m) => m[t.rowKey] ===
|
|
109
|
+
title: n("buttons.select")
|
|
110
|
+
}).then((r) => {
|
|
111
|
+
i.value = !1, r?.forEach((o) => {
|
|
112
|
+
e.value.some((m) => m[t.rowKey] === o[t.rowKey]) || e.value.push(o);
|
|
113
113
|
});
|
|
114
114
|
});
|
|
115
115
|
}
|
|
@@ -117,5 +117,5 @@ const vt = /* @__PURE__ */ y({
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
export {
|
|
120
|
-
|
|
120
|
+
st as DuxDynamicSelect
|
|
121
121
|
};
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { NButton as
|
|
1
|
+
import { defineComponent as y, computed as h, ref as m, watch as C, createVNode as o, Fragment as b, h as x, mergeProps as w, isVNode as z } from "vue";
|
|
2
|
+
import { useI18n as P, useJsonSchema as j } from "@duxweb/dvha-core";
|
|
3
|
+
import { NButton as l, NDataTable as k } from "naive-ui";
|
|
4
4
|
import "vue-router";
|
|
5
5
|
import "@overlastic/vue";
|
|
6
6
|
import "clsx";
|
|
7
7
|
import "vue-echarts";
|
|
8
8
|
import "@vueuse/core";
|
|
9
|
+
import "vue3-ace-editor";
|
|
10
|
+
import "ace-builds/src-noconflict/mode-vue";
|
|
11
|
+
import "ace-builds/src-noconflict/mode-javascript";
|
|
12
|
+
import "ace-builds/src-noconflict/mode-html";
|
|
13
|
+
import "ace-builds/src-noconflict/mode-json";
|
|
14
|
+
import "ace-builds/src-noconflict/mode-json5";
|
|
15
|
+
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
16
|
+
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
17
|
+
import "ace-builds/src-noconflict/ext-searchbox";
|
|
18
|
+
import "ace-builds/src-noconflict/ext-language_tools";
|
|
19
|
+
import "ace-builds/src-noconflict/mode-snippets";
|
|
9
20
|
import "vue-cropper";
|
|
10
|
-
import
|
|
21
|
+
import K from "../modal/modalPage.js";
|
|
11
22
|
import "jinrishici";
|
|
12
23
|
import "lodash-es";
|
|
13
24
|
import "vue-draggable-plus";
|
|
@@ -26,26 +37,17 @@ import "vue-command-palette";
|
|
|
26
37
|
import "@duxweb/dvha-naiveui";
|
|
27
38
|
import "../../pages/page404.js";
|
|
28
39
|
import "@iconify-json/tabler/icons.json";
|
|
40
|
+
import "../image/elements/index.js";
|
|
41
|
+
import "fabric";
|
|
29
42
|
import "mime";
|
|
30
|
-
import "vue3-ace-editor";
|
|
31
|
-
import "ace-builds/src-noconflict/mode-vue";
|
|
32
|
-
import "ace-builds/src-noconflict/mode-javascript";
|
|
33
|
-
import "ace-builds/src-noconflict/mode-html";
|
|
34
|
-
import "ace-builds/src-noconflict/mode-json";
|
|
35
|
-
import "ace-builds/src-noconflict/mode-json5";
|
|
36
|
-
import "ace-builds/src-noconflict/theme-tomorrow_night";
|
|
37
|
-
import "ace-builds/src-noconflict/theme-tomorrow";
|
|
38
|
-
import "ace-builds/src-noconflict/ext-searchbox";
|
|
39
|
-
import "ace-builds/src-noconflict/ext-language_tools";
|
|
40
|
-
import "ace-builds/src-noconflict/mode-snippets";
|
|
41
43
|
import "dayjs";
|
|
42
44
|
import "@tanstack/vue-query";
|
|
43
|
-
import { useTable as
|
|
45
|
+
import { useTable as N } from "../../hooks/table.js";
|
|
44
46
|
import "pinia";
|
|
45
|
-
function
|
|
46
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
47
|
+
function c(t) {
|
|
48
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !z(t);
|
|
47
49
|
}
|
|
48
|
-
const
|
|
50
|
+
const xt = /* @__PURE__ */ y({
|
|
49
51
|
name: "Select",
|
|
50
52
|
props: {
|
|
51
53
|
path: String,
|
|
@@ -62,80 +64,76 @@ const bt = /* @__PURE__ */ h({
|
|
|
62
64
|
},
|
|
63
65
|
setup(t) {
|
|
64
66
|
const {
|
|
65
|
-
t:
|
|
66
|
-
} =
|
|
67
|
+
t: a
|
|
68
|
+
} = P(), u = h(() => [{
|
|
67
69
|
type: "selection",
|
|
68
70
|
fixed: "left"
|
|
69
|
-
}, ...t.columns || []]),
|
|
71
|
+
}, ...t.columns || []]), n = m({}), i = m({
|
|
70
72
|
page: 1,
|
|
71
73
|
pageSize: 10
|
|
72
74
|
}), {
|
|
73
|
-
table:
|
|
74
|
-
list:
|
|
75
|
-
pageCount:
|
|
76
|
-
pageSizes:
|
|
77
|
-
checkeds:
|
|
78
|
-
} =
|
|
75
|
+
table: s,
|
|
76
|
+
list: f,
|
|
77
|
+
pageCount: d,
|
|
78
|
+
pageSizes: g,
|
|
79
|
+
checkeds: S
|
|
80
|
+
} = N({
|
|
79
81
|
path: t.path || "",
|
|
80
|
-
columns:
|
|
81
|
-
filters:
|
|
82
|
-
pagination:
|
|
83
|
-
}),
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
c.value = (r = g.value) == null ? void 0 : r.filter((o) => e.includes(o[t.rowKey]));
|
|
82
|
+
columns: u.value || [],
|
|
83
|
+
filters: n,
|
|
84
|
+
pagination: i.value
|
|
85
|
+
}), p = m([]);
|
|
86
|
+
C(S, (e) => {
|
|
87
|
+
p.value = f.value?.filter((r) => e.includes(r[t.rowKey]));
|
|
87
88
|
});
|
|
88
|
-
const
|
|
89
|
+
const v = j({
|
|
89
90
|
data: t.filterSchema || [],
|
|
90
91
|
context: {
|
|
91
|
-
filter:
|
|
92
|
+
filter: n
|
|
92
93
|
}
|
|
93
94
|
});
|
|
94
|
-
return () =>
|
|
95
|
-
title:
|
|
95
|
+
return () => o(K, {
|
|
96
|
+
title: a("components.data.selectTitle"),
|
|
96
97
|
onClose: () => {
|
|
97
|
-
|
|
98
|
-
(e = t.onClose) == null || e.call(t);
|
|
98
|
+
t.onClose?.();
|
|
99
99
|
}
|
|
100
100
|
}, {
|
|
101
|
-
default: () =>
|
|
101
|
+
default: () => o("div", {
|
|
102
102
|
class: "flex flex-col gap-4"
|
|
103
|
-
}, [t.filterSchema &&
|
|
103
|
+
}, [t.filterSchema && o("div", {
|
|
104
104
|
class: "grid grid-cols-1 md:grid-cols-4 gap-2"
|
|
105
|
-
}, [
|
|
105
|
+
}, [x(v.render)]), o(k, w({
|
|
106
106
|
bordered: !1,
|
|
107
107
|
maxHeight: 400,
|
|
108
108
|
rowKey: (e) => e[t.rowKey]
|
|
109
|
-
},
|
|
109
|
+
}, s.value, {
|
|
110
110
|
pagination: {
|
|
111
|
-
page:
|
|
112
|
-
pageSize:
|
|
113
|
-
pageCount:
|
|
114
|
-
pageSizes:
|
|
111
|
+
page: i.value.page,
|
|
112
|
+
pageSize: i.value.pageSize,
|
|
113
|
+
pageCount: d.value,
|
|
114
|
+
pageSizes: g,
|
|
115
115
|
onUpdatePage: (e) => {
|
|
116
|
-
|
|
116
|
+
i.value.page = e;
|
|
117
117
|
},
|
|
118
118
|
onUpdatePageSize: (e) => {
|
|
119
|
-
|
|
119
|
+
i.value.pageSize = e;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
}), null)]),
|
|
123
123
|
footer: () => {
|
|
124
124
|
let e, r;
|
|
125
|
-
return
|
|
125
|
+
return o(b, null, [o(l, {
|
|
126
126
|
onClick: () => {
|
|
127
|
-
|
|
128
|
-
(o = t.onClose) == null || o.call(t);
|
|
127
|
+
t.onClose?.();
|
|
129
128
|
}
|
|
130
|
-
},
|
|
129
|
+
}, c(e = a("components.button.cancel")) ? e : {
|
|
131
130
|
default: () => [e]
|
|
132
|
-
}),
|
|
131
|
+
}), o(l, {
|
|
133
132
|
type: "primary",
|
|
134
133
|
onClick: () => {
|
|
135
|
-
|
|
136
|
-
(o = t.onConfirm) == null || o.call(t, c.value);
|
|
134
|
+
t.onConfirm?.(p.value);
|
|
137
135
|
}
|
|
138
|
-
},
|
|
136
|
+
}, c(r = a("components.button.select")) ? r : {
|
|
139
137
|
default: () => [r]
|
|
140
138
|
})]);
|
|
141
139
|
}
|
|
@@ -143,5 +141,5 @@ const bt = /* @__PURE__ */ h({
|
|
|
143
141
|
}
|
|
144
142
|
});
|
|
145
143
|
export {
|
|
146
|
-
|
|
144
|
+
xt as default
|
|
147
145
|
};
|