@duxweb/dvha-pro 1.0.33 → 1.0.35

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.
Files changed (121) hide show
  1. package/dist/cjs/component.cjs +1 -1
  2. package/dist/cjs/components/chart/echart.cjs +1 -1
  3. package/dist/cjs/components/crop/imageCrop.cjs +1 -1
  4. package/dist/cjs/components/data/dynamicSelect.cjs +1 -1
  5. package/dist/cjs/components/data/selectModal.cjs +1 -1
  6. package/dist/cjs/components/designEditor/components/grid.cjs +1 -1
  7. package/dist/cjs/components/designEditor/editor/hook.cjs +1 -1
  8. package/dist/cjs/components/designEditor/editor.cjs +1 -1
  9. package/dist/cjs/components/form/pageForm.cjs +1 -1
  10. package/dist/cjs/components/form/pageTabForm.cjs +1 -1
  11. package/dist/cjs/components/form/settingForm.cjs +1 -1
  12. package/dist/cjs/components/formEditor/base/base.cjs +1 -1
  13. package/dist/cjs/components/formEditor/components/cascader.cjs +1 -1
  14. package/dist/cjs/components/formEditor/components/cascaderAsync.cjs +1 -1
  15. package/dist/cjs/components/formEditor/components/checkbox.cjs +1 -1
  16. package/dist/cjs/components/formEditor/components/color.cjs +1 -1
  17. package/dist/cjs/components/formEditor/components/date.cjs +1 -1
  18. package/dist/cjs/components/formEditor/components/dynamicInput.cjs +1 -1
  19. package/dist/cjs/components/formEditor/components/dynamicTags.cjs +1 -1
  20. package/dist/cjs/components/formEditor/components/editor.cjs +1 -1
  21. package/dist/cjs/components/formEditor/components/fileUpload.cjs +1 -0
  22. package/dist/cjs/components/formEditor/components/imageUpload.cjs +1 -0
  23. package/dist/cjs/components/formEditor/components/input.cjs +1 -1
  24. package/dist/cjs/components/formEditor/components/inputNumber.cjs +1 -1
  25. package/dist/cjs/components/formEditor/components/mentionAsync.cjs +1 -1
  26. package/dist/cjs/components/formEditor/components/radio.cjs +1 -1
  27. package/dist/cjs/components/formEditor/components/region.cjs +1 -1
  28. package/dist/cjs/components/formEditor/components/select.cjs +1 -1
  29. package/dist/cjs/components/formEditor/components/selectAsync.cjs +1 -1
  30. package/dist/cjs/components/formEditor/components/sider.cjs +1 -1
  31. package/dist/cjs/components/formEditor/components/switch.cjs +1 -1
  32. package/dist/cjs/components/formEditor/components/time.cjs +1 -1
  33. package/dist/cjs/components/formEditor/components/transferAsync.cjs +1 -1
  34. package/dist/cjs/components/formEditor/components/treeSelect.cjs +1 -1
  35. package/dist/cjs/components/formEditor/components/treeSelectAsync.cjs +1 -1
  36. package/dist/cjs/components/formEditor/editor.cjs +1 -1
  37. package/dist/cjs/components/formEditor/renderer.cjs +1 -1
  38. package/dist/cjs/components/icon/icon.cjs +1 -1
  39. package/dist/cjs/components/layout/list.cjs +1 -1
  40. package/dist/cjs/components/layout/table.cjs +1 -1
  41. package/dist/cjs/components/level/level.cjs +1 -1
  42. package/dist/cjs/components/table/table.cjs +1 -1
  43. package/dist/cjs/components/upload/config.cjs +1 -1
  44. package/dist/cjs/components/upload/file.cjs +1 -1
  45. package/dist/cjs/components/upload/image.cjs +1 -1
  46. package/dist/cjs/components/upload/manage/item.cjs +1 -1
  47. package/dist/cjs/components/upload/manager.cjs +1 -1
  48. package/dist/cjs/langs/en-US.json.cjs +1 -1
  49. package/dist/cjs/langs/zh-CN.json.cjs +1 -1
  50. package/dist/cjs/pages/authLayout.cjs +1 -1
  51. package/dist/cjs/pages/layout/page.cjs +1 -1
  52. package/dist/cjs/pages/menu/button.cjs +1 -1
  53. package/dist/cjs/pages/menu/cmd.cjs +1 -1
  54. package/dist/cjs/pages/menu/main.cjs +1 -1
  55. package/dist/cjs/pages/menu/mobile.cjs +1 -1
  56. package/dist/cjs/theme/uno.css.cjs +2 -1
  57. package/dist/esm/component.js +11 -11
  58. package/dist/esm/components/chart/echart.js +1 -1
  59. package/dist/esm/components/crop/imageCrop.js +1 -1
  60. package/dist/esm/components/data/dynamicSelect.js +1 -1
  61. package/dist/esm/components/data/selectModal.js +1 -1
  62. package/dist/esm/components/designEditor/components/grid.js +1 -1
  63. package/dist/esm/components/designEditor/editor/hook.js +17 -17
  64. package/dist/esm/components/designEditor/editor.js +6 -6
  65. package/dist/esm/components/form/pageForm.js +1 -1
  66. package/dist/esm/components/form/pageTabForm.js +1 -1
  67. package/dist/esm/components/form/settingForm.js +1 -1
  68. package/dist/esm/components/formEditor/base/base.js +1 -1
  69. package/dist/esm/components/formEditor/components/cascader.js +1 -1
  70. package/dist/esm/components/formEditor/components/cascaderAsync.js +1 -1
  71. package/dist/esm/components/formEditor/components/checkbox.js +1 -1
  72. package/dist/esm/components/formEditor/components/color.js +1 -1
  73. package/dist/esm/components/formEditor/components/date.js +1 -1
  74. package/dist/esm/components/formEditor/components/dynamicInput.js +1 -1
  75. package/dist/esm/components/formEditor/components/dynamicTags.js +1 -1
  76. package/dist/esm/components/formEditor/components/editor.js +1 -1
  77. package/dist/esm/components/formEditor/components/fileUpload.js +191 -0
  78. package/dist/esm/components/formEditor/components/imageUpload.js +182 -0
  79. package/dist/esm/components/formEditor/components/input.js +1 -1
  80. package/dist/esm/components/formEditor/components/inputNumber.js +1 -1
  81. package/dist/esm/components/formEditor/components/mentionAsync.js +1 -1
  82. package/dist/esm/components/formEditor/components/radio.js +1 -1
  83. package/dist/esm/components/formEditor/components/region.js +1 -1
  84. package/dist/esm/components/formEditor/components/select.js +1 -1
  85. package/dist/esm/components/formEditor/components/selectAsync.js +1 -1
  86. package/dist/esm/components/formEditor/components/sider.js +1 -1
  87. package/dist/esm/components/formEditor/components/switch.js +1 -1
  88. package/dist/esm/components/formEditor/components/time.js +1 -1
  89. package/dist/esm/components/formEditor/components/transferAsync.js +1 -1
  90. package/dist/esm/components/formEditor/components/treeSelect.js +1 -1
  91. package/dist/esm/components/formEditor/components/treeSelectAsync.js +1 -1
  92. package/dist/esm/components/formEditor/editor.js +26 -24
  93. package/dist/esm/components/formEditor/renderer.js +32 -30
  94. package/dist/esm/components/icon/icon.js +1 -1
  95. package/dist/esm/components/layout/list.js +1 -1
  96. package/dist/esm/components/layout/table.js +1 -1
  97. package/dist/esm/components/level/level.js +1 -1
  98. package/dist/esm/components/table/table.js +1 -1
  99. package/dist/esm/components/upload/config.js +13 -12
  100. package/dist/esm/components/upload/file.js +62 -57
  101. package/dist/esm/components/upload/image.js +51 -47
  102. package/dist/esm/components/upload/manage/item.js +3 -3
  103. package/dist/esm/components/upload/manager.js +92 -89
  104. package/dist/esm/langs/en-US.json.js +5 -5
  105. package/dist/esm/langs/zh-CN.json.js +6 -6
  106. package/dist/esm/pages/authLayout.js +1 -1
  107. package/dist/esm/pages/layout/page.js +1 -1
  108. package/dist/esm/pages/menu/button.js +1 -1
  109. package/dist/esm/pages/menu/cmd.js +1 -1
  110. package/dist/esm/pages/menu/main.js +1 -1
  111. package/dist/esm/pages/menu/mobile.js +1 -1
  112. package/dist/esm/theme/uno.css.js +2 -1
  113. package/dist/types/components/formEditor/components/fileUpload.d.ts +2 -0
  114. package/dist/types/components/formEditor/components/imageUpload.d.ts +2 -0
  115. package/dist/types/components/formEditor/components/index.d.ts +4 -2
  116. package/dist/types/components/upload/config.d.ts +4 -2
  117. package/dist/types/components/upload/file.d.ts +1 -0
  118. package/dist/types/components/upload/image.d.ts +2 -3
  119. package/dist/types/components/upload/manager.d.ts +1 -0
  120. package/dist/types/main.d.ts +1 -0
  121. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
