@duxweb/dvha-pro 1.0.31 → 1.0.33
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/setting.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 -0
- 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/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/dvha-pro.css +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/index.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 +31 -31
- package/dist/esm/components/chart/echart.js +16 -2
- package/dist/esm/components/crop/imageCrop.js +26 -12
- package/dist/esm/components/data/dynamicSelect.js +34 -20
- package/dist/esm/components/data/selectModal.js +41 -27
- package/dist/esm/components/designEditor/components/grid.js +39 -25
- package/dist/esm/components/designEditor/editor/setting.js +36 -22
- 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 +40 -30
- package/dist/esm/components/form/pageTabForm.js +159 -0
- package/dist/esm/components/form/settingForm.js +32 -18
- package/dist/esm/components/formEditor/base/base.js +29 -15
- package/dist/esm/components/formEditor/base/setting.js +21 -7
- package/dist/esm/components/formEditor/components/cascader.js +65 -51
- package/dist/esm/components/formEditor/components/cascaderAsync.js +95 -81
- package/dist/esm/components/formEditor/components/checkbox.js +43 -29
- package/dist/esm/components/formEditor/components/color.js +34 -20
- package/dist/esm/components/formEditor/components/date.js +51 -37
- package/dist/esm/components/formEditor/components/dynamicInput.js +42 -28
- package/dist/esm/components/formEditor/components/dynamicTags.js +39 -25
- package/dist/esm/components/formEditor/components/editor.js +23 -9
- package/dist/esm/components/formEditor/components/input.js +66 -52
- package/dist/esm/components/formEditor/components/inputNumber.js +37 -23
- package/dist/esm/components/formEditor/components/mentionAsync.js +60 -46
- package/dist/esm/components/formEditor/components/radio.js +28 -14
- package/dist/esm/components/formEditor/components/region.js +37 -23
- package/dist/esm/components/formEditor/components/select.js +16 -2
- package/dist/esm/components/formEditor/components/selectAsync.js +72 -58
- package/dist/esm/components/formEditor/components/sider.js +40 -26
- package/dist/esm/components/formEditor/components/switch.js +33 -19
- package/dist/esm/components/formEditor/components/time.js +60 -46
- package/dist/esm/components/formEditor/components/transferAsync.js +49 -35
- package/dist/esm/components/formEditor/components/treeSelect.js +54 -40
- package/dist/esm/components/formEditor/components/treeSelectAsync.js +74 -60
- package/dist/esm/components/formEditor/editor.js +16 -2
- package/dist/esm/components/formEditor/renderer.js +28 -14
- package/dist/esm/components/icon/icon.js +23 -9
- package/dist/esm/components/layout/list.js +69 -55
- package/dist/esm/components/layout/table.js +101 -85
- package/dist/esm/components/level/level.js +37 -23
- 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 +21 -7
- package/dist/esm/components/upload/file.js +20 -4
- package/dist/esm/components/upload/image.js +42 -28
- package/dist/esm/components/upload/manage/item.js +24 -10
- package/dist/esm/components/upload/manager.js +16 -2
- package/dist/esm/config/echart.js +1 -1
- package/dist/esm/dvha-pro.css +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/index.js +130 -128
- package/dist/esm/pages/layout/global.js +52 -37
- package/dist/esm/pages/layout/page.js +26 -12
- package/dist/esm/pages/login.js +33 -19
- package/dist/esm/pages/menu/avatar.js +46 -32
- package/dist/esm/pages/menu/button.js +22 -8
- package/dist/esm/pages/menu/cmd.js +51 -37
- package/dist/esm/pages/menu/main.js +42 -28
- package/dist/esm/pages/menu/mobile.js +16 -2
- 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/data/selectModal.d.ts +1 -1
- package/dist/types/components/form/index.d.ts +1 -0
- package/dist/types/components/form/pageForm.d.ts +0 -9
- package/dist/types/components/form/pageTabForm.d.ts +63 -0
- package/dist/types/components/layout/table.d.ts +2 -2
- package/dist/types/components/table/tablePage.d.ts +2 -2
- package/package.json +5 -3
|
@@ -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";
|
|
@@ -45,7 +59,7 @@ 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,
|
|
@@ -107,10 +121,10 @@ const vt = /* @__PURE__ */ f({
|
|
|
107
121
|
filterSchema: t.filterSchema
|
|
108
122
|
},
|
|
109
123
|
width: 1e3,
|
|
110
|
-
title: n("
|
|
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";
|
|
@@ -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";
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as m, inject as l, computed as p, createVNode as
|
|
1
|
+
import { defineComponent as m, inject as l, computed as p, createVNode as o } from "vue";
|
|
2
2
|
import "clsx";
|
|
3
3
|
import "naive-ui";
|
|
4
4
|
import "vue-echarts";
|
|
@@ -29,6 +29,20 @@ import "vue-draggable-plus";
|
|
|
29
29
|
import "@vee-validate/i18n";
|
|
30
30
|
import "colorizr";
|
|
31
31
|
import "echarts";
|
|
32
|
+
import "highlight.js/lib/core";
|
|
33
|
+
import "highlight.js/lib/languages/bash";
|
|
34
|
+
import "highlight.js/lib/languages/css";
|
|
35
|
+
import "highlight.js/lib/languages/go";
|
|
36
|
+
import "highlight.js/lib/languages/java";
|
|
37
|
+
import "highlight.js/lib/languages/javascript";
|
|
38
|
+
import "highlight.js/lib/languages/json";
|
|
39
|
+
import "highlight.js/lib/languages/markdown";
|
|
40
|
+
import "highlight.js/lib/languages/php";
|
|
41
|
+
import "highlight.js/lib/languages/python";
|
|
42
|
+
import "highlight.js/lib/languages/shell";
|
|
43
|
+
import "highlight.js/lib/languages/sql";
|
|
44
|
+
import "highlight.js/lib/languages/typescript";
|
|
45
|
+
import "highlight.js/lib/languages/xml";
|
|
32
46
|
import "@ant-design/colors";
|
|
33
47
|
import "@unocss/preset-icons/browser";
|
|
34
48
|
import "@unocss/preset-typography";
|
|
@@ -44,48 +58,48 @@ import { DuxFormLayout as a } from "../../form/formLayout.js";
|
|
|
44
58
|
import "@iconify-json/tabler/icons.json";
|
|
45
59
|
import "../../posterEditor/elements/index.js";
|
|
46
60
|
import "fabric";
|
|
47
|
-
const
|
|
61
|
+
const gt = /* @__PURE__ */ m({
|
|
48
62
|
name: "WidgetEditorSetting",
|
|
49
63
|
props: {
|
|
50
64
|
actionRender: Function
|
|
51
65
|
},
|
|
52
|
-
setup(
|
|
53
|
-
const t = l("editor.use"),
|
|
54
|
-
return () =>
|
|
66
|
+
setup(e) {
|
|
67
|
+
const t = l("editor.use"), i = p(() => t?.getData(t.selected.value)), n = p(() => t?.components.value?.find((r) => r.name === i.value?.name));
|
|
68
|
+
return () => o("div", {
|
|
55
69
|
class: "flex-none p-2 max-w-full w-220px overflow-y-auto bg-default",
|
|
56
|
-
key:
|
|
70
|
+
key: i.value?.key
|
|
57
71
|
}, [n.value?.setting?.({
|
|
58
|
-
value:
|
|
59
|
-
"update:modelValue": (
|
|
60
|
-
|
|
72
|
+
value: i.value?.options,
|
|
73
|
+
"update:modelValue": (r) => {
|
|
74
|
+
i?.value && (i.value.options = r);
|
|
61
75
|
}
|
|
62
|
-
}) ||
|
|
76
|
+
}) || o("div", {
|
|
63
77
|
class: "flex flex-col gap-2 h-full"
|
|
64
|
-
}, [
|
|
78
|
+
}, [o("div", {
|
|
65
79
|
class: "flex-1 min-h-0"
|
|
66
80
|
}, [t?.settingPage?.component?.({
|
|
67
81
|
value: t.value.value.config,
|
|
68
|
-
"update:modelValue": (
|
|
69
|
-
t.value.value.config =
|
|
82
|
+
"update:modelValue": (r) => {
|
|
83
|
+
t.value.value.config = r;
|
|
70
84
|
}
|
|
71
|
-
})]),
|
|
85
|
+
})]), e?.actionRender?.(t)])]);
|
|
72
86
|
}
|
|
73
|
-
}),
|
|
87
|
+
}), xt = /* @__PURE__ */ m({
|
|
74
88
|
name: "WidgetEditorSettingCard",
|
|
75
89
|
props: {
|
|
76
90
|
title: String,
|
|
77
91
|
icon: String
|
|
78
92
|
},
|
|
79
|
-
setup(
|
|
93
|
+
setup(e, {
|
|
80
94
|
slots: t
|
|
81
95
|
}) {
|
|
82
|
-
return () =>
|
|
96
|
+
return () => o("div", {
|
|
83
97
|
class: "flex flex-col"
|
|
84
|
-
}, [
|
|
98
|
+
}, [o("div", {
|
|
85
99
|
class: "bg-elevated rounded py-2 px-4 flex justify-center items-center gap-2"
|
|
86
|
-
}, [
|
|
100
|
+
}, [o("div", null, [e.title])]), o("div", {
|
|
87
101
|
class: "py-4 flex-1"
|
|
88
|
-
}, [
|
|
102
|
+
}, [o(a, {
|
|
89
103
|
labelPlacement: "top"
|
|
90
104
|
}, {
|
|
91
105
|
default: () => [t.default?.()]
|
|
@@ -93,6 +107,6 @@ const ot = /* @__PURE__ */ m({
|
|
|
93
107
|
}
|
|
94
108
|
});
|
|
95
109
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
110
|
+
gt as WidgetEditorSetting,
|
|
111
|
+
xt as WidgetEditorSettingCard
|
|
98
112
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as b, computed as v, toRef as C, createVNode as
|
|
1
|
+
import { defineComponent as b, computed as v, toRef as C, createVNode as i, Fragment as F, mergeProps as x, isVNode as D } from "vue";
|
|
2
2
|
import { useI18n as E, useInvalidate as N, useExtendForm as h } from "@duxweb/dvha-core";
|
|
3
3
|
import { useMessage as j, NButton as p, NScrollbar as w } from "naive-ui";
|
|
4
4
|
import "clsx";
|
|
@@ -29,6 +29,20 @@ import "vue-draggable-plus";
|
|
|
29
29
|
import "@vee-validate/i18n";
|
|
30
30
|
import "colorizr";
|
|
31
31
|
import "echarts";
|
|
32
|
+
import "highlight.js/lib/core";
|
|
33
|
+
import "highlight.js/lib/languages/bash";
|
|
34
|
+
import "highlight.js/lib/languages/css";
|
|
35
|
+
import "highlight.js/lib/languages/go";
|
|
36
|
+
import "highlight.js/lib/languages/java";
|
|
37
|
+
import "highlight.js/lib/languages/javascript";
|
|
38
|
+
import "highlight.js/lib/languages/json";
|
|
39
|
+
import "highlight.js/lib/languages/markdown";
|
|
40
|
+
import "highlight.js/lib/languages/php";
|
|
41
|
+
import "highlight.js/lib/languages/python";
|
|
42
|
+
import "highlight.js/lib/languages/shell";
|
|
43
|
+
import "highlight.js/lib/languages/sql";
|
|
44
|
+
import "highlight.js/lib/languages/typescript";
|
|
45
|
+
import "highlight.js/lib/languages/xml";
|
|
32
46
|
import "@ant-design/colors";
|
|
33
47
|
import "@unocss/preset-icons/browser";
|
|
34
48
|
import "@unocss/preset-typography";
|
|
@@ -48,7 +62,7 @@ import "fabric";
|
|
|
48
62
|
function s(t) {
|
|
49
63
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !D(t);
|
|
50
64
|
}
|
|
51
|
-
const
|
|
65
|
+
const Ht = /* @__PURE__ */ b({
|
|
52
66
|
name: "DuxDrawerForm",
|
|
53
67
|
props: {
|
|
54
68
|
id: {
|
|
@@ -88,7 +102,7 @@ const Ot = /* @__PURE__ */ b({
|
|
|
88
102
|
} = E(), l = v(() => {
|
|
89
103
|
const {
|
|
90
104
|
onClose: o,
|
|
91
|
-
onSuccess:
|
|
105
|
+
onSuccess: e,
|
|
92
106
|
onError: P,
|
|
93
107
|
action: _,
|
|
94
108
|
title: k,
|
|
@@ -98,10 +112,10 @@ const Ot = /* @__PURE__ */ b({
|
|
|
98
112
|
...S
|
|
99
113
|
} = t;
|
|
100
114
|
return S;
|
|
101
|
-
}), u = C(t, "data", {}),
|
|
115
|
+
}), u = C(t, "data", {}), m = j(), {
|
|
102
116
|
invalidate: d
|
|
103
117
|
} = N(), {
|
|
104
|
-
isLoading:
|
|
118
|
+
isLoading: n,
|
|
105
119
|
onSubmit: f,
|
|
106
120
|
onReset: g,
|
|
107
121
|
isEdit: y
|
|
@@ -111,42 +125,42 @@ const Ot = /* @__PURE__ */ b({
|
|
|
111
125
|
form: u,
|
|
112
126
|
action: t.action,
|
|
113
127
|
onError: (o) => {
|
|
114
|
-
|
|
128
|
+
m.error(o.message || r("components.form.error")), t.onError?.(o);
|
|
115
129
|
},
|
|
116
130
|
onSuccess: (o) => {
|
|
117
|
-
|
|
131
|
+
m.success(r("components.form.success")), t.onSuccess?.(o), t.onClose?.(), t.invalidate && d(t.invalidate);
|
|
118
132
|
}
|
|
119
133
|
});
|
|
120
|
-
return () =>
|
|
134
|
+
return () => i(O, {
|
|
121
135
|
scrollbar: !1,
|
|
122
136
|
title: t?.title || (y.value ? r("components.form.edit") : r("components.form.create")),
|
|
123
137
|
onClose: t?.onClose
|
|
124
138
|
}, {
|
|
125
|
-
default: () =>
|
|
126
|
-
default: () => [
|
|
139
|
+
default: () => i(w, null, {
|
|
140
|
+
default: () => [i(a, x({
|
|
127
141
|
class: "p-4"
|
|
128
142
|
}, l.value), {
|
|
129
143
|
default: () => [c?.default?.()]
|
|
130
144
|
})]
|
|
131
145
|
}),
|
|
132
146
|
footer: () => {
|
|
133
|
-
let o,
|
|
134
|
-
return
|
|
147
|
+
let o, e;
|
|
148
|
+
return i(F, null, [i(p, {
|
|
135
149
|
onClick: g,
|
|
136
|
-
loading:
|
|
150
|
+
loading: n.value
|
|
137
151
|
}, s(o = r("components.button.reset")) ? o : {
|
|
138
152
|
default: () => [o]
|
|
139
|
-
}),
|
|
153
|
+
}), i(p, {
|
|
140
154
|
type: "primary",
|
|
141
|
-
loading:
|
|
155
|
+
loading: n.value,
|
|
142
156
|
onClick: () => f()
|
|
143
|
-
}, s(
|
|
144
|
-
default: () => [
|
|
157
|
+
}, s(e = r("components.button.submit")) ? e : {
|
|
158
|
+
default: () => [e]
|
|
145
159
|
})]);
|
|
146
160
|
}
|
|
147
161
|
});
|
|
148
162
|
}
|
|
149
163
|
});
|
|
150
164
|
export {
|
|
151
|
-
|
|
165
|
+
Ht as DuxDrawerForm
|
|
152
166
|
};
|