@duxweb/dvha-pro 1.0.32 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/component.cjs +1 -1
- package/dist/cjs/components/chart/echart.cjs +1 -1
- package/dist/cjs/components/crop/imageCrop.cjs +1 -1
- package/dist/cjs/components/data/dynamicSelect.cjs +1 -1
- package/dist/cjs/components/data/selectModal.cjs +1 -1
- package/dist/cjs/components/designEditor/components/grid.cjs +1 -1
- package/dist/cjs/components/designEditor/editor/hook.cjs +1 -1
- package/dist/cjs/components/designEditor/editor/setting.cjs +1 -1
- package/dist/cjs/components/designEditor/editor.cjs +1 -1
- package/dist/cjs/components/form/drawerForm.cjs +1 -1
- package/dist/cjs/components/form/modalForm.cjs +1 -1
- package/dist/cjs/components/form/pageForm.cjs +1 -1
- package/dist/cjs/components/form/pageTabForm.cjs +1 -1
- package/dist/cjs/components/form/settingForm.cjs +1 -1
- package/dist/cjs/components/formEditor/base/base.cjs +1 -1
- package/dist/cjs/components/formEditor/base/setting.cjs +1 -1
- package/dist/cjs/components/formEditor/components/cascader.cjs +1 -1
- package/dist/cjs/components/formEditor/components/cascaderAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/checkbox.cjs +1 -1
- package/dist/cjs/components/formEditor/components/color.cjs +1 -1
- package/dist/cjs/components/formEditor/components/date.cjs +1 -1
- package/dist/cjs/components/formEditor/components/dynamicInput.cjs +1 -1
- package/dist/cjs/components/formEditor/components/dynamicTags.cjs +1 -1
- package/dist/cjs/components/formEditor/components/editor.cjs +1 -1
- package/dist/cjs/components/formEditor/components/fileUpload.cjs +1 -0
- package/dist/cjs/components/formEditor/components/imageUpload.cjs +1 -0
- package/dist/cjs/components/formEditor/components/input.cjs +1 -1
- package/dist/cjs/components/formEditor/components/inputNumber.cjs +1 -1
- package/dist/cjs/components/formEditor/components/mentionAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/radio.cjs +1 -1
- package/dist/cjs/components/formEditor/components/region.cjs +1 -1
- package/dist/cjs/components/formEditor/components/select.cjs +1 -1
- package/dist/cjs/components/formEditor/components/selectAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/sider.cjs +1 -1
- package/dist/cjs/components/formEditor/components/switch.cjs +1 -1
- package/dist/cjs/components/formEditor/components/time.cjs +1 -1
- package/dist/cjs/components/formEditor/components/transferAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/components/treeSelect.cjs +1 -1
- package/dist/cjs/components/formEditor/components/treeSelectAsync.cjs +1 -1
- package/dist/cjs/components/formEditor/editor.cjs +1 -1
- package/dist/cjs/components/formEditor/renderer.cjs +1 -1
- package/dist/cjs/components/icon/icon.cjs +1 -1
- package/dist/cjs/components/layout/list.cjs +1 -1
- package/dist/cjs/components/layout/table.cjs +1 -1
- package/dist/cjs/components/level/level.cjs +1 -1
- package/dist/cjs/components/posterEditor/pages/RightPanel.cjs +1 -1
- package/dist/cjs/components/posterEditor/posterEditor.cjs +1 -1
- package/dist/cjs/components/table/table.cjs +1 -1
- package/dist/cjs/components/upload/file.cjs +1 -1
- package/dist/cjs/components/upload/image.cjs +1 -1
- package/dist/cjs/components/upload/manage/item.cjs +1 -1
- package/dist/cjs/components/upload/manager.cjs +1 -1
- package/dist/cjs/config/echart.cjs +1 -1
- package/dist/cjs/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/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/global.cjs +1 -1
- package/dist/cjs/pages/layout/page.cjs +1 -1
- package/dist/cjs/pages/login.cjs +1 -1
- package/dist/cjs/pages/menu/avatar.cjs +1 -1
- package/dist/cjs/pages/menu/button.cjs +1 -1
- package/dist/cjs/pages/menu/cmd.cjs +1 -1
- package/dist/cjs/pages/menu/main.cjs +1 -1
- package/dist/cjs/pages/menu/mobile.cjs +1 -1
- package/dist/cjs/pages/page404.cjs +1 -1
- package/dist/cjs/pages/pageStatus.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +2 -1
- package/dist/esm/component.js +11 -11
- package/dist/esm/components/chart/echart.js +17 -3
- package/dist/esm/components/crop/imageCrop.js +27 -13
- package/dist/esm/components/data/dynamicSelect.js +34 -20
- package/dist/esm/components/data/selectModal.js +42 -28
- package/dist/esm/components/designEditor/components/grid.js +40 -26
- package/dist/esm/components/designEditor/editor/hook.js +17 -17
- package/dist/esm/components/designEditor/editor/setting.js +36 -22
- package/dist/esm/components/designEditor/editor.js +6 -6
- package/dist/esm/components/form/drawerForm.js +32 -18
- package/dist/esm/components/form/modalForm.js +31 -17
- package/dist/esm/components/form/pageForm.js +41 -27
- package/dist/esm/components/form/pageTabForm.js +31 -17
- package/dist/esm/components/form/settingForm.js +33 -19
- package/dist/esm/components/formEditor/base/base.js +30 -16
- package/dist/esm/components/formEditor/base/setting.js +21 -7
- package/dist/esm/components/formEditor/components/cascader.js +66 -52
- package/dist/esm/components/formEditor/components/cascaderAsync.js +96 -82
- package/dist/esm/components/formEditor/components/checkbox.js +44 -30
- package/dist/esm/components/formEditor/components/color.js +35 -21
- package/dist/esm/components/formEditor/components/date.js +52 -38
- package/dist/esm/components/formEditor/components/dynamicInput.js +43 -29
- package/dist/esm/components/formEditor/components/dynamicTags.js +40 -26
- package/dist/esm/components/formEditor/components/editor.js +24 -10
- package/dist/esm/components/formEditor/components/fileUpload.js +191 -0
- package/dist/esm/components/formEditor/components/imageUpload.js +182 -0
- package/dist/esm/components/formEditor/components/input.js +67 -53
- package/dist/esm/components/formEditor/components/inputNumber.js +38 -24
- package/dist/esm/components/formEditor/components/mentionAsync.js +61 -47
- package/dist/esm/components/formEditor/components/radio.js +29 -15
- package/dist/esm/components/formEditor/components/region.js +38 -24
- package/dist/esm/components/formEditor/components/select.js +17 -3
- package/dist/esm/components/formEditor/components/selectAsync.js +73 -59
- package/dist/esm/components/formEditor/components/sider.js +41 -27
- package/dist/esm/components/formEditor/components/switch.js +34 -20
- package/dist/esm/components/formEditor/components/time.js +61 -47
- package/dist/esm/components/formEditor/components/transferAsync.js +50 -36
- package/dist/esm/components/formEditor/components/treeSelect.js +55 -41
- package/dist/esm/components/formEditor/components/treeSelectAsync.js +75 -61
- package/dist/esm/components/formEditor/editor.js +40 -24
- package/dist/esm/components/formEditor/renderer.js +57 -41
- package/dist/esm/components/icon/icon.js +24 -10
- package/dist/esm/components/layout/list.js +70 -56
- package/dist/esm/components/layout/table.js +38 -24
- package/dist/esm/components/level/level.js +38 -24
- package/dist/esm/components/posterEditor/pages/RightPanel.js +46 -32
- package/dist/esm/components/posterEditor/posterEditor.js +26 -12
- package/dist/esm/components/table/table.js +22 -8
- package/dist/esm/components/upload/file.js +17 -3
- package/dist/esm/components/upload/image.js +44 -30
- package/dist/esm/components/upload/manage/item.js +27 -13
- package/dist/esm/components/upload/manager.js +18 -4
- package/dist/esm/config/echart.js +1 -1
- package/dist/esm/hooks/dialog.js +16 -2
- package/dist/esm/hooks/drawer.js +16 -2
- package/dist/esm/hooks/modal.js +16 -2
- package/dist/esm/hooks/table/image.js +20 -6
- package/dist/esm/hooks/table/media.js +20 -6
- package/dist/esm/langs/en-US.json.js +5 -5
- package/dist/esm/langs/zh-CN.json.js +6 -6
- package/dist/esm/pages/authLayout.js +1 -1
- package/dist/esm/pages/layout/global.js +52 -37
- package/dist/esm/pages/layout/page.js +27 -13
- package/dist/esm/pages/login.js +33 -19
- package/dist/esm/pages/menu/avatar.js +46 -32
- package/dist/esm/pages/menu/button.js +23 -9
- package/dist/esm/pages/menu/cmd.js +52 -38
- package/dist/esm/pages/menu/main.js +43 -29
- package/dist/esm/pages/menu/mobile.js +17 -3
- package/dist/esm/pages/page404.js +14 -0
- package/dist/esm/pages/pageStatus.js +18 -4
- package/dist/esm/theme/uno.css.js +2 -1
- package/dist/types/components/formEditor/components/fileUpload.d.ts +2 -0
- package/dist/types/components/formEditor/components/imageUpload.d.ts +2 -0
- package/dist/types/components/formEditor/components/index.d.ts +4 -2
- package/package.json +5 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as n, createVNode as
|
|
1
|
+
import { defineComponent as n, createVNode as e } from "vue";
|
|
2
2
|
import { useI18n as s, useManage as c, useUpload as d } from "@duxweb/dvha-core";
|
|
3
3
|
import { useVModel as g } from "@vueuse/core";
|
|
4
4
|
import { useMessage as f } from "naive-ui";
|
|
@@ -25,6 +25,20 @@ import "vue-draggable-plus";
|
|
|
25
25
|
import "@vee-validate/i18n";
|
|
26
26
|
import "colorizr";
|
|
27
27
|
import "echarts";
|
|
28
|
+
import "highlight.js/lib/core";
|
|
29
|
+
import "highlight.js/lib/languages/bash";
|
|
30
|
+
import "highlight.js/lib/languages/css";
|
|
31
|
+
import "highlight.js/lib/languages/go";
|
|
32
|
+
import "highlight.js/lib/languages/java";
|
|
33
|
+
import "highlight.js/lib/languages/javascript";
|
|
34
|
+
import "highlight.js/lib/languages/json";
|
|
35
|
+
import "highlight.js/lib/languages/markdown";
|
|
36
|
+
import "highlight.js/lib/languages/php";
|
|
37
|
+
import "highlight.js/lib/languages/python";
|
|
38
|
+
import "highlight.js/lib/languages/shell";
|
|
39
|
+
import "highlight.js/lib/languages/sql";
|
|
40
|
+
import "highlight.js/lib/languages/typescript";
|
|
41
|
+
import "highlight.js/lib/languages/xml";
|
|
28
42
|
import "@ant-design/colors";
|
|
29
43
|
import "@unocss/preset-icons/browser";
|
|
30
44
|
import "@unocss/preset-typography";
|
|
@@ -38,14 +52,14 @@ import "../../pages/page404.js";
|
|
|
38
52
|
import "short-unique-id";
|
|
39
53
|
import "aieditor";
|
|
40
54
|
import { useModal as h } from "../../hooks/modal.js";
|
|
55
|
+
import "mime";
|
|
41
56
|
import "@iconify-json/tabler/icons.json";
|
|
42
57
|
import "../posterEditor/elements/index.js";
|
|
43
58
|
import "fabric";
|
|
44
|
-
import "mime";
|
|
45
59
|
import "dayjs";
|
|
46
60
|
import "@tanstack/vue-query";
|
|
47
61
|
import "pinia";
|
|
48
|
-
const
|
|
62
|
+
const Io = /* @__PURE__ */ n({
|
|
49
63
|
name: "DuxImageCrop",
|
|
50
64
|
props: {
|
|
51
65
|
defaultValue: {
|
|
@@ -70,7 +84,7 @@ const so = /* @__PURE__ */ n({
|
|
|
70
84
|
}) {
|
|
71
85
|
const {
|
|
72
86
|
t: i
|
|
73
|
-
} = s(),
|
|
87
|
+
} = s(), r = g(t, "value", m, {
|
|
74
88
|
passive: !0,
|
|
75
89
|
defaultValue: t.defaultValue || ""
|
|
76
90
|
}), {
|
|
@@ -82,21 +96,21 @@ const so = /* @__PURE__ */ n({
|
|
|
82
96
|
},
|
|
83
97
|
autoUpload: !0,
|
|
84
98
|
onSuccess: (o) => {
|
|
85
|
-
|
|
99
|
+
r.value = o.data?.url, p.success(i("components.upload.success"));
|
|
86
100
|
},
|
|
87
101
|
onError: (o) => {
|
|
88
102
|
p.error(o.message || i("components.upload.failed"));
|
|
89
103
|
}
|
|
90
104
|
});
|
|
91
|
-
return () =>
|
|
105
|
+
return () => e("div", {
|
|
92
106
|
class: ["relative size-80px overflow-hidden group", t.circle && "rounded-full"],
|
|
93
107
|
onClick: () => {
|
|
94
108
|
u.show({
|
|
95
109
|
component: () => import("./imageCropModal.js").then((o) => o.DuxImageCropModal),
|
|
96
110
|
componentProps: {
|
|
97
|
-
value:
|
|
111
|
+
value: r.value,
|
|
98
112
|
onConfirm: (o) => {
|
|
99
|
-
|
|
113
|
+
r.value = o;
|
|
100
114
|
}
|
|
101
115
|
}
|
|
102
116
|
})?.then?.((o) => {
|
|
@@ -104,17 +118,17 @@ const so = /* @__PURE__ */ n({
|
|
|
104
118
|
}).catch(() => {
|
|
105
119
|
});
|
|
106
120
|
}
|
|
107
|
-
}, [
|
|
108
|
-
src:
|
|
121
|
+
}, [e(v, {
|
|
122
|
+
src: r.value,
|
|
109
123
|
circle: t.circle,
|
|
110
124
|
size: 80
|
|
111
|
-
}, null),
|
|
125
|
+
}, null), e("div", {
|
|
112
126
|
class: "absolute size-full bg-gray-900/30 items-center justify-center inset-0 cursor-pointer hidden z-1 group-hover:flex"
|
|
113
|
-
}, [
|
|
127
|
+
}, [e("div", {
|
|
114
128
|
class: "i-tabler:pencil size-4 text-white/90"
|
|
115
129
|
}, null)])]);
|
|
116
130
|
}
|
|
117
131
|
});
|
|
118
132
|
export {
|
|
119
|
-
|
|
133
|
+
Io as DuxImageCrop
|
|
120
134
|
};
|
|
@@ -24,6 +24,20 @@ import { DuxDynamicData as S } from "./dynamicData.js";
|
|
|
24
24
|
import "@vee-validate/i18n";
|
|
25
25
|
import "colorizr";
|
|
26
26
|
import "echarts";
|
|
27
|
+
import "highlight.js/lib/core";
|
|
28
|
+
import "highlight.js/lib/languages/bash";
|
|
29
|
+
import "highlight.js/lib/languages/css";
|
|
30
|
+
import "highlight.js/lib/languages/go";
|
|
31
|
+
import "highlight.js/lib/languages/java";
|
|
32
|
+
import "highlight.js/lib/languages/javascript";
|
|
33
|
+
import "highlight.js/lib/languages/json";
|
|
34
|
+
import "highlight.js/lib/languages/markdown";
|
|
35
|
+
import "highlight.js/lib/languages/php";
|
|
36
|
+
import "highlight.js/lib/languages/python";
|
|
37
|
+
import "highlight.js/lib/languages/shell";
|
|
38
|
+
import "highlight.js/lib/languages/sql";
|
|
39
|
+
import "highlight.js/lib/languages/typescript";
|
|
40
|
+
import "highlight.js/lib/languages/xml";
|
|
27
41
|
import "@ant-design/colors";
|
|
28
42
|
import "@unocss/preset-icons/browser";
|
|
29
43
|
import "@unocss/preset-typography";
|
|
@@ -38,14 +52,14 @@ import "vue-draggable-plus";
|
|
|
38
52
|
import "short-unique-id";
|
|
39
53
|
import "aieditor";
|
|
40
54
|
import { useModal as w } from "../../hooks/modal.js";
|
|
55
|
+
import "mime";
|
|
41
56
|
import "@iconify-json/tabler/icons.json";
|
|
42
57
|
import "../posterEditor/elements/index.js";
|
|
43
58
|
import "fabric";
|
|
44
|
-
import "mime";
|
|
45
59
|
import "dayjs";
|
|
46
60
|
import "@tanstack/vue-query";
|
|
47
61
|
import "pinia";
|
|
48
|
-
const
|
|
62
|
+
const Et = /* @__PURE__ */ f({
|
|
49
63
|
name: "DuxDynamicSelect",
|
|
50
64
|
props: {
|
|
51
65
|
rowKey: {
|
|
@@ -68,38 +82,38 @@ const vt = /* @__PURE__ */ f({
|
|
|
68
82
|
}
|
|
69
83
|
},
|
|
70
84
|
setup(t, {
|
|
71
|
-
emit:
|
|
85
|
+
emit: a
|
|
72
86
|
}) {
|
|
73
|
-
const
|
|
87
|
+
const o = D(t, "value", a, {
|
|
74
88
|
passive: !0,
|
|
75
89
|
defaultValue: t.defaultValue,
|
|
76
90
|
deep: !0
|
|
77
|
-
}),
|
|
91
|
+
}), l = w(), u = d(), {
|
|
78
92
|
t: n
|
|
79
93
|
} = h(), i = s(!0);
|
|
80
|
-
return v([
|
|
81
|
-
if (!i.value || !
|
|
94
|
+
return v([o, i], () => {
|
|
95
|
+
if (!i.value || !o.value || o.value.length === 0)
|
|
82
96
|
return;
|
|
83
|
-
const r =
|
|
84
|
-
|
|
97
|
+
const r = o.value?.map((e) => e[t.rowKey]) || [];
|
|
98
|
+
u.request({
|
|
85
99
|
path: t.path,
|
|
86
100
|
query: {
|
|
87
101
|
ids: r?.join(",") || ""
|
|
88
102
|
}
|
|
89
|
-
}).then((
|
|
90
|
-
i.value = !1,
|
|
91
|
-
|
|
92
|
-
...
|
|
103
|
+
}).then((e) => {
|
|
104
|
+
i.value = !1, e?.data?.forEach((m, p) => {
|
|
105
|
+
o.value.some((c) => c[t.rowKey] === m[t.rowKey]) ? o.value[p] = {
|
|
106
|
+
...o.value[p],
|
|
93
107
|
...m
|
|
94
|
-
} :
|
|
108
|
+
} : o.value.push(m);
|
|
95
109
|
});
|
|
96
110
|
});
|
|
97
111
|
}), () => y(S, {
|
|
98
|
-
value:
|
|
99
|
-
"onUpdate:value": (r) =>
|
|
112
|
+
value: o.value,
|
|
113
|
+
"onUpdate:value": (r) => o.value = r,
|
|
100
114
|
columns: t.columns,
|
|
101
115
|
onCreate: () => {
|
|
102
|
-
|
|
116
|
+
l.show({
|
|
103
117
|
component: () => import("./selectModal.js"),
|
|
104
118
|
componentProps: {
|
|
105
119
|
path: t.path,
|
|
@@ -109,8 +123,8 @@ const vt = /* @__PURE__ */ f({
|
|
|
109
123
|
width: 1e3,
|
|
110
124
|
title: n("components.button.select")
|
|
111
125
|
}).then((r) => {
|
|
112
|
-
i.value = !1, r?.forEach((
|
|
113
|
-
|
|
126
|
+
i.value = !1, r?.forEach((e) => {
|
|
127
|
+
o.value.some((m) => m[t.rowKey] === e[t.rowKey]) || o.value.push(e);
|
|
114
128
|
});
|
|
115
129
|
});
|
|
116
130
|
}
|
|
@@ -118,5 +132,5 @@ const vt = /* @__PURE__ */ f({
|
|
|
118
132
|
}
|
|
119
133
|
});
|
|
120
134
|
export {
|
|
121
|
-
|
|
135
|
+
Et as DuxDynamicSelect
|
|
122
136
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as y, computed as h, ref as
|
|
1
|
+
import { defineComponent as y, computed as h, ref as p, watch as C, createVNode as e, Fragment as b, h as x, mergeProps as w, isVNode as z } from "vue";
|
|
2
2
|
import { useI18n as P, useJsonSchema as j } from "@duxweb/dvha-core";
|
|
3
3
|
import { NButton as l, NDataTable as k } from "naive-ui";
|
|
4
4
|
import "vue-router";
|
|
@@ -25,6 +25,20 @@ import "vue-draggable-plus";
|
|
|
25
25
|
import "@vee-validate/i18n";
|
|
26
26
|
import "colorizr";
|
|
27
27
|
import "echarts";
|
|
28
|
+
import "highlight.js/lib/core";
|
|
29
|
+
import "highlight.js/lib/languages/bash";
|
|
30
|
+
import "highlight.js/lib/languages/css";
|
|
31
|
+
import "highlight.js/lib/languages/go";
|
|
32
|
+
import "highlight.js/lib/languages/java";
|
|
33
|
+
import "highlight.js/lib/languages/javascript";
|
|
34
|
+
import "highlight.js/lib/languages/json";
|
|
35
|
+
import "highlight.js/lib/languages/markdown";
|
|
36
|
+
import "highlight.js/lib/languages/php";
|
|
37
|
+
import "highlight.js/lib/languages/python";
|
|
38
|
+
import "highlight.js/lib/languages/shell";
|
|
39
|
+
import "highlight.js/lib/languages/sql";
|
|
40
|
+
import "highlight.js/lib/languages/typescript";
|
|
41
|
+
import "highlight.js/lib/languages/xml";
|
|
28
42
|
import "@ant-design/colors";
|
|
29
43
|
import "@unocss/preset-icons/browser";
|
|
30
44
|
import "@unocss/preset-typography";
|
|
@@ -37,10 +51,10 @@ import "@duxweb/dvha-naiveui";
|
|
|
37
51
|
import "../../pages/page404.js";
|
|
38
52
|
import "short-unique-id";
|
|
39
53
|
import "aieditor";
|
|
54
|
+
import "mime";
|
|
40
55
|
import "@iconify-json/tabler/icons.json";
|
|
41
56
|
import "../posterEditor/elements/index.js";
|
|
42
57
|
import "fabric";
|
|
43
|
-
import "mime";
|
|
44
58
|
import "dayjs";
|
|
45
59
|
import "@tanstack/vue-query";
|
|
46
60
|
import { useTable as N } from "../../hooks/table.js";
|
|
@@ -48,7 +62,7 @@ import "pinia";
|
|
|
48
62
|
function c(t) {
|
|
49
63
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !z(t);
|
|
50
64
|
}
|
|
51
|
-
const
|
|
65
|
+
const Vt = /* @__PURE__ */ y({
|
|
52
66
|
name: "Select",
|
|
53
67
|
props: {
|
|
54
68
|
path: String,
|
|
@@ -65,11 +79,11 @@ const wt = /* @__PURE__ */ y({
|
|
|
65
79
|
},
|
|
66
80
|
setup(t) {
|
|
67
81
|
const {
|
|
68
|
-
t:
|
|
82
|
+
t: m
|
|
69
83
|
} = P(), u = h(() => [{
|
|
70
84
|
type: "selection",
|
|
71
85
|
fixed: "left"
|
|
72
|
-
}, ...t.columns || []]),
|
|
86
|
+
}, ...t.columns || []]), a = p({}), i = p({
|
|
73
87
|
page: 1,
|
|
74
88
|
pageSize: 10
|
|
75
89
|
}), {
|
|
@@ -81,60 +95,60 @@ const wt = /* @__PURE__ */ y({
|
|
|
81
95
|
} = N({
|
|
82
96
|
path: t.path || "",
|
|
83
97
|
columns: u.value || [],
|
|
84
|
-
filters:
|
|
98
|
+
filters: a,
|
|
85
99
|
pagination: i.value
|
|
86
|
-
}),
|
|
87
|
-
C(S, (
|
|
88
|
-
|
|
100
|
+
}), n = p([]);
|
|
101
|
+
C(S, (o) => {
|
|
102
|
+
n.value = f.value?.filter((r) => o.includes(r[t.rowKey]));
|
|
89
103
|
});
|
|
90
104
|
const v = j({
|
|
91
105
|
data: t.filterSchema || [],
|
|
92
106
|
context: {
|
|
93
|
-
filter:
|
|
107
|
+
filter: a.value
|
|
94
108
|
}
|
|
95
109
|
});
|
|
96
|
-
return () =>
|
|
97
|
-
title:
|
|
110
|
+
return () => e(K, {
|
|
111
|
+
title: m("components.data.selectTitle"),
|
|
98
112
|
onClose: () => {
|
|
99
113
|
t.onClose?.();
|
|
100
114
|
}
|
|
101
115
|
}, {
|
|
102
|
-
default: () =>
|
|
116
|
+
default: () => e("div", {
|
|
103
117
|
class: "flex flex-col gap-4"
|
|
104
|
-
}, [t.filterSchema &&
|
|
118
|
+
}, [t.filterSchema && e("div", {
|
|
105
119
|
class: "grid grid-cols-1 md:grid-cols-4 gap-2"
|
|
106
|
-
}, [x(v.render)]),
|
|
120
|
+
}, [x(v.render)]), e(k, w({
|
|
107
121
|
bordered: !1,
|
|
108
122
|
maxHeight: 400,
|
|
109
|
-
rowKey: (
|
|
123
|
+
rowKey: (o) => o[t.rowKey]
|
|
110
124
|
}, s.value, {
|
|
111
125
|
pagination: {
|
|
112
126
|
page: i.value.page,
|
|
113
127
|
pageSize: i.value.pageSize,
|
|
114
128
|
pageCount: d.value,
|
|
115
129
|
pageSizes: g,
|
|
116
|
-
onUpdatePage: (
|
|
117
|
-
i.value.page =
|
|
130
|
+
onUpdatePage: (o) => {
|
|
131
|
+
i.value.page = o;
|
|
118
132
|
},
|
|
119
|
-
onUpdatePageSize: (
|
|
120
|
-
i.value.pageSize =
|
|
133
|
+
onUpdatePageSize: (o) => {
|
|
134
|
+
i.value.pageSize = o;
|
|
121
135
|
}
|
|
122
136
|
}
|
|
123
137
|
}), null)]),
|
|
124
138
|
footer: () => {
|
|
125
|
-
let
|
|
126
|
-
return
|
|
139
|
+
let o, r;
|
|
140
|
+
return e(b, null, [e(l, {
|
|
127
141
|
onClick: () => {
|
|
128
142
|
t.onClose?.();
|
|
129
143
|
}
|
|
130
|
-
}, c(
|
|
131
|
-
default: () => [
|
|
132
|
-
}),
|
|
144
|
+
}, c(o = m("components.button.cancel")) ? o : {
|
|
145
|
+
default: () => [o]
|
|
146
|
+
}), e(l, {
|
|
133
147
|
type: "primary",
|
|
134
148
|
onClick: () => {
|
|
135
|
-
t.onConfirm?.(
|
|
149
|
+
t.onConfirm?.(n.value);
|
|
136
150
|
}
|
|
137
|
-
}, c(r =
|
|
151
|
+
}, c(r = m("components.button.select")) ? r : {
|
|
138
152
|
default: () => [r]
|
|
139
153
|
})]);
|
|
140
154
|
}
|
|
@@ -142,5 +156,5 @@ const wt = /* @__PURE__ */ y({
|
|
|
142
156
|
}
|
|
143
157
|
});
|
|
144
158
|
export {
|
|
145
|
-
|
|
159
|
+
Vt as default
|
|
146
160
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVNode as n, defineComponent as u, computed as
|
|
1
|
+
import { createVNode as n, defineComponent as u, computed as d, isVNode as g } from "vue";
|
|
2
2
|
import { useI18n as f } from "@duxweb/dvha-core";
|
|
3
3
|
import { useVModel as h } from "@vueuse/core";
|
|
4
4
|
import v from "clsx";
|
|
@@ -30,6 +30,20 @@ import "vee-validate";
|
|
|
30
30
|
import "@vee-validate/i18n";
|
|
31
31
|
import "colorizr";
|
|
32
32
|
import "echarts";
|
|
33
|
+
import "highlight.js/lib/core";
|
|
34
|
+
import "highlight.js/lib/languages/bash";
|
|
35
|
+
import "highlight.js/lib/languages/css";
|
|
36
|
+
import "highlight.js/lib/languages/go";
|
|
37
|
+
import "highlight.js/lib/languages/java";
|
|
38
|
+
import "highlight.js/lib/languages/javascript";
|
|
39
|
+
import "highlight.js/lib/languages/json";
|
|
40
|
+
import "highlight.js/lib/languages/markdown";
|
|
41
|
+
import "highlight.js/lib/languages/php";
|
|
42
|
+
import "highlight.js/lib/languages/python";
|
|
43
|
+
import "highlight.js/lib/languages/shell";
|
|
44
|
+
import "highlight.js/lib/languages/sql";
|
|
45
|
+
import "highlight.js/lib/languages/typescript";
|
|
46
|
+
import "highlight.js/lib/languages/xml";
|
|
33
47
|
import "@ant-design/colors";
|
|
34
48
|
import "@unocss/preset-icons/browser";
|
|
35
49
|
import "@unocss/preset-typography";
|
|
@@ -39,10 +53,10 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
|
39
53
|
import "vue-command-palette";
|
|
40
54
|
import "@duxweb/dvha-naiveui";
|
|
41
55
|
import "../../../pages/page404.js";
|
|
56
|
+
import "mime";
|
|
42
57
|
import "@iconify-json/tabler/icons.json";
|
|
43
58
|
import "../../posterEditor/elements/index.js";
|
|
44
59
|
import "fabric";
|
|
45
|
-
import "mime";
|
|
46
60
|
import "dayjs";
|
|
47
61
|
import "@tanstack/vue-query";
|
|
48
62
|
import "pinia";
|
|
@@ -60,12 +74,12 @@ const C = /* @__PURE__ */ u({
|
|
|
60
74
|
onChildren: Function
|
|
61
75
|
},
|
|
62
76
|
setup(o) {
|
|
63
|
-
const r =
|
|
64
|
-
const t = [...o.children || []],
|
|
65
|
-
for (; t.length <
|
|
77
|
+
const r = d(() => o.options?.col || 2), i = d(() => {
|
|
78
|
+
const t = [...o.children || []], e = r.value;
|
|
79
|
+
for (; t.length < e; )
|
|
66
80
|
t.push([]);
|
|
67
|
-
for (let
|
|
68
|
-
Array.isArray(t[
|
|
81
|
+
for (let p = 0; p < e; p++)
|
|
82
|
+
Array.isArray(t[p]) || (t[p] = []);
|
|
69
83
|
return t;
|
|
70
84
|
});
|
|
71
85
|
return () => {
|
|
@@ -73,18 +87,18 @@ const C = /* @__PURE__ */ u({
|
|
|
73
87
|
return n(b, {
|
|
74
88
|
cols: r.value,
|
|
75
89
|
spac: o.options?.spac
|
|
76
|
-
}, x(t =
|
|
77
|
-
const
|
|
90
|
+
}, x(t = i.value.map((e, p) => {
|
|
91
|
+
const m = e;
|
|
78
92
|
return n("div", {
|
|
79
|
-
key:
|
|
93
|
+
key: p,
|
|
80
94
|
class: v({
|
|
81
|
-
"rounded border border-dashed border-accented": !
|
|
95
|
+
"rounded border border-dashed border-accented": !m?.length
|
|
82
96
|
})
|
|
83
97
|
}, [n(E, {
|
|
84
|
-
modelValue:
|
|
98
|
+
modelValue: m,
|
|
85
99
|
onUpdate: (s) => {
|
|
86
|
-
const
|
|
87
|
-
p
|
|
100
|
+
const l = [...i.value];
|
|
101
|
+
l[p] = s, o.onChildren?.(l);
|
|
88
102
|
}
|
|
89
103
|
}, null)]);
|
|
90
104
|
})) ? t : {
|
|
@@ -107,33 +121,33 @@ const C = /* @__PURE__ */ u({
|
|
|
107
121
|
emit: r
|
|
108
122
|
}) {
|
|
109
123
|
const {
|
|
110
|
-
t:
|
|
124
|
+
t: i
|
|
111
125
|
} = f(), t = h(o, "value", r);
|
|
112
126
|
return () => n(y, {
|
|
113
|
-
title:
|
|
127
|
+
title: i("components.designEditor.grid.title"),
|
|
114
128
|
icon: "i-tabler:grid-4x4"
|
|
115
129
|
}, {
|
|
116
130
|
default: () => [n(a, {
|
|
117
|
-
label:
|
|
131
|
+
label: i("components.designEditor.grid.columns"),
|
|
118
132
|
path: "col"
|
|
119
133
|
}, {
|
|
120
134
|
default: () => [n(c, {
|
|
121
135
|
value: t.value.col,
|
|
122
|
-
"onUpdate:value": (
|
|
136
|
+
"onUpdate:value": (e) => t.value.col = e,
|
|
123
137
|
min: 1,
|
|
124
138
|
max: 12,
|
|
125
|
-
placeholder:
|
|
139
|
+
placeholder: i("components.designEditor.grid.columnsPlaceholder")
|
|
126
140
|
}, null)]
|
|
127
141
|
}), n(a, {
|
|
128
|
-
label:
|
|
142
|
+
label: i("components.designEditor.grid.spacing"),
|
|
129
143
|
path: "spac"
|
|
130
144
|
}, {
|
|
131
145
|
default: () => [n(c, {
|
|
132
146
|
value: t.value.spac,
|
|
133
|
-
"onUpdate:value": (
|
|
147
|
+
"onUpdate:value": (e) => t.value.spac = e,
|
|
134
148
|
min: 0,
|
|
135
149
|
max: 100,
|
|
136
|
-
placeholder:
|
|
150
|
+
placeholder: i("components.designEditor.grid.spacingPlaceholder")
|
|
137
151
|
}, null)]
|
|
138
152
|
})]
|
|
139
153
|
});
|
|
@@ -142,10 +156,10 @@ const C = /* @__PURE__ */ u({
|
|
|
142
156
|
function j(o) {
|
|
143
157
|
const {
|
|
144
158
|
children: r,
|
|
145
|
-
convertToJsonSchema:
|
|
159
|
+
convertToJsonSchema: i
|
|
146
160
|
} = o || {};
|
|
147
161
|
let t = [];
|
|
148
|
-
return r?.length &&
|
|
162
|
+
return r?.length && i && (t = r.flatMap((e) => Array.isArray(e) ? i(e) : [])), {
|
|
149
163
|
tag: "dux-grid",
|
|
150
164
|
attrs: {
|
|
151
165
|
cols: o?.options?.col || 2,
|
|
@@ -154,7 +168,7 @@ function j(o) {
|
|
|
154
168
|
children: t
|
|
155
169
|
};
|
|
156
170
|
}
|
|
157
|
-
function
|
|
171
|
+
function Dt(o) {
|
|
158
172
|
return {
|
|
159
173
|
name: "dux-grid",
|
|
160
174
|
icon: "i-tabler:grid-4x4",
|
|
@@ -171,5 +185,5 @@ function Et(o) {
|
|
|
171
185
|
};
|
|
172
186
|
}
|
|
173
187
|
export {
|
|
174
|
-
|
|
188
|
+
Dt as duxFormEditorGrid
|
|
175
189
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import I from "short-unique-id";
|
|
2
|
-
import { ref as
|
|
2
|
+
import { ref as u, computed as x } from "vue";
|
|
3
3
|
function C({ settingPage: f }) {
|
|
4
|
-
const c =
|
|
4
|
+
const c = u([]), i = u([]), p = u(), o = u({
|
|
5
5
|
config: f?.default || {},
|
|
6
6
|
data: []
|
|
7
7
|
}), y = () => {
|
|
@@ -17,11 +17,11 @@ function C({ settingPage: f }) {
|
|
|
17
17
|
label: e.label,
|
|
18
18
|
icon: e.icon,
|
|
19
19
|
children: c.value.filter((n) => n.group === e.name)
|
|
20
|
-
}))),
|
|
20
|
+
}))), s = (e, n) => {
|
|
21
21
|
for (const t of n)
|
|
22
22
|
if (t) {
|
|
23
23
|
if (Array.isArray(t)) {
|
|
24
|
-
const r =
|
|
24
|
+
const r = s(e, t);
|
|
25
25
|
if (r)
|
|
26
26
|
return r;
|
|
27
27
|
continue;
|
|
@@ -29,14 +29,14 @@ function C({ settingPage: f }) {
|
|
|
29
29
|
if (t.key === e)
|
|
30
30
|
return t;
|
|
31
31
|
if (t.children && t.children.length) {
|
|
32
|
-
const r =
|
|
32
|
+
const r = s(e, t.children);
|
|
33
33
|
if (r)
|
|
34
34
|
return r;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}, h = (e) => {
|
|
38
38
|
if (e)
|
|
39
|
-
return
|
|
39
|
+
return s(e, o.value.data);
|
|
40
40
|
}, { randomUUID: v } = new I({ length: 10 }), d = (e) => e?.map((n) => {
|
|
41
41
|
if (n)
|
|
42
42
|
return Array.isArray(n) ? d(n) : (n.key = v(), n.children && n.children.length > 0 && (n.children = d(n.children)), n);
|
|
@@ -44,17 +44,17 @@ function C({ settingPage: f }) {
|
|
|
44
44
|
for (const r of e)
|
|
45
45
|
if (r) {
|
|
46
46
|
if (Array.isArray(r)) {
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
49
|
-
return
|
|
47
|
+
const a = l(r, n, r);
|
|
48
|
+
if (a)
|
|
49
|
+
return a;
|
|
50
50
|
continue;
|
|
51
51
|
}
|
|
52
52
|
if (r.key === n)
|
|
53
53
|
return t;
|
|
54
54
|
if (r.children && r.children.length) {
|
|
55
|
-
const
|
|
56
|
-
if (
|
|
57
|
-
return
|
|
55
|
+
const a = l(r.children, n, r);
|
|
56
|
+
if (a)
|
|
57
|
+
return a;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
};
|
|
@@ -68,16 +68,16 @@ function C({ settingPage: f }) {
|
|
|
68
68
|
group: i,
|
|
69
69
|
getData: h,
|
|
70
70
|
selected: p,
|
|
71
|
-
value:
|
|
71
|
+
value: o,
|
|
72
72
|
copyData: (e, n) => {
|
|
73
73
|
const t = h(e), r = JSON.parse(JSON.stringify(t));
|
|
74
74
|
r.key = v(), r.children && r.children.length > 0 && (r.children = d(r.children));
|
|
75
|
-
const
|
|
76
|
-
|
|
75
|
+
const a = l(o.value.data, e);
|
|
76
|
+
a ? Array.isArray(a) ? a.splice(n + 1, 0, r) : a.children?.splice(n + 1, 0, r) : o.value.data?.splice(n + 1, 0, r);
|
|
77
77
|
},
|
|
78
78
|
deleteData: (e, n) => {
|
|
79
|
-
const t = l(
|
|
80
|
-
t ? Array.isArray(t) ? t.splice(n, 1) : t.children?.splice(n, 1) :
|
|
79
|
+
const t = l(o.value.data, e);
|
|
80
|
+
t ? Array.isArray(t) ? t.splice(n, 1) : t.children?.splice(n, 1) : o.value.data.splice(n, 1), p.value = void 0, o.value = { ...o.value };
|
|
81
81
|
},
|
|
82
82
|
settingPage: f
|
|
83
83
|
};
|