- import { defineComponent as F, computed as l, createVNode as y } from "vue";
2
- import { useI18n as h, useJsonSchema as b } from "@duxweb/dvha-core";
3
- import { useVModel as g } from "@vueuse/core";
1
+ import { defineComponent as E, computed as c, createVNode as y } from "vue";
2
+ import { useI18n as h, useJsonSchema as g } from "@duxweb/dvha-core";
3
+ import { useVModel as b } from "@vueuse/core";
4
4
  import { duxFormEditorGrid as A } from "../designEditor/components/grid.js";
5
5
  import "clsx";
6
6
  import "lodash-es";
@@ -59,27 +59,29 @@ import { duxFormEditorCascader as S } from "./components/cascader.js";
59
59
  import { duxFormEditorCascaderAsync as v } from "./components/cascaderAsync.js";
60
60
  import { duxFormEditorCheckbox as j } from "./components/checkbox.js";
61
61
  import { duxFormEditorColor as D } from "./components/color.js";
62
- import { duxFormEditorDate as T } from "./components/date.js";
63
- import { duxFormEditorDynamicInput as C } from "./components/dynamicInput.js";
64
- import { duxFormEditorDynamicTags as I } from "./components/dynamicTags.js";
62
+ import { duxFormEditorDate as I } from "./components/date.js";
63
+ import { duxFormEditorDynamicInput as T } from "./components/dynamicInput.js";
64
+ import { duxFormEditorDynamicTags as C } from "./components/dynamicTags.js";
65
65
  import { duxFormEditorAIEditor as M } from "./components/editor.js";
