@duxweb/dvha-pro 1.1.29 → 1.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/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/editor/aiEditor.cjs +1 -1
- package/dist/cjs/components/flowEditor/components/setting.cjs +1 -1
- package/dist/cjs/components/formEditor/base/base.cjs +1 -1
- package/dist/cjs/components/formEditor/components/cascader.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 -1
- package/dist/cjs/components/formEditor/components/imageUpload.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/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/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/treeSelect.cjs +1 -1
- package/dist/cjs/components/formEditor/editor.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/layout/tools.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/schemaEditor/schemaEditor.cjs +1 -1
- package/dist/cjs/components/spec/spec.cjs +1 -1
- package/dist/cjs/components/spec/specEditor.cjs +1 -1
- package/dist/cjs/components/table/table.cjs +1 -1
- package/dist/cjs/components/textImageEditor/textImageEditor.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/upload/video.cjs +1 -1
- package/dist/cjs/pages/layout/page.cjs +1 -1
- package/dist/cjs/pages/menu/button.cjs +1 -1
- package/dist/cjs/pages/menu/menuApp.cjs +1 -1
- package/dist/cjs/pages/menu/menuMain.cjs +1 -1
- package/dist/cjs/pages/menu/mobile.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +3 -0
- package/dist/esm/components/chart/echart.js +1 -1
- package/dist/esm/components/crop/imageCrop.js +1 -1
- package/dist/esm/components/data/dynamicSelect.js +1 -1
- package/dist/esm/components/data/selectModal.js +1 -1
- package/dist/esm/components/designEditor/components/grid.js +1 -1
- package/dist/esm/components/editor/aiEditor.js +1 -1
- package/dist/esm/components/flowEditor/components/setting.js +1 -1
- package/dist/esm/components/formEditor/base/base.js +1 -1
- package/dist/esm/components/formEditor/components/cascader.js +1 -1
- package/dist/esm/components/formEditor/components/checkbox.js +1 -1
- package/dist/esm/components/formEditor/components/color.js +1 -1
- package/dist/esm/components/formEditor/components/date.js +1 -1
- package/dist/esm/components/formEditor/components/dynamicInput.js +1 -1
- package/dist/esm/components/formEditor/components/dynamicTags.js +1 -1
- package/dist/esm/components/formEditor/components/editor.js +1 -1
- package/dist/esm/components/formEditor/components/fileUpload.js +1 -1
- package/dist/esm/components/formEditor/components/imageUpload.js +1 -1
- package/dist/esm/components/formEditor/components/input.js +1 -1
- package/dist/esm/components/formEditor/components/inputNumber.js +1 -1
- package/dist/esm/components/formEditor/components/radio.js +1 -1
- package/dist/esm/components/formEditor/components/region.js +1 -1
- package/dist/esm/components/formEditor/components/select.js +1 -1
- package/dist/esm/components/formEditor/components/sider.js +1 -1
- package/dist/esm/components/formEditor/components/switch.js +1 -1
- package/dist/esm/components/formEditor/components/time.js +1 -1
- package/dist/esm/components/formEditor/components/treeSelect.js +1 -1
- package/dist/esm/components/formEditor/editor.js +1 -1
- package/dist/esm/components/icon/icon.js +1 -1
- package/dist/esm/components/layout/list.js +1 -1
- package/dist/esm/components/layout/table.js +1 -1
- package/dist/esm/components/layout/tools.js +1 -1
- package/dist/esm/components/level/level.js +1 -1
- package/dist/esm/components/posterEditor/pages/RightPanel.js +1 -1
- package/dist/esm/components/posterEditor/posterEditor.js +1 -1
- package/dist/esm/components/schemaEditor/schemaEditor.js +1 -1
- package/dist/esm/components/spec/spec.js +1 -1
- package/dist/esm/components/spec/specEditor.js +1 -1
- package/dist/esm/components/table/table.js +1 -1
- package/dist/esm/components/textImageEditor/textImageEditor.js +1 -1
- package/dist/esm/components/upload/file.js +1 -1
- package/dist/esm/components/upload/image.js +82 -65
- package/dist/esm/components/upload/manage/item.js +1 -1
- package/dist/esm/components/upload/manager.js +1 -1
- package/dist/esm/components/upload/video.js +1 -1
- package/dist/esm/pages/layout/page.js +1 -1
- package/dist/esm/pages/menu/button.js +1 -1
- package/dist/esm/pages/menu/menuApp.js +21 -21
- package/dist/esm/pages/menu/menuMain.js +5 -5
- package/dist/esm/pages/menu/mobile.js +1 -1
- package/dist/esm/pages/menu/notice.js +12 -12
- package/dist/esm/theme/uno.css.js +3 -0
- package/package.json +3 -3
|
@@ -46,8 +46,8 @@ import "unocss/preset-wind4";
|
|
|
46
46
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
47
47
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
48
48
|
import "vee-validate";
|
|
49
|
-
import "vue-command-palette";
|
|
50
49
|
import "@duxweb/dvha-naiveui";
|
|
50
|
+
import "vue-command-palette";
|
|
51
51
|
import "../../pages/page404.js";
|
|
52
52
|
import "vue-draggable-plus";
|
|
53
53
|
import "short-unique-id";
|
|
@@ -45,8 +45,8 @@ import "unocss/preset-wind4";
|
|
|
45
45
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
46
46
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
47
47
|
import "vee-validate";
|
|
48
|
-
import "vue-command-palette";
|
|
49
48
|
import "@duxweb/dvha-naiveui";
|
|
49
|
+
import "vue-command-palette";
|
|
50
50
|
import "../../pages/page404.js";
|
|
51
51
|
import "vue-draggable-plus";
|
|
52
52
|
import "short-unique-id";
|
|
@@ -46,8 +46,8 @@ import "unocss/preset-wind4";
|
|
|
46
46
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
47
47
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
48
48
|
import "vee-validate";
|
|
49
|
-
import "vue-command-palette";
|
|
50
49
|
import "@duxweb/dvha-naiveui";
|
|
50
|
+
import "vue-command-palette";
|
|
51
51
|
import "../../pages/page404.js";
|
|
52
52
|
import "short-unique-id";
|
|
53
53
|
import "aieditor";
|
|
@@ -45,8 +45,8 @@ import "unocss/preset-wind4";
|
|
|
45
45
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
46
46
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
47
47
|
import "vee-validate";
|
|
48
|
-
import "vue-command-palette";
|
|
49
48
|
import "@duxweb/dvha-naiveui";
|
|
49
|
+
import "vue-command-palette";
|
|
50
50
|
import "../../pages/page404.js";
|
|
51
51
|
import "vue-draggable-plus";
|
|
52
52
|
import "short-unique-id";
|
|
@@ -47,8 +47,8 @@ import "unocss/preset-wind4";
|
|
|
47
47
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
48
48
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
49
49
|
import "vee-validate";
|
|
50
|
-
import "vue-command-palette";
|
|
51
50
|
import "@duxweb/dvha-naiveui";
|
|
51
|
+
import "vue-command-palette";
|
|
52
52
|
import "../../pages/page404.js";
|
|
53
53
|
import "aieditor";
|
|
54
54
|
import { useUploadConfig as K } from "../upload/config.js";
|
|
@@ -46,8 +46,8 @@ import "unocss/preset-wind4";
|
|
|
46
46
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
47
47
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
48
48
|
import "vee-validate";
|
|
49
|
-
import "vue-command-palette";
|
|
50
49
|
import "@duxweb/dvha-naiveui";
|
|
50
|
+
import "vue-command-palette";
|
|
51
51
|
import "../../pages/page404.js";
|
|
52
52
|
import "vue-draggable-plus";
|
|
53
53
|
import "short-unique-id";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useVModel as
|
|
4
|
-
import
|
|
5
|
-
import { useMessage as
|
|
1
|
+
import { defineComponent as U, computed as n, watch as g, createVNode as r } from "vue";
|
|
2
|
+
import { useI18n as I, useUpload as V } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as A } from "@vueuse/core";
|
|
4
|
+
import j from "clsx";
|
|
5
|
+
import { useMessage as B, NImage as D, NProgress as h, NButton as v } from "naive-ui";
|
|
6
6
|
import { VueDraggable as M } from "vue-draggable-plus";
|
|
7
7
|
import "vue-router";
|
|
8
8
|
import "@overlastic/vue";
|
|
@@ -45,17 +45,17 @@ import "unocss/preset-wind4";
|
|
|
45
45
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
46
46
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
47
47
|
import "vee-validate";
|
|
48
|
-
import "vue-command-palette";
|
|
49
48
|
import "@duxweb/dvha-naiveui";
|
|
49
|
+
import "vue-command-palette";
|
|
50
50
|
import "../../pages/page404.js";
|
|
51
51
|
import "short-unique-id";
|
|
52
52
|
import "aieditor";
|
|
53
|
-
import { useUploadConfig as
|
|
53
|
+
import { useUploadConfig as O } from "./config.js";
|
|
54
54
|
import "@vue-flow/core";
|
|
55
55
|
import "lodash-es/cloneDeep";
|
|
56
56
|
import "@vue-flow/background";
|
|
57
57
|
/* empty css */
|
|
58
|
-
import { useModal as
|
|
58
|
+
import { useModal as L } from "../../hooks/modal.js";
|
|
59
59
|
import "mime";
|
|
60
60
|
import "@iconify-json/tabler/icons.json";
|
|
61
61
|
import "../posterEditor/elements/index.js";
|
|
@@ -65,7 +65,7 @@ import "dayjs";
|
|
|
65
65
|
import { useImagePreview as q } from "../../hooks/image.js";
|
|
66
66
|
import "@tanstack/vue-query";
|
|
67
67
|
import "pinia";
|
|
68
|
-
const $e = /* @__PURE__ */
|
|
68
|
+
const $e = /* @__PURE__ */ U({
|
|
69
69
|
name: "DuxImageUpload",
|
|
70
70
|
props: {
|
|
71
71
|
path: {
|
|
@@ -97,39 +97,40 @@ const $e = /* @__PURE__ */ k({
|
|
|
97
97
|
method: String
|
|
98
98
|
},
|
|
99
99
|
setup(t, {
|
|
100
|
-
emit:
|
|
100
|
+
emit: f
|
|
101
101
|
}) {
|
|
102
|
-
const
|
|
102
|
+
const s = A(t, "value", f, {
|
|
103
103
|
passive: !0,
|
|
104
104
|
deep: !0,
|
|
105
105
|
defaultValue: t.defaultValue
|
|
106
|
-
}),
|
|
107
|
-
t:
|
|
108
|
-
} =
|
|
106
|
+
}), x = B(), b = q(), {
|
|
107
|
+
t: u
|
|
108
|
+
} = I(), l = {
|
|
109
109
|
container: "flex gap-2",
|
|
110
110
|
imageItem: "size-80px rounded border border-muted relative group draggable flex items-center",
|
|
111
111
|
imageOverlay: "z-1 size-full inset-0 absolute flex items-center justify-center bg-default/80 transition-all opacity-0 group-hover:opacity-100 rounded",
|
|
112
|
+
statusOverlay: "z-2 size-full inset-0 absolute flex flex-col items-center justify-center rounded bg-default/65 pointer-events-none",
|
|
112
113
|
uploadArea: "relative size-80px text-sm rounded flex flex-col border border-dashed bg-elevated border-muted dark:border-accented hover:bg-accented/50 hover:border-accented dark:hover:bg-accented/50 dark:hover:border-accented cursor-pointer",
|
|
113
114
|
uploadContent: "flex-1 flex flex-col justify-center items-center gap-1 relative",
|
|
114
115
|
progressContainer: "size-80px flex items-center justify-center rounded",
|
|
115
116
|
progressBar: "absolute left-2 right-2 bottom-2"
|
|
116
|
-
},
|
|
117
|
+
}, y = n(() => t.maxSize), {
|
|
117
118
|
uploadPath: d,
|
|
118
|
-
managePath:
|
|
119
|
+
managePath: z,
|
|
119
120
|
driver: F,
|
|
120
121
|
method: p
|
|
121
|
-
} =
|
|
122
|
+
} = O({
|
|
122
123
|
driver: t?.driver,
|
|
123
124
|
signPath: t?.signPath,
|
|
124
125
|
signCallback: t?.signCallback,
|
|
125
126
|
uploadPath: t?.path,
|
|
126
127
|
managePath: t?.managePath,
|
|
127
128
|
method: t?.method
|
|
128
|
-
}),
|
|
129
|
+
}), a = V({
|
|
129
130
|
path: d.value,
|
|
130
131
|
multiple: t.multiple,
|
|
131
132
|
maxFileCount: t.maxNum,
|
|
132
|
-
maxFileSize:
|
|
133
|
+
maxFileSize: y.value * 1024 * 1024,
|
|
133
134
|
autoUpload: !0,
|
|
134
135
|
accept: "image/*",
|
|
135
136
|
params: t.manager ? {
|
|
@@ -137,76 +138,92 @@ const $e = /* @__PURE__ */ k({
|
|
|
137
138
|
} : void 0,
|
|
138
139
|
method: p.value,
|
|
139
140
|
onError: (e) => {
|
|
140
|
-
|
|
141
|
+
x.error(e.message || u("components.upload.error"));
|
|
141
142
|
},
|
|
142
143
|
driver: F.value
|
|
143
144
|
});
|
|
144
|
-
g(
|
|
145
|
-
const o = t.multiple ? e?.map((
|
|
146
|
-
|
|
145
|
+
g(a.dataFiles, (e) => {
|
|
146
|
+
const o = t.multiple ? e?.map((i) => i.url) : e?.[0]?.url;
|
|
147
|
+
s.value = o, t.onUpdateValue?.(o);
|
|
147
148
|
});
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
},
|
|
151
|
-
return g(
|
|
149
|
+
const P = n(() => a.progress.value.totalPercent), C = n(() => a.isUploading.value || a.uploadFiles.value.some((e) => e?.status === "uploading")), S = async () => {
|
|
150
|
+
a.open();
|
|
151
|
+
}, N = n(() => t.multiple ? t.maxNum && a.uploadFiles.value.length >= t.maxNum : !0), k = n(() => a.dataFiles.value?.map((e) => e.url)), w = L();
|
|
152
|
+
return g(s, (e) => {
|
|
152
153
|
if (!e || !(Array.isArray(e) ? e.length : String(e).length)) return;
|
|
153
|
-
const o = typeof e == "string" ? [e] : Array.isArray(e) ? e : [],
|
|
154
|
-
c.length &&
|
|
154
|
+
const o = typeof e == "string" ? [e] : Array.isArray(e) ? e : [], i = (a.dataFiles.value || []).map((m) => m.url).filter(Boolean), c = o.filter((m) => !i.includes(m));
|
|
155
|
+
c.length && a.addDataFiles(c.map((m) => ({
|
|
155
156
|
url: m
|
|
156
157
|
})));
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
}, {
|
|
159
|
+
immediate: !0,
|
|
160
|
+
deep: !0
|
|
161
|
+
}), () => r("div", null, [r(M, {
|
|
162
|
+
modelValue: a.uploadFiles.value,
|
|
163
|
+
"onUpdate:modelValue": (e) => a.uploadFiles.value = e,
|
|
164
|
+
class: l.container,
|
|
161
165
|
draggable: ".draggable"
|
|
162
166
|
}, {
|
|
163
|
-
default: () => [
|
|
164
|
-
const
|
|
165
|
-
return
|
|
167
|
+
default: () => [a.uploadFiles.value?.map((e, o) => {
|
|
168
|
+
const i = e.url || URL.createObjectURL(e.file);
|
|
169
|
+
return r("div", {
|
|
166
170
|
key: o,
|
|
167
|
-
class:
|
|
168
|
-
}, [
|
|
171
|
+
class: j(l.imageItem)
|
|
172
|
+
}, [r(D, {
|
|
169
173
|
class: "z-0 rounded",
|
|
170
174
|
objectFit: "scale-down",
|
|
171
175
|
width: 78,
|
|
172
176
|
height: 78,
|
|
173
177
|
previewDisabled: !0,
|
|
174
|
-
src:
|
|
175
|
-
}, null),
|
|
176
|
-
class:
|
|
177
|
-
}, [e.status === "
|
|
178
|
+
src: i
|
|
179
|
+
}, null), e.status !== "success" && e.status !== "cancelled" && r("div", {
|
|
180
|
+
class: l.statusOverlay
|
|
181
|
+
}, [e.status === "error" ? r("div", {
|
|
182
|
+
class: "i-tabler:alert-circle size-5 text-error"
|
|
183
|
+
}, null) : r(h, {
|
|
184
|
+
type: "circle",
|
|
185
|
+
strokeWidth: 8,
|
|
186
|
+
showIndicator: !1,
|
|
187
|
+
percentage: Math.max(0, Math.min(100, Number(e.progress?.percent || 0))),
|
|
188
|
+
style: {
|
|
189
|
+
width: "34px",
|
|
190
|
+
height: "34px"
|
|
191
|
+
}
|
|
192
|
+
}, null)]), r("div", {
|
|
193
|
+
class: l.imageOverlay
|
|
194
|
+
}, [e.status === "success" && r(v, {
|
|
178
195
|
quaternary: !0,
|
|
179
196
|
circle: !0,
|
|
180
197
|
size: "small",
|
|
181
|
-
renderIcon: () =>
|
|
198
|
+
renderIcon: () => r("div", {
|
|
182
199
|
class: "n-icon i-tabler:eye"
|
|
183
200
|
}, null),
|
|
184
|
-
onClick: () => b.show(
|
|
185
|
-
}, null),
|
|
201
|
+
onClick: () => b.show(k.value, o)
|
|
202
|
+
}, null), r(v, {
|
|
186
203
|
quaternary: !0,
|
|
187
204
|
circle: !0,
|
|
188
205
|
size: "small",
|
|
189
|
-
renderIcon: () =>
|
|
206
|
+
renderIcon: () => r("div", {
|
|
190
207
|
class: "n-icon i-tabler:trash"
|
|
191
208
|
}, null),
|
|
192
209
|
onClick: () => {
|
|
193
|
-
|
|
210
|
+
a.removeFiles([e.id]);
|
|
194
211
|
}
|
|
195
212
|
}, null)])]);
|
|
196
|
-
}), (
|
|
197
|
-
class:
|
|
213
|
+
}), (a.uploadFiles.value.length === 0 || !N.value) && r("div", {
|
|
214
|
+
class: l.uploadArea,
|
|
198
215
|
onClick: () => {
|
|
199
|
-
|
|
216
|
+
S();
|
|
200
217
|
}
|
|
201
|
-
}, [t.manager &&
|
|
218
|
+
}, [t.manager && r("div", {
|
|
202
219
|
class: " py-1 text-xs bg-muted border-b border-dashed border-accented flex items-center justify-center",
|
|
203
220
|
onClick: (e) => {
|
|
204
|
-
e.stopPropagation(),
|
|
205
|
-
title:
|
|
221
|
+
e.stopPropagation(), w.show({
|
|
222
|
+
title: u("components.upload.title"),
|
|
206
223
|
width: "800px",
|
|
207
224
|
component: () => import("./manager.js"),
|
|
208
225
|
componentProps: {
|
|
209
|
-
path:
|
|
226
|
+
path: z.value,
|
|
210
227
|
type: "image",
|
|
211
228
|
multiple: t.multiple,
|
|
212
229
|
uploadParams: {
|
|
@@ -218,23 +235,23 @@ const $e = /* @__PURE__ */ k({
|
|
|
218
235
|
}
|
|
219
236
|
}
|
|
220
237
|
}).then((o) => {
|
|
221
|
-
|
|
238
|
+
a.addDataFiles(o);
|
|
222
239
|
});
|
|
223
240
|
}
|
|
224
|
-
}, [
|
|
241
|
+
}, [r("div", {
|
|
225
242
|
class: "i-tabler:folder size-4"
|
|
226
|
-
}, null)]),
|
|
227
|
-
class:
|
|
228
|
-
}, [
|
|
229
|
-
class:
|
|
230
|
-
}, [
|
|
231
|
-
class:
|
|
232
|
-
}, [
|
|
243
|
+
}, null)]), r("div", {
|
|
244
|
+
class: l.uploadContent
|
|
245
|
+
}, [C.value ? r("div", {
|
|
246
|
+
class: l.progressContainer
|
|
247
|
+
}, [r("div", {
|
|
248
|
+
class: l.progressBar
|
|
249
|
+
}, [r(h, {
|
|
233
250
|
type: "line",
|
|
234
|
-
percentage:
|
|
251
|
+
percentage: P.value,
|
|
235
252
|
showIndicator: !1,
|
|
236
253
|
height: 4
|
|
237
|
-
}, null)])]) :
|
|
254
|
+
}, null)])]) : r("div", {
|
|
238
255
|
class: "i-tabler:plus size-4"
|
|
239
256
|
}, null)])])]
|
|
240
257
|
})]);
|
|
@@ -45,8 +45,8 @@ import "unocss/preset-wind4";
|
|
|
45
45
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
46
46
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
47
47
|
import "vee-validate";
|
|
48
|
-
import "vue-command-palette";
|
|
49
48
|
import "@duxweb/dvha-naiveui";
|
|
49
|
+
import "vue-command-palette";
|
|
50
50
|
import "../../../pages/page404.js";
|
|
51
51
|
import "vue-draggable-plus";
|
|
52
52
|
import "short-unique-id";
|
|
@@ -46,8 +46,8 @@ import "unocss/preset-wind4";
|
|
|
46
46
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
47
47
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
48
48
|
import "vee-validate";
|
|
49
|
-
import "vue-command-palette";
|
|
50
49
|
import "@duxweb/dvha-naiveui";
|
|
50
|
+
import "vue-command-palette";
|
|
51
51
|
import "../../pages/page404.js";
|
|
52
52
|
import "vue-draggable-plus";
|
|
53
53
|
import "short-unique-id";
|
|
@@ -46,8 +46,8 @@ import "unocss/preset-wind4";
|
|
|
46
46
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
47
47
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
48
48
|
import "vee-validate";
|
|
49
|
-
import "vue-command-palette";
|
|
50
49
|
import "@duxweb/dvha-naiveui";
|
|
50
|
+
import "vue-command-palette";
|
|
51
51
|
import "../../pages/page404.js";
|
|
52
52
|
import "short-unique-id";
|
|
53
53
|
import "aieditor";
|
|
@@ -45,9 +45,9 @@ import "@vee-validate/i18n/dist/locale/en.json";
|
|
|
45
45
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
46
46
|
import "vee-validate";
|
|
47
47
|
import x from "../menu/avatar.js";
|
|
48
|
+
import { DuxPageTab as v } from "./tab.js";
|
|
48
49
|
import "vue-command-palette";
|
|
49
50
|
import "@duxweb/dvha-naiveui";
|
|
50
|
-
import { DuxPageTab as v } from "./tab.js";
|
|
51
51
|
import "../page404.js";
|
|
52
52
|
import "vue-draggable-plus";
|
|
53
53
|
import "short-unique-id";
|
|
@@ -44,8 +44,8 @@ import "unocss/preset-wind4";
|
|
|
44
44
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
45
45
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
46
46
|
import "vee-validate";
|
|
47
|
-
import "vue-command-palette";
|
|
48
47
|
import "@duxweb/dvha-naiveui";
|
|
48
|
+
import "vue-command-palette";
|
|
49
49
|
import "../page404.js";
|
|
50
50
|
import "vue-draggable-plus";
|
|
51
51
|
import "short-unique-id";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { defineComponent as C, onMounted as
|
|
2
|
-
import { useManage as
|
|
1
|
+
import { defineComponent as C, onMounted as N, computed as u, createVNode as e, Transition as z, createTextVNode as m, h as c } from "vue";
|
|
2
|
+
import { useManage as D, useI18n as A, useMenu as T, DuxLogoIcon as I } from "@duxweb/dvha-core";
|
|
3
3
|
import { cloneDeep as d } from "lodash-es";
|
|
4
4
|
import { NScrollbar as f, NTooltip as L, NButton as V, NTag as v, NMenu as j } from "naive-ui";
|
|
5
5
|
import { useRouter as B, RouterLink as F } from "vue-router";
|
|
6
|
-
import O from "./avatar.js";
|
|
7
6
|
import "@overlastic/vue";
|
|
8
7
|
import "@vueuse/core";
|
|
9
8
|
import "clsx";
|
|
@@ -45,7 +44,11 @@ import "unocss/preset-wind4";
|
|
|
45
44
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
46
45
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
47
46
|
import "vee-validate";
|
|
47
|
+
import O from "./avatar.js";
|
|
48
48
|
import "@duxweb/dvha-naiveui";
|
|
49
|
+
import "vue-command-palette";
|
|
50
|
+
import R from "./dark.js";
|
|
51
|
+
import S from "./notice.js";
|
|
49
52
|
import "../page404.js";
|
|
50
53
|
import "vue-draggable-plus";
|
|
51
54
|
import "short-unique-id";
|
|
@@ -61,10 +64,7 @@ import "fabric";
|
|
|
61
64
|
import "../../components/schemaEditor/schemaEditor.js";
|
|
62
65
|
import "dayjs";
|
|
63
66
|
import "@tanstack/vue-query";
|
|
64
|
-
import { useUI as
|
|
65
|
-
import "vue-command-palette";
|
|
66
|
-
import S from "./dark.js";
|
|
67
|
-
import U from "./notice.js";
|
|
67
|
+
import { useUI as U } from "../../hooks/ui.js";
|
|
68
68
|
const Ze = /* @__PURE__ */ C({
|
|
69
69
|
name: "DuxMenuApp",
|
|
70
70
|
props: {
|
|
@@ -75,13 +75,13 @@ const Ze = /* @__PURE__ */ C({
|
|
|
75
75
|
},
|
|
76
76
|
setup() {
|
|
77
77
|
const {
|
|
78
|
-
setCmdVisible:
|
|
79
|
-
setMenuCollapsed:
|
|
80
|
-
} =
|
|
78
|
+
setCmdVisible: x,
|
|
79
|
+
setMenuCollapsed: h
|
|
80
|
+
} = U(), {
|
|
81
81
|
config: l
|
|
82
|
-
} =
|
|
82
|
+
} = D(), {
|
|
83
83
|
t: g
|
|
84
|
-
} =
|
|
84
|
+
} = A(), i = B(), {
|
|
85
85
|
mainMenu: b,
|
|
86
86
|
subMenu: y,
|
|
87
87
|
appActive: n,
|
|
@@ -90,8 +90,8 @@ const Ze = /* @__PURE__ */ C({
|
|
|
90
90
|
} = T({
|
|
91
91
|
doubleMenu: !0
|
|
92
92
|
});
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
N(() => {
|
|
94
|
+
h(!1);
|
|
95
95
|
});
|
|
96
96
|
const a = (t) => t.map((r) => {
|
|
97
97
|
const o = {
|
|
@@ -110,7 +110,7 @@ const Ze = /* @__PURE__ */ C({
|
|
|
110
110
|
}) : r.label
|
|
111
111
|
};
|
|
112
112
|
return o.children && o.children.length > 0 && (o.children = a(o.children)), o;
|
|
113
|
-
}),
|
|
113
|
+
}), M = u(() => a(d(b.value))), w = u(() => a(d(y.value)));
|
|
114
114
|
return () => e("div", {
|
|
115
115
|
class: "flex h-screen gap-2 pr-2"
|
|
116
116
|
}, [e("div", {
|
|
@@ -132,7 +132,7 @@ const Ze = /* @__PURE__ */ C({
|
|
|
132
132
|
}, [e(f, null, {
|
|
133
133
|
default: () => [e("div", {
|
|
134
134
|
class: "flex flex-col px-2 gap-2"
|
|
135
|
-
}, [
|
|
135
|
+
}, [M.value.map((t, p) => e("div", {
|
|
136
136
|
key: p,
|
|
137
137
|
class: ["flex flex-col gap-1 justify-center items-center py-1.5 cursor-pointer rounded transition-all", t.key === n.value ? "bg-primary/50 text-primary-200" : "text-white/60 hover:text-white"],
|
|
138
138
|
onClick: () => {
|
|
@@ -168,11 +168,11 @@ const Ze = /* @__PURE__ */ C({
|
|
|
168
168
|
class: `${t.icon} size-5`
|
|
169
169
|
}, null)])
|
|
170
170
|
})
|
|
171
|
-
})), l.notice?.status && e(
|
|
171
|
+
})), l.notice?.status && e(S, {
|
|
172
172
|
collapsed: !0
|
|
173
|
-
}, null), e(
|
|
173
|
+
}, null), e(R, null, null), e(O, {
|
|
174
174
|
collapsed: !0
|
|
175
|
-
}, null)])])]), e(
|
|
175
|
+
}, null)])])]), e(z, {
|
|
176
176
|
name: "submenu-slide",
|
|
177
177
|
enterActiveClass: "transition-all duration-150 ease-out",
|
|
178
178
|
enterFromClass: "opacity-0 translate-x-[-50%]",
|
|
@@ -187,7 +187,7 @@ const Ze = /* @__PURE__ */ C({
|
|
|
187
187
|
class: "py-2 flex-none"
|
|
188
188
|
}, [e("div", {
|
|
189
189
|
class: "rounded-md relative py-2 px-3 bg-white dark:bg-elevated shadow-xs hover:shadow flex items-center gap-2 cursor-pointer transition-all",
|
|
190
|
-
onClick: () =>
|
|
190
|
+
onClick: () => x(!0)
|
|
191
191
|
}, [e("div", {
|
|
192
192
|
class: "i-tabler:search size-4 icon-gradient"
|
|
193
193
|
}, null), e("div", {
|
|
@@ -213,7 +213,7 @@ const Ze = /* @__PURE__ */ C({
|
|
|
213
213
|
rootIndent: 20,
|
|
214
214
|
indent: 15,
|
|
215
215
|
class: "app-menu",
|
|
216
|
-
options:
|
|
216
|
+
options: w.value,
|
|
217
217
|
value: s.value,
|
|
218
218
|
collapsed: !1,
|
|
219
219
|
onUpdateValue: (t) => s.value = t
|
|
@@ -2,13 +2,9 @@ import { defineComponent as c, createVNode as o, createTextVNode as l } from "vu
|
|
|
2
2
|
import { useManage as f, useI18n as v, DuxLogoIcon as h } from "@duxweb/dvha-core";
|
|
3
3
|
import { useNaiveMenu as g } from "@duxweb/dvha-naiveui";
|
|
4
4
|
import { NTag as p, NScrollbar as x, NMenu as b } from "naive-ui";
|
|
5
|
-
import y from "./avatar.js";
|
|
6
|
-
import m from "./button.js";
|
|
7
|
-
import "@vueuse/core";
|
|
8
|
-
import "lodash-es";
|
|
9
|
-
import "vue-command-palette";
|
|
10
5
|
import "vue-router";
|
|
11
6
|
import "@overlastic/vue";
|
|
7
|
+
import "@vueuse/core";
|
|
12
8
|
import "clsx";
|
|
13
9
|
import "vue-echarts";
|
|
14
10
|
import "vue3-ace-editor";
|
|
@@ -24,6 +20,7 @@ import "ace-builds/src-noconflict/ext-language_tools";
|
|
|
24
20
|
import "ace-builds/src-noconflict/mode-snippets";
|
|
25
21
|
import "vue-cropper";
|
|
26
22
|
import "jinrishici";
|
|
23
|
+
import "lodash-es";
|
|
27
24
|
import "@vee-validate/i18n";
|
|
28
25
|
import "colorizr";
|
|
29
26
|
import "echarts";
|
|
@@ -48,6 +45,9 @@ import "unocss/preset-wind4";
|
|
|
48
45
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
49
46
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
50
47
|
import "vee-validate";
|
|
48
|
+
import y from "./avatar.js";
|
|
49
|
+
import m from "./button.js";
|
|
50
|
+
import "vue-command-palette";
|
|
51
51
|
import "../page404.js";
|
|
52
52
|
import "vue-draggable-plus";
|
|
53
53
|
import "short-unique-id";
|
|
@@ -44,9 +44,9 @@ import "unocss/preset-wind4";
|
|
|
44
44
|
import "@vee-validate/i18n/dist/locale/en.json";
|
|
45
45
|
import "@vee-validate/i18n/dist/locale/zh_CN.json";
|
|
46
46
|
import "vee-validate";
|
|
47
|
+
import "@duxweb/dvha-naiveui";
|
|
47
48
|
import "vue-command-palette";
|
|
48
49
|
import { DuxMenuMain as m } from "./menuMain.js";
|
|
49
|
-
import "@duxweb/dvha-naiveui";
|
|
50
50
|
import "../page404.js";
|
|
51
51
|
import "vue-draggable-plus";
|
|
52
52
|
import "short-unique-id";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as k, computed as
|
|
2
|
-
import { useI18n as z, useManage as B, useList as
|
|
3
|
-
import { NPopover as
|
|
1
|
+
import { defineComponent as k, computed as u, ref as C, createVNode as t, Fragment as F, isVNode as S } from "vue";
|
|
2
|
+
import { useI18n as z, useManage as B, useList as M, useCustomMutation as R } from "@duxweb/dvha-core";
|
|
3
|
+
import { NPopover as D, NButton as d, NSpin as _, NTooltip as j, NBadge as A } from "naive-ui";
|
|
4
4
|
import { useRouter as L } from "vue-router";
|
|
5
5
|
import { DuxCard as O } from "../../components/card/card.js";
|
|
6
6
|
import "@vueuse/core";
|
|
@@ -85,7 +85,7 @@ const Xt = /* @__PURE__ */ k({
|
|
|
85
85
|
data: f,
|
|
86
86
|
isLoading: v,
|
|
87
87
|
refetch: h
|
|
88
|
-
} =
|
|
88
|
+
} = M({
|
|
89
89
|
path: o.notice?.path || "notice",
|
|
90
90
|
pagination: {
|
|
91
91
|
page: 1,
|
|
@@ -93,13 +93,13 @@ const Xt = /* @__PURE__ */ k({
|
|
|
93
93
|
}
|
|
94
94
|
}), {
|
|
95
95
|
mutate: p
|
|
96
|
-
} =
|
|
96
|
+
} = R({
|
|
97
97
|
path: `${o.notice?.path || "notice"}`,
|
|
98
98
|
method: "POST",
|
|
99
99
|
onSuccess: () => {
|
|
100
100
|
h();
|
|
101
101
|
}
|
|
102
|
-
}), l =
|
|
102
|
+
}), l = u(() => f.value?.data || []), s = u(() => l.value.some((e) => !e[o.notice?.readField || "read"])), i = C(!1), g = (e) => {
|
|
103
103
|
p({
|
|
104
104
|
payload: {
|
|
105
105
|
type: "read",
|
|
@@ -113,7 +113,7 @@ const Xt = /* @__PURE__ */ k({
|
|
|
113
113
|
}
|
|
114
114
|
}), i.value = !1;
|
|
115
115
|
};
|
|
116
|
-
return () => t(
|
|
116
|
+
return () => t(D, {
|
|
117
117
|
trigger: "click",
|
|
118
118
|
arrowClass: "ml-2.5",
|
|
119
119
|
placement: "bottom-start",
|
|
@@ -122,16 +122,16 @@ const Xt = /* @__PURE__ */ k({
|
|
|
122
122
|
show: i.value,
|
|
123
123
|
onClickoutside: () => i.value = !1
|
|
124
124
|
}, {
|
|
125
|
-
trigger: () => t(
|
|
125
|
+
trigger: () => t(j, {
|
|
126
126
|
trigger: "hover",
|
|
127
127
|
placement: "right"
|
|
128
128
|
}, {
|
|
129
129
|
default: () => r("components.menu.notice", "Notice"),
|
|
130
|
-
trigger: () => t(
|
|
130
|
+
trigger: () => t(d, {
|
|
131
131
|
onClick: () => i.value = !0,
|
|
132
132
|
quaternary: !0
|
|
133
133
|
}, {
|
|
134
|
-
icon: () => t(
|
|
134
|
+
icon: () => t(A, {
|
|
135
135
|
dot: s.value,
|
|
136
136
|
offset: [-8, 8]
|
|
137
137
|
}, {
|
|
@@ -150,7 +150,7 @@ const Xt = /* @__PURE__ */ k({
|
|
|
150
150
|
contentSize: "none",
|
|
151
151
|
title: r("components.menu.notice", "Notice")
|
|
152
152
|
}, {
|
|
153
|
-
default: () => t(F, null, [t(
|
|
153
|
+
default: () => t(F, null, [t(_, {
|
|
154
154
|
show: v.value
|
|
155
155
|
}, {
|
|
156
156
|
default: () => [l.value.length > 0 ? t("div", {
|
|
@@ -195,7 +195,7 @@ const Xt = /* @__PURE__ */ k({
|
|
|
195
195
|
}, [r("components.menu.viewAllNotices", "View all notices")])])]),
|
|
196
196
|
headerExtra: () => {
|
|
197
197
|
let e;
|
|
198
|
-
return t(
|
|
198
|
+
return t(d, {
|
|
199
199
|
size: "tiny",
|
|
200
200
|
quaternary: !0,
|
|
201
201
|
disabled: !s.value,
|
|
@@ -933,6 +933,7 @@ input:where([type='button'], [type='reset'], [type='submit']),
|
|
|
933
933
|
display: none !important;
|
|
934
934
|
}
|
|
935
935
|
/* layer: icons */
|
|
936
|
+
.i-tabler\\:alert-circle{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m9-4v4m0 4h.01'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}
|
|
936
937
|
.i-tabler\\:alert-triangle{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 9v4m-1.637-9.409L2.257 17.125a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636-2.87L13.637 3.59a1.914 1.914 0 0 0-3.274 0M12 16h.01'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}
|
|
937
938
|
.i-tabler\\:arrow-back-up{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='m9 14l-4-4l4-4'/%3E%3Cpath d='M5 10h11a4 4 0 1 1 0 8h-1'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}
|
|
938
939
|
.i-tabler\\:arrow-bar-to-down{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 20h16m-8-6V4m0 10l4-4m-4 4l-4-4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;width:1em;height:1em;}
|
|
@@ -1493,6 +1494,7 @@ input:where([type='button'], [type='reset'], [type='submit']),
|
|
|
1493
1494
|
.z-0{z-index:0;}
|
|
1494
1495
|
.z-1{z-index:1;}
|
|
1495
1496
|
.z-10{z-index:10;}
|
|
1497
|
+
.z-2{z-index:2;}
|
|
1496
1498
|
.overflow-auto{overflow:auto;}
|
|
1497
1499
|
.overflow-hidden{overflow:hidden;}
|
|
1498
1500
|
.overflow-y-auto{overflow-y:auto;}
|
|
@@ -1533,6 +1535,7 @@ input:where([type='button'], [type='reset'], [type='submit']),
|
|
|
1533
1535
|
.hover\\:text-inverted\\/80:hover{color:color-mix(in oklab, rgb(var(--ui-text-inverted)) var(--un-text-opacity, 100%), transparent);--un-text-opacity:80%;}
|
|
1534
1536
|
.bg-default{background-color:color-mix(in oklab, rgb(var(--ui-bg)) var(--un-bg-opacity, 100%), transparent);--un-bg-opacity:100%;}
|
|
1535
1537
|
.hover\\:bg-default:hover{background-color:color-mix(in oklab, rgb(var(--ui-bg)) var(--un-bg-opacity, 100%), transparent);--un-bg-opacity:100%;}
|
|
1538
|
+
.bg-default\\/65{background-color:color-mix(in oklab, rgb(var(--ui-bg)) var(--un-bg-opacity, 100%), transparent);--un-bg-opacity:65%;}
|
|
1536
1539
|
.bg-default\\/80,
|
|
1537
1540
|
.dark .dark\\:bg-default\\/80{background-color:color-mix(in oklab, rgb(var(--ui-bg)) var(--un-bg-opacity, 100%), transparent);--un-bg-opacity:80%;}
|
|
1538
1541
|
.bg-muted,
|