66
- import { duxFormEditorInput as R } from "./components/input.js";
67
- import { duxFormEditorInputNumber as J } from "./components/inputNumber.js";
68
- import { duxFormEditorMentionAsync as N } from "./components/mentionAsync.js";
69
- import { duxFormEditorRadio as O } from "./components/radio.js";
70
- import { duxFormEditorRegion as V } from "./components/region.js";
71
- import { duxFormEditorSider as w } from "./components/sider.js";
72
- import { duxFormEditorSwitch as B } from "./components/switch.js";
73
- import { duxFormEditorTime as P } from "./components/time.js";
74
- import { duxFormEditorTransferAsync as k } from "./components/transferAsync.js";
75
- import { duxFormEditorTreeSelect as G } from "./components/treeSelect.js";
76
- import { duxFormEditorTreeSelectAsync as q } from "./components/treeSelectAsync.js";
77
- import { duxFormEditorSelect as z } from "./components/select.js";
78
- import { duxFormEditorSelectAsync as H } from "./components/selectAsync.js";
66
+ import { duxFormEditorFileUpload as R } from "./components/fileUpload.js";
67
+ import { duxFormEditorImageUpload as J } from "./components/imageUpload.js";
68
+ import { duxFormEditorInput as N } from "./components/input.js";
69
+ import { duxFormEditorInputNumber as O } from "./components/inputNumber.js";
70
+ import { duxFormEditorMentionAsync as V } from "./components/mentionAsync.js";
71
+ import { duxFormEditorRadio as w } from "./components/radio.js";
72
+ import { duxFormEditorRegion as B } from "./components/region.js";
73
+ import { duxFormEditorSelect as P } from "./components/select.js";
74
+ import { duxFormEditorSelectAsync as U } from "./components/selectAsync.js";
75
+ import { duxFormEditorSider as k } from "./components/sider.js";
76
+ import { duxFormEditorSwitch as G } from "./components/switch.js";
77
+ import { duxFormEditorTime as q } from "./components/time.js";
78
+ import { duxFormEditorTransferAsync as z } from "./components/transferAsync.js";
79
+ import { duxFormEditorTreeSelect as H } from "./components/treeSelect.js";
80
+ import { duxFormEditorTreeSelectAsync as K } from "./components/treeSelectAsync.js";
79
81
  import "@iconify-json/tabler/icons.json";
80
82
  import "../posterEditor/elements/index.js";
81
83
  import "fabric";
82
- const yo = /* @__PURE__ */ F({
84
+ const Ao = /* @__PURE__ */ E({
83
85
  name: "DuxFormRenderer",
84
86
  props: {
85
87
  data: {
@@ -108,12 +110,12 @@ const yo = /* @__PURE__ */ F({
108
110
  }) {
109
111
  const {
110
112
  t: r
111
- } = h(), s = l(() => {
112
- const t = [A(r), R(r), J(r), M(r), w(r), T(r), P(r), D(r), j(r), O(r), B(r), C(r), I(r), z(r), S(r), G(r), V(r), H(r), v(r), q(r), k(r), N(r)], m = /* @__PURE__ */ new Map();
113
+ } = h(), s = c(() => {
114
+ const t = [A(r), N(r), O(r), M(r), k(r), I(r), q(r), D(r), j(r), w(r), G(r), T(r), C(r), J(r), R(r), P(r), S(r), H(r), B(r), U(r), v(r), K(r), z(r), V(r)], m = /* @__PURE__ */ new Map();
113
115
  return t.forEach((o) => {
114
116
  m.set(o.name, o);
115
117
  }), m;
116
- }), d = g(i, "value", f, {
118
+ }), d = b(i, "value", f, {
117
119
  defaultValue: {},
118
120
  deep: !0
119
121
  }), e = (t, m = d.value) => t.length > 0 && Array.isArray(t[0]) ? t.flatMap((o) => Array.isArray(o) ? e(o, m) : []) : t.map((o) => {
@@ -135,12 +137,12 @@ const yo = /* @__PURE__ */ F({
135
137
  model: m,
136
138
  convertToJsonSchema: e
137
139
  });
138
- const c = {
140
+ const l = {
139
141
  tag: n,
140
142
  attrs: u.attr || {}
141
143
  };
142
- return o.children?.length && (c.children = e(o.children, m)), c;
143
- }), x = l(() => {
144
+ return o.children?.length && (l.children = e(o.children, m)), l;
145
+ }), x = c(() => {
144
146
  const t = e(i.data, d.value);
145
147
  return [{
146
148
  tag: "dux-form-layout",
@@ -150,16 +152,16 @@ const yo = /* @__PURE__ */ F({
150
152
  children: t
151
153
  }];
152
154
  }), {
153
- render: E
154
- } = b({
155
+ render: F
156
+ } = g({
155
157
  data: x,
156
158
  context: {
157
159
  form: d.value
158
160
  }
159
161
  });
160
- return () => y(E, null, null);
162
+ return () => y(F, null, null);
161
163
  }
162
164
  });
163
165
  export {
164
- yo as DuxFormRenderer
166
+ Ao as DuxFormRenderer
165
167
  };
@@ -51,10 +51,10 @@ import "../../pages/page404.js";
51
51
  import "short-unique-id";
52
52
  import "aieditor";
53
53
  import { useModal as c } from "../../hooks/modal.js";
54
+ import "mime";
54
55
  import "@iconify-json/tabler/icons.json";
55
56
  import "../posterEditor/elements/index.js";
56
57
  import "fabric";
57
- import "mime";
58
58
  import "dayjs";
59
59
  import "@tanstack/vue-query";
60
60
  import "pinia";
@@ -58,10 +58,10 @@ import { DuxDrawerPage as N } from "../drawer/drawerPage.js";
58
58
  import { DuxTableTools as ve } from "./tools.js";
59
59
  import "short-unique-id";
60
60
  import "aieditor";
61
+ import "mime";
61
62
  import "@iconify-json/tabler/icons.json";
62
63
  import "../posterEditor/elements/index.js";
63
64
  import "fabric";
64
- import "mime";
65
65
  import "dayjs";
66
66
  import "@tanstack/vue-query";
67
67
  import "pinia";
@@ -57,10 +57,10 @@ import { DuxDrawerPage as S } from "../drawer/drawerPage.js";
57
57
  import { DuxTableTools as ce } from "./tools.js";
58
58
  import "short-unique-id";
59
59
  import "aieditor";
60
+ import "mime";
60
61
  import "@iconify-json/tabler/icons.json";
61
62
  import "../posterEditor/elements/index.js";
62
63
  import "fabric";
63
- import "mime";
64
64
  import "dayjs";
65
65
  import "@tanstack/vue-query";
66
66
  import { useTable as me } from "../../hooks/table.js";
@@ -50,10 +50,10 @@ import "@duxweb/dvha-naiveui";
50
50
  import "../../pages/page404.js";
51
51
  import "short-unique-id";
52
52
  import "aieditor";
53
+ import "mime";
53
54
  import "@iconify-json/tabler/icons.json";
54
55
  import "../posterEditor/elements/index.js";
55
56
  import "fabric";
56
- import "mime";
57
57
  import "dayjs";
58
58
  import { useLevel as c } from "../../hooks/level.js";
59
59
  import "pinia";
@@ -51,10 +51,10 @@ import "@duxweb/dvha-naiveui";
51
51
  import "../../pages/page404.js";
52
52
  import "short-unique-id";
53
53
  import "aieditor";
54
+ import "mime";
54
55
  import "@iconify-json/tabler/icons.json";
55
56
  import "../posterEditor/elements/index.js";
56
57
  import "fabric";
57
- import "mime";
58
58
  import "dayjs";
59
59
  import "@tanstack/vue-query";
60
60
  import { useTable as y } from "../../hooks/table.js";
@@ -1,20 +1,21 @@
1
- import { useManage as u, createS3UploadDriver as d, createLocalUploadDriver as e } from "@duxweb/dvha-core";
2
- import { computed as r } from "vue";
3
- const p = (a) => {
4
- const t = u(), o = r(() => a?.uploadPath || t.config?.apiPath?.upload || "upload"), n = r(() => a?.managePath || t.config?.apiPath?.uploadManager || "uploadManager"), i = r(() => a?.driver === "s3" ? d({
5
- signPath: a?.signPath || t.config?.apiPath?.upload || o.value || "",
6
- signCallback: a?.signCallback || t.config?.upload?.signCallback || ((l) => ({
1
+ import { useManage as u, createS3UploadDriver as c, createLocalUploadDriver as g } from "@duxweb/dvha-core";
2
+ import { computed as t } from "vue";
3
+ function h(a) {
4
+ const o = u(), n = t(() => a?.uploadPath || o.config?.apiPath?.upload || "upload"), r = t(() => a?.managePath || o.config?.apiPath?.uploadManager || "uploadManager"), d = t(() => a?.driver || o.config?.upload?.driver || "local"), e = t(() => a?.method || o.config?.upload?.method || "POST"), i = t(() => d.value === "s3" ? c({
5
+ signPath: a?.signPath || o.config?.apiPath?.upload || n.value || "",
6
+ signCallback: a?.signCallback || o.config?.upload?.signCallback || ((l) => ({
7
7
  uploadUrl: l.data?.uploadUrl,
8
8
  url: l.data?.url,
9
9
  params: l.data?.params
10
10
  }))
11
- }) : e());
11
+ }) : g());
12
12
  return {
13
- uploadPath: o,
14
- managePath: n,
15
- driver: i
13
+ uploadPath: n,
14
+ managePath: r,
15
+ driver: i,
16
+ method: e
16
17
  };
17
- };
18
+ }
18
19
  export {
19
- p as useUploadConfig
20
+ h as useUploadConfig
20
21
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as M, ref as v, computed as s, watch as h, createVNode as o, Fragment as A, createTextVNode as U, isVNode as w } from "vue";
2
- import { useI18n as Z, useUpload as j } from "@duxweb/dvha-core";
3
- import { useVModel as O, useDropZone as B } from "@vueuse/core";
4
- import X from "mime";
5
- import { useMessage as E, NDataTable as L, NProgress as T, NButton as b } from "naive-ui";
1
+ import { defineComponent as A, ref as x, computed as s, watch as b, createVNode as o, Fragment as U, createTextVNode as w, isVNode as Z } from "vue";
2
+ import { useI18n as j, useUpload as O } from "@duxweb/dvha-core";
3
+ import { useVModel as B, useDropZone as X } from "@vueuse/core";
4
+ import E from "mime";
5
+ import { useMessage as L, NDataTable as T, NProgress as I, NButton as y } from "naive-ui";
6
6
  import "vue-router";
7
7
  import "@overlastic/vue";
8
- import { DuxMedia as I } from "../media/media.js";
8
+ import { DuxMedia as W } from "../media/media.js";
9
9
  import "vue-echarts";
10
10
  import "vue3-ace-editor";
11
11
  import "ace-builds/src-noconflict/mode-vue";
@@ -52,18 +52,18 @@ import "@duxweb/dvha-naiveui";
52
52
  import "../../pages/page404.js";
53
53
  import "short-unique-id";
54
54
  import "aieditor";
55
- import { useModal as W } from "../../hooks/modal.js";
55
+ import { useModal as G } from "../../hooks/modal.js";
56
+ import { useUploadConfig as _ } from "./config.js";
56
57
  import "@iconify-json/tabler/icons.json";
57
58
  import "../posterEditor/elements/index.js";
58
59
  import "fabric";
59
- import { useUploadConfig as G } from "./config.js";
60
60
  import "dayjs";
61
61
  import "@tanstack/vue-query";
62
62
  import "pinia";
63
- function y(t) {
64
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !w(t);
63
+ function F(t) {
64
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Z(t);
65
65
  }
66
- const m = {
66
+ const p = {
67
67
  "image/*": "JPG, PNG, GIF, BMP, WEBP",
68
68
  "video/*": "MP4, AVI, MOV, WMV, FLV",
69
69
  "audio/*": "MP3, WAV, AAC, FLAC",
@@ -94,7 +94,7 @@ const m = {
94
94
  empty: "flex items-center justify-center h-full text-muted",
95
95
  actions: "flex gap-2"
96
96
  }
97
- }, $e = /* @__PURE__ */ M({
97
+ }, et = /* @__PURE__ */ A({
98
98
  name: "DuxFileUpload",
99
99
  props: {
100
100
  path: {
@@ -121,59 +121,63 @@ const m = {
121
121
  accept: String,
122
122
  value: [String, Array],
123
123
  defaultValue: [String, Array],
124
- onUpdateValue: Function
124
+ onUpdateValue: Function,
125
+ method: String
125
126
  },
126
127
  setup(t, {
127
- emit: F
128
+ emit: P
128
129
  }) {
129
- const c = O(t, "value", F, {
130
+ const c = B(t, "value", P, {
130
131
  passive: !0,
131
132
  deep: !0,
132
133
  defaultValue: t.defaultValue
133
- }), P = E(), {
134
+ }), S = L(), {
134
135
  t: a
135
- } = Z(), d = v(), p = s(() => t.maxSize || 5), C = W(), {
136
+ } = j(), d = x(), m = s(() => t.maxSize || 5), C = G(), {
136
137
  uploadPath: u,
137
- managePath: S,
138
- driver: N
139
- } = G({
138
+ managePath: N,
139
+ driver: V,
140
+ method: f
141
+ } = _({
140
142
  driver: t?.driver,
141
143
  signPath: t?.signPath,
142
144
  signCallback: t?.signCallback,
143
145
  uploadPath: t?.path,
144
- managePath: t?.managePath
145
- }), n = j({
146
+ managePath: t?.managePath,
147
+ method: t?.method
148
+ }), n = O({
146
149
  path: u.value,
147
150
  multiple: t.multiple,
148
151
  maxFileCount: t.maxNum,
149
- maxFileSize: p.value * 1024 * 1024,
152
+ maxFileSize: m.value * 1024 * 1024,
150
153
  autoUpload: !0,
151
154
  accept: t.accept,
152
- onError: (e) => P.error(e.message || a("components.upload.error")),
153
- driver: N.value
155
+ onError: (e) => S.error(e.message || a("components.upload.error")),
156
+ driver: V.value,
157
+ method: f.value
154
158
  }), {
155
- isOverDropZone: f
156
- } = B(d, {
159
+ isOverDropZone: g
160
+ } = X(d, {
157
161
  onDrop: (e) => {
158
162
  e && e.length > 0 && n.addFiles(Array.from(e), "file");
159
163
  }
160
164
  });
161
- h(n.dataFiles, (e) => {
165
+ b(n.dataFiles, (e) => {
162
166
  const i = t.multiple ? e : e[0];
163
167
  c.value = i, t.onUpdateValue?.(i);
164
168
  });
165
- const g = s(() => t.accept ? t.accept.split(",").map((e) => {
169
+ const h = s(() => t.accept ? t.accept.split(",").map((e) => {
166
170
  const i = e.trim();
167
- if (m[i]) return m[i];
171
+ if (p[i]) return p[i];
168
172
  if (i.includes("*")) {
169
- const D = i.split("/")[0];
170
- return m[i] || a("common.fileExtension", {
171
- ext: D.toUpperCase()
173
+ const M = i.split("/")[0];
174
+ return p[i] || a("common.fileExtension", {
175
+ ext: M.toUpperCase()
172
176
  });
173
177
  }
174
- const l = X.getExtension(i);
178
+ const l = E.getExtension(i);
175
179
  return l ? l.toUpperCase() : i;
176
- }).filter(Boolean).join(", ") : ""), V = s(() => ({
180
+ }).filter(Boolean).join(", ") : ""), z = s(() => ({
177
181
  pending: o("div", {
178
182
  class: "text-info"
179
183
  }, [a("components.upload.status.pending")]),
@@ -186,11 +190,11 @@ const m = {
186
190
  error: o("div", {
187
191
  class: "text-error"
188
192
  }, [a("components.upload.status.error")])
189
- })), z = s(() => [r.dropZone.base, f.value ? r.dropZone.active : r.dropZone.hover]), k = s(() => [n.uploadFiles.value.length === 0 && "border-b border-muted"]), x = v(!1);
190
- return h(c, (e) => {
191
- if (!e || !e?.length || x.value)
193
+ })), k = s(() => [r.dropZone.base, g.value ? r.dropZone.active : r.dropZone.hover]), D = s(() => [n.uploadFiles.value.length === 0 && "border-b border-muted"]), v = x(!1);
194
+ return b(c, (e) => {
195
+ if (!e || !e?.length || v.value)
192
196
  return;
193
- x.value = !0;
197
+ v.value = !0;
194
198
  const i = Array.isArray(e) ? e : [e];
195
199
  n.addDataFiles(i);
196
200
  }, {
@@ -199,7 +203,7 @@ const m = {
199
203
  class: r.container
200
204
  }, [o("div", {
201
205
  ref: d,
202
- class: z.value,
206
+ class: k.value,
203
207
  onClick: () => n.open()
204
208
  }, [o("div", {
205
209
  class: r.content
@@ -211,13 +215,14 @@ const m = {
211
215
  width: 800,
212
216
  component: () => import("./manager.js"),
213
217
  componentProps: {
214
- path: S.value,
218
+ path: N.value,
215
219
  multiple: t.multiple,
216
220
  uploadParams: {
217
221
  path: u.value,
218
222
  accept: t.accept,
219
223
  maxNum: t.maxNum,
220
- maxSize: p.value
224
+ maxSize: m.value,
225
+ method: f.value
221
226
  }
222
227
  }
223
228
  }).then((i) => {
@@ -230,20 +235,20 @@ const m = {
230
235
  class: r.text.title
231
236
  }, [a("components.upload.desc")]), o("div", {
232
237
  class: r.text.desc
233
- }, [f.value ? o("span", {
238
+ }, [g.value ? o("span", {
234
239
  class: r.text.highlight
235
- }, [a("components.upload.dropHere")]) : o(A, null, [g.value ? a("components.upload.supportFormats", {
236
- formats: g.value
237
- }) : a("components.upload.allFormats"), U(","), " ", a("components.upload.maxSize", {
238
- size: p.value
239
- })])])])]), o(L, {
240
+ }, [a("components.upload.dropHere")]) : o(U, null, [h.value ? a("components.upload.supportFormats", {
241
+ formats: h.value
242
+ }) : a("components.upload.allFormats"), w(","), " ", a("components.upload.maxSize", {
243
+ size: m.value
244
+ })])])])]), o(T, {
240
245
  bordered: !1,
241
- class: k.value,
246
+ class: D.value,
242
247
  columns: [{
243
248
  key: "filename",
244
249
  title: a("components.upload.file.name"),
245
250
  minWidth: 200,
246
- render: (e) => o(I, {
251
+ render: (e) => o(W, {
247
252
  title: e.filename,
248
253
  desc: e.filetype
249
254
  }, null)
@@ -257,7 +262,7 @@ const m = {
257
262
  width: 120,
258
263
  render: (e) => e.status === "uploading" ? o("div", {
259
264
  class: "flex items-center"
260
- }, [o(T, {
265
+ }, [o(I, {
261
266
  type: "line",
262
267
  style: {
263
268
  width: "24px",
@@ -268,7 +273,7 @@ const m = {
268
273
  percentage: e.progress?.percent,
269
274
  showIndicator: !1,
270
275
  height: 14
271
- }, null)]) : V.value[e.status]
276
+ }, null)]) : z.value[e.status]
272
277
  }, {
273
278
  key: "actions",
274
279
  title: a("components.upload.actions"),
@@ -277,20 +282,20 @@ const m = {
277
282
  let i, l;
278
283
  return o("div", {
279
284
  class: r.table.actions
280
- }, [o(b, {
285
+ }, [o(y, {
281
286
  type: "warning",
282
287
  size: "small",
283
288
  text: !0,
284
289
  disabled: ["success", "error", "cancelled"].includes(e.status),
285
290
  onClick: () => n.cancelFiles([e.id])
286
- }, y(i = a("components.upload.cancel")) ? i : {
291
+ }, F(i = a("components.upload.cancel")) ? i : {
287
292
  default: () => [i]
288
- }), o(b, {
293
+ }), o(y, {
289
294
  type: "error",
290
295
  size: "small",
291
296
  text: !0,
292
297
  onClick: () => n.removeFiles([e.id])
293
- }, y(l = a("components.upload.delete")) ? l : {
298
+ }, F(l = a("components.upload.delete")) ? l : {
294
299
  default: () => [l]
295
300
  })]);
296
301
  }
@@ -304,5 +309,5 @@ const m = {
304
309
  }
305
310
  });
306
311
  export {
307
- $e as DuxFileUpload
312
+ et as DuxFileUpload
308
313
  };