@skyfox2000/webui 0.1.0

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 (213) hide show
  1. package/.eslintrc.js +23 -0
  2. package/.prettierrc +11 -0
  3. package/.vscode/settings.json +25 -0
  4. package/README.md +104 -0
  5. package/env.d.ts +11 -0
  6. package/index.html +19 -0
  7. package/lib/AceEditor.d.ts +4 -0
  8. package/lib/BasicLayout.d.ts +4 -0
  9. package/lib/Error403.d.ts +4 -0
  10. package/lib/Error404.d.ts +4 -0
  11. package/lib/ExcelForm.d.ts +4 -0
  12. package/lib/UploadForm.d.ts +4 -0
  13. package/lib/assets/modules/basicLayout-YP_-EySb.js +726 -0
  14. package/lib/assets/modules/error403-Bi0E2twj.js +33 -0
  15. package/lib/assets/modules/error404-BF7vasR_.js +33 -0
  16. package/lib/assets/modules/excelForm-Dzndz-SG.js +109 -0
  17. package/lib/assets/modules/excelForm-WJVQmaDT.js +317 -0
  18. package/lib/assets/modules/index-FzWSvscZ.js +107 -0
  19. package/lib/assets/modules/index-ekkaExvB.js +49 -0
  20. package/lib/assets/modules/uploadForm-BahGnrAq.js +415 -0
  21. package/lib/assets/modules/uploadForm-DEnOjhwc.js +308 -0
  22. package/lib/components/common/button/index.vue.d.ts +42 -0
  23. package/lib/components/common/button/index.vue.d.ts.map +1 -0
  24. package/lib/components/common/icon/appicon.vue.d.ts +12 -0
  25. package/lib/components/common/icon/appicon.vue.d.ts.map +1 -0
  26. package/lib/components/common/icon/fullscreen.vue.d.ts +4 -0
  27. package/lib/components/common/icon/fullscreen.vue.d.ts.map +1 -0
  28. package/lib/components/common/icon/helper.vue.d.ts +23 -0
  29. package/lib/components/common/icon/helper.vue.d.ts.map +1 -0
  30. package/lib/components/common/icon/index.vue.d.ts +244 -0
  31. package/lib/components/common/icon/index.vue.d.ts.map +1 -0
  32. package/lib/components/common/icon/layoutIcon.vue.d.ts +44 -0
  33. package/lib/components/common/icon/layoutIcon.vue.d.ts.map +1 -0
  34. package/lib/components/common/icon/projectIcon.vue.d.ts +60 -0
  35. package/lib/components/common/icon/projectIcon.vue.d.ts.map +1 -0
  36. package/lib/components/common/icon/toolIcon.vue.d.ts +44 -0
  37. package/lib/components/common/icon/toolIcon.vue.d.ts.map +1 -0
  38. package/lib/components/common/index.d.ts +19 -0
  39. package/lib/components/common/index.d.ts.map +1 -0
  40. package/lib/components/common/tooltip/index.vue.d.ts +22 -0
  41. package/lib/components/common/tooltip/index.vue.d.ts.map +1 -0
  42. package/lib/components/content/dialog/excelForm.vue.d.ts +31 -0
  43. package/lib/components/content/dialog/excelForm.vue.d.ts.map +1 -0
  44. package/lib/components/content/dialog/index.vue.d.ts +35 -0
  45. package/lib/components/content/dialog/index.vue.d.ts.map +1 -0
  46. package/lib/components/content/dialog/uploadForm.vue.d.ts +25 -0
  47. package/lib/components/content/dialog/uploadForm.vue.d.ts.map +1 -0
  48. package/lib/components/content/drawer/index.vue.d.ts +27 -0
  49. package/lib/components/content/drawer/index.vue.d.ts.map +1 -0
  50. package/lib/components/content/form/formItem.vue.d.ts +26 -0
  51. package/lib/components/content/form/formItem.vue.d.ts.map +1 -0
  52. package/lib/components/content/form/index.vue.d.ts +26 -0
  53. package/lib/components/content/form/index.vue.d.ts.map +1 -0
  54. package/lib/components/content/index.d.ts +27 -0
  55. package/lib/components/content/index.d.ts.map +1 -0
  56. package/lib/components/content/search/index.vue.d.ts +30 -0
  57. package/lib/components/content/search/index.vue.d.ts.map +1 -0
  58. package/lib/components/content/search/searchItem.vue.d.ts +24 -0
  59. package/lib/components/content/search/searchItem.vue.d.ts.map +1 -0
  60. package/lib/components/content/table/index.vue.d.ts +37 -0
  61. package/lib/components/content/table/index.vue.d.ts.map +1 -0
  62. package/lib/components/content/table/tableOperate.vue.d.ts +19 -0
  63. package/lib/components/content/table/tableOperate.vue.d.ts.map +1 -0
  64. package/lib/components/content/toolbar/icontool.vue.d.ts +8 -0
  65. package/lib/components/content/toolbar/icontool.vue.d.ts.map +1 -0
  66. package/lib/components/content/toolbar/index.vue.d.ts +19 -0
  67. package/lib/components/content/toolbar/index.vue.d.ts.map +1 -0
  68. package/lib/components/content/tree/index.vue.d.ts +47 -0
  69. package/lib/components/content/tree/index.vue.d.ts.map +1 -0
  70. package/lib/components/error/error403.vue.d.ts +4 -0
  71. package/lib/components/error/error403.vue.d.ts.map +1 -0
  72. package/lib/components/error/error404.vue.d.ts +4 -0
  73. package/lib/components/error/error404.vue.d.ts.map +1 -0
  74. package/lib/components/form/aceEditor/aceConfig.d.ts +9 -0
  75. package/lib/components/form/aceEditor/aceConfig.d.ts.map +1 -0
  76. package/lib/components/form/aceEditor/index.vue.d.ts +13 -0
  77. package/lib/components/form/aceEditor/index.vue.d.ts.map +1 -0
  78. package/lib/components/form/autoComplete/index.vue.d.ts +140 -0
  79. package/lib/components/form/autoComplete/index.vue.d.ts.map +1 -0
  80. package/lib/components/form/cascader/index.vue.d.ts +110 -0
  81. package/lib/components/form/cascader/index.vue.d.ts.map +1 -0
  82. package/lib/components/form/checkbox/index.vue.d.ts +129 -0
  83. package/lib/components/form/checkbox/index.vue.d.ts.map +1 -0
  84. package/lib/components/form/datePicker/index.vue.d.ts +7 -0
  85. package/lib/components/form/datePicker/index.vue.d.ts.map +1 -0
  86. package/lib/components/form/index.d.ts +41 -0
  87. package/lib/components/form/index.d.ts.map +1 -0
  88. package/lib/components/form/input/index.vue.d.ts +27 -0
  89. package/lib/components/form/input/index.vue.d.ts.map +1 -0
  90. package/lib/components/form/input/inputIcon.vue.d.ts +11 -0
  91. package/lib/components/form/input/inputIcon.vue.d.ts.map +1 -0
  92. package/lib/components/form/input/inputNumber.vue.d.ts +4 -0
  93. package/lib/components/form/input/inputNumber.vue.d.ts.map +1 -0
  94. package/lib/components/form/input/inputPassword.vue.d.ts +4 -0
  95. package/lib/components/form/input/inputPassword.vue.d.ts.map +1 -0
  96. package/lib/components/form/propEditor/index.vue.d.ts +13 -0
  97. package/lib/components/form/propEditor/index.vue.d.ts.map +1 -0
  98. package/lib/components/form/radio/index.vue.d.ts +134 -0
  99. package/lib/components/form/radio/index.vue.d.ts.map +1 -0
  100. package/lib/components/form/radio/radioStatus.vue.d.ts +32 -0
  101. package/lib/components/form/radio/radioStatus.vue.d.ts.map +1 -0
  102. package/lib/components/form/rangePicker/index.vue.d.ts +17 -0
  103. package/lib/components/form/rangePicker/index.vue.d.ts.map +1 -0
  104. package/lib/components/form/select/index.vue.d.ts +143 -0
  105. package/lib/components/form/select/index.vue.d.ts.map +1 -0
  106. package/lib/components/form/switch/index.vue.d.ts +44 -0
  107. package/lib/components/form/switch/index.vue.d.ts.map +1 -0
  108. package/lib/components/form/textarea/index.vue.d.ts +4 -0
  109. package/lib/components/form/textarea/index.vue.d.ts.map +1 -0
  110. package/lib/components/form/transfer/index.vue.d.ts +39 -0
  111. package/lib/components/form/transfer/index.vue.d.ts.map +1 -0
  112. package/lib/components/form/transfer/transferTable.vue.d.ts +39 -0
  113. package/lib/components/form/transfer/transferTable.vue.d.ts.map +1 -0
  114. package/lib/components/form/treeSelect/index.vue.d.ts +39 -0
  115. package/lib/components/form/treeSelect/index.vue.d.ts.map +1 -0
  116. package/lib/components/form/upload/uploadList.vue.d.ts +477 -0
  117. package/lib/components/form/upload/uploadList.vue.d.ts.map +1 -0
  118. package/lib/components/index.d.ts +9 -0
  119. package/lib/components/index.d.ts.map +1 -0
  120. package/lib/components/layout/breadcrumb/index.vue.d.ts +4 -0
  121. package/lib/components/layout/breadcrumb/index.vue.d.ts.map +1 -0
  122. package/lib/components/layout/content/index.vue.d.ts +23 -0
  123. package/lib/components/layout/content/index.vue.d.ts.map +1 -0
  124. package/lib/components/layout/datetime/index.vue.d.ts +4 -0
  125. package/lib/components/layout/datetime/index.vue.d.ts.map +1 -0
  126. package/lib/components/layout/header/headerExits.vue.d.ts +4 -0
  127. package/lib/components/layout/header/headerExits.vue.d.ts.map +1 -0
  128. package/lib/components/layout/header/index.vue.d.ts +4 -0
  129. package/lib/components/layout/header/index.vue.d.ts.map +1 -0
  130. package/lib/components/layout/index.d.ts +17 -0
  131. package/lib/components/layout/index.d.ts.map +1 -0
  132. package/lib/components/layout/menu/index.vue.d.ts +7 -0
  133. package/lib/components/layout/menu/index.vue.d.ts.map +1 -0
  134. package/lib/components/layout/menu/menuTabs.vue.d.ts +4 -0
  135. package/lib/components/layout/menu/menuTabs.vue.d.ts.map +1 -0
  136. package/lib/components/layout/page/basicLayout.vue.d.ts +7 -0
  137. package/lib/components/layout/page/basicLayout.vue.d.ts.map +1 -0
  138. package/lib/es/AceEditor/index.js +168 -0
  139. package/lib/es/BasicLayout/index.js +4 -0
  140. package/lib/es/Error403/index.js +4 -0
  141. package/lib/es/Error404/index.js +4 -0
  142. package/lib/es/ExcelForm/index.js +5 -0
  143. package/lib/es/UploadForm/index.js +5 -0
  144. package/lib/index.d.ts +2 -0
  145. package/lib/webui.css +1 -0
  146. package/lib/webui.es.js +3349 -0
  147. package/package.json +66 -0
  148. package/plugins/vite-plugin-auto-generate-vue.ts +105 -0
  149. package/postcss.config.ts +6 -0
  150. package/src/assets/global.css +9 -0
  151. package/src/components/common/button/index.vue +126 -0
  152. package/src/components/common/icon/appicon.vue +28 -0
  153. package/src/components/common/icon/fullscreen.vue +13 -0
  154. package/src/components/common/icon/helper.vue +30 -0
  155. package/src/components/common/icon/index.vue +426 -0
  156. package/src/components/common/icon/layoutIcon.vue +33 -0
  157. package/src/components/common/icon/projectIcon.vue +41 -0
  158. package/src/components/common/icon/toolIcon.vue +33 -0
  159. package/src/components/common/index.ts +19 -0
  160. package/src/components/common/tooltip/index.vue +25 -0
  161. package/src/components/content/dialog/excelForm.vue +479 -0
  162. package/src/components/content/dialog/index.vue +149 -0
  163. package/src/components/content/dialog/uploadForm.vue +228 -0
  164. package/src/components/content/drawer/index.vue +93 -0
  165. package/src/components/content/form/formItem.vue +76 -0
  166. package/src/components/content/form/index.vue +48 -0
  167. package/src/components/content/index.ts +32 -0
  168. package/src/components/content/search/index.vue +135 -0
  169. package/src/components/content/search/searchItem.vue +52 -0
  170. package/src/components/content/table/index.vue +215 -0
  171. package/src/components/content/table/tableOperate.vue +131 -0
  172. package/src/components/content/toolbar/icontool.vue +151 -0
  173. package/src/components/content/toolbar/index.vue +107 -0
  174. package/src/components/content/tree/index.vue +140 -0
  175. package/src/components/error/error403.vue +14 -0
  176. package/src/components/error/error404.vue +14 -0
  177. package/src/components/form/aceEditor/aceConfig.ts +90 -0
  178. package/src/components/form/aceEditor/index.vue +175 -0
  179. package/src/components/form/autoComplete/index.vue +171 -0
  180. package/src/components/form/cascader/index.vue +110 -0
  181. package/src/components/form/checkbox/index.vue +108 -0
  182. package/src/components/form/datePicker/index.vue +29 -0
  183. package/src/components/form/index.ts +54 -0
  184. package/src/components/form/input/index.vue +70 -0
  185. package/src/components/form/input/inputIcon.vue +39 -0
  186. package/src/components/form/input/inputNumber.vue +23 -0
  187. package/src/components/form/input/inputPassword.vue +22 -0
  188. package/src/components/form/propEditor/index.vue +81 -0
  189. package/src/components/form/radio/index.vue +132 -0
  190. package/src/components/form/radio/radioStatus.vue +42 -0
  191. package/src/components/form/rangePicker/index.vue +64 -0
  192. package/src/components/form/select/index.vue +186 -0
  193. package/src/components/form/switch/index.vue +58 -0
  194. package/src/components/form/textarea/index.vue +23 -0
  195. package/src/components/form/transfer/index.vue +95 -0
  196. package/src/components/form/transfer/transferTable.vue +124 -0
  197. package/src/components/form/treeSelect/index.vue +108 -0
  198. package/src/components/form/upload/uploadList.vue +235 -0
  199. package/src/components/index.ts +97 -0
  200. package/src/components/layout/breadcrumb/index.vue +38 -0
  201. package/src/components/layout/content/index.vue +28 -0
  202. package/src/components/layout/datetime/index.vue +16 -0
  203. package/src/components/layout/header/headerExits.vue +28 -0
  204. package/src/components/layout/header/index.vue +43 -0
  205. package/src/components/layout/index.ts +16 -0
  206. package/src/components/layout/menu/index.vue +64 -0
  207. package/src/components/layout/menu/menuTabs.vue +56 -0
  208. package/src/components/layout/page/basicLayout.vue +67 -0
  209. package/src/vite-env.d.ts +8 -0
  210. package/tailwind.config.ts +11 -0
  211. package/tsconfig.json +53 -0
  212. package/vite.config.ts +117 -0
  213. package//344/273/243/347/240/201/350/247/204/350/214/203/345/217/212/351/243/216/346/240/274/346/214/207/345/215/227.md +116 -0
@@ -0,0 +1,308 @@
1
+ import { defineComponent as M, ref as C, computed as N, watch as D, createElementBlock as w, openBlock as h, createElementVNode as d, createVNode as v, unref as s, mergeProps as P, withCtx as m, createTextVNode as b, toDisplayString as y, Fragment as j, renderList as V, normalizeClass as R, createCommentVNode as B, onMounted as T, createBlock as K } from "vue";
2
+ import { _ as L } from "./excelForm-Dzndz-SG.js";
3
+ import { Upload as A, Tag as I, Progress as Q, Modal as q, Space as G } from "ant-design-vue";
4
+ import { ResStatus as H } from "@skyfox2000/fapi";
5
+ import { UploadStatus as r, path as J, donwloadFromMinio as W, AsyncUploader as X, gridRowUpdate as Y } from "@skyfox2000/webbase";
6
+ import "./index-ekkaExvB.js";
7
+ import "./uploadForm-BahGnrAq.js";
8
+ import u from "vue-m-message";
9
+ import "@vue-office/excel";
10
+ import "@skyfox2000/microbase";
11
+ import "dayjs";
12
+ const Z = { class: "w-full border border-solid border-gray-100 mt-1 rounded-md py-5" }, ee = { class: "flex items-center justify-between w-full" }, te = { class: "w-35 mx-3" }, oe = { class: "flex-1 text-sm text-gray-500" }, ae = { class: "mt-4 px-3" }, le = { class: "flex items-center justify-between" }, re = { class: "flex items-center" }, se = { class: "flex items-center" }, ne = ["onClick"], ie = ["onClick"], ue = ["onClick"], de = /* @__PURE__ */ M({
13
+ __name: "uploadList",
14
+ props: {
15
+ autoUpload: { type: Boolean, default: !1 },
16
+ downloadUrl: {},
17
+ fileList: { default: () => [] },
18
+ placeholder: { default: "" },
19
+ fileExt: {},
20
+ maxFileSize: { default: 20 },
21
+ maxCount: { default: 5 },
22
+ parentPath: {}
23
+ },
24
+ emits: ["update:file-list"],
25
+ setup(F, { emit: E }) {
26
+ const t = F, o = C(t.fileList), g = C(), S = E, k = N(() => {
27
+ var e;
28
+ return (e = t.fileExt) != null && e.length ? t.fileExt.map((a) => `.${a}`).join(",") : "";
29
+ }), p = (e) => {
30
+ var a;
31
+ if (t.fileExt && t.fileExt.length > 0) {
32
+ const l = ((a = e.name.split(".").pop()) == null ? void 0 : a.toLowerCase()) || "";
33
+ if (!t.fileExt.includes(l))
34
+ return u.error("文件类型不支持"), !1;
35
+ }
36
+ return e.size / 1024 / 1024 > t.maxFileSize ? (u.error(`文件大小超过 ${t.maxFileSize}MB 限制`), !1) : t.maxCount > 1 && o.value.length >= t.maxCount ? (u.error(`最多上传 ${t.maxCount} 个文件`), !1) : t.autoUpload;
37
+ }, x = (e) => {
38
+ e.forEach((a) => {
39
+ a.fileName || (a.fileName = a.name), t.parentPath && (a.name = J.join("/", t.parentPath, a.fileName));
40
+ });
41
+ }, c = N(() => ({
42
+ accept: k.value,
43
+ multiple: !0,
44
+ fileList: o.value,
45
+ "onUpdate:fileList": x,
46
+ beforeUpload: p,
47
+ listType: "text",
48
+ maxCount: t.maxCount,
49
+ showUploadList: !1,
50
+ onChange: (e) => {
51
+ t.autoUpload || (o.value = e.fileList);
52
+ }
53
+ }));
54
+ D(
55
+ () => o.value,
56
+ (e) => {
57
+ S("update:file-list", e);
58
+ },
59
+ { deep: !0 }
60
+ );
61
+ const f = (e) => {
62
+ const a = o.value[e].minioFile, l = {
63
+ api: t.downloadUrl.api,
64
+ authorize: t.downloadUrl.authorize,
65
+ url: t.downloadUrl.url,
66
+ // url: props.pageData.urls.download!.url,
67
+ params: {
68
+ Query: {
69
+ FileKey: a.Key
70
+ }
71
+ }
72
+ };
73
+ W(l);
74
+ }, O = (e) => {
75
+ e.status = e.status === r.Offline ? r.Online : r.Offline, e.minioFile.Status = e.status;
76
+ }, _ = (e) => {
77
+ o.value.splice(e, 1);
78
+ }, U = () => {
79
+ const e = t.fileExt && t.fileExt.length ? `文件必须为 ${t.fileExt.join("/")}` : "", a = t.maxFileSize !== 0 ? `单文件最大 ${t.maxFileSize}MB` : "", l = t.maxCount !== 0 ? `最多 ${t.maxCount} 个文件` : "";
80
+ return [a, e, l].filter(Boolean).join(",");
81
+ }, n = (e) => {
82
+ switch (e) {
83
+ case r.Uploading:
84
+ return "blue";
85
+ case r.Success:
86
+ return "green";
87
+ case r.Error:
88
+ return "red";
89
+ case r.Online:
90
+ return "green";
91
+ case r.Offline:
92
+ return "pink";
93
+ default:
94
+ return "cyan";
95
+ }
96
+ }, i = (e) => {
97
+ switch (e) {
98
+ case r.Uploading:
99
+ return "上传中";
100
+ case r.Success:
101
+ return "已完成";
102
+ case r.Error:
103
+ return "上传失败";
104
+ case r.Online:
105
+ return "在线";
106
+ case r.Offline:
107
+ return "已下线";
108
+ default:
109
+ return "待上传";
110
+ }
111
+ };
112
+ return (e, a) => (h(), w("div", Z, [
113
+ d("div", ee, [
114
+ d("div", te, [
115
+ v(s(A), P({
116
+ ref_key: "fileUploader",
117
+ ref: g
118
+ }, c.value), {
119
+ default: m(() => [
120
+ v(s(L), null, {
121
+ default: m(() => a[0] || (a[0] = [
122
+ b("选择文件")
123
+ ])),
124
+ _: 1,
125
+ __: [0]
126
+ })
127
+ ]),
128
+ _: 1
129
+ }, 16)
130
+ ]),
131
+ d("div", oe, y(U()), 1)
132
+ ]),
133
+ d("div", ae, [
134
+ (h(!0), w(j, null, V(o.value, (l, z) => (h(), w("div", {
135
+ key: z,
136
+ class: "mb-2 pb-1"
137
+ }, [
138
+ d("div", le, [
139
+ d("div", re, [
140
+ d("span", {
141
+ class: R(["text-gray-700 mr-2", [l.status == s(r).Offline ? "line-through" : ""]])
142
+ }, y(l.fileName ?? l.name), 3),
143
+ d("span", null, [
144
+ v(s(I), {
145
+ color: n(l.status)
146
+ }, {
147
+ default: m(() => [
148
+ b(y(i(l.status)), 1)
149
+ ]),
150
+ _: 2
151
+ }, 1032, ["color"])
152
+ ])
153
+ ]),
154
+ d("div", se, [
155
+ l.status == s(r).Offline || l.status == s(r).Online ? (h(), w("span", {
156
+ key: 0,
157
+ class: "text-blue-500 hover:text-blue-700 mr-4 cursor-pointer",
158
+ onClick: ($) => O(l)
159
+ }, y(l.status == s(r).Offline ? "上线" : "下线"), 9, ne)) : B("", !0),
160
+ l.status == s(r).Offline || l.status == s(r).Online ? (h(), w("span", {
161
+ key: 1,
162
+ class: "text-blue-500 hover:text-blue-700 mr-4 cursor-pointer",
163
+ onClick: ($) => f(z)
164
+ }, "下载", 8, ie)) : B("", !0),
165
+ d("span", {
166
+ class: "text-red-500 hover:text-red-700 cursor-pointer",
167
+ onClick: ($) => _(z)
168
+ }, "删除", 8, ue)
169
+ ])
170
+ ]),
171
+ d("div", null, [
172
+ v(s(Q), {
173
+ percent: l.percent,
174
+ "stroke-width": 2,
175
+ "show-info": !1,
176
+ style: { height: "2px" }
177
+ }, null, 8, ["percent"])
178
+ ])
179
+ ]))), 128))
180
+ ])
181
+ ]));
182
+ }
183
+ }), Ue = /* @__PURE__ */ M({
184
+ __name: "uploadForm",
185
+ props: {
186
+ mode: {},
187
+ fileExt: {},
188
+ gridCtrl: {},
189
+ maxCount: {},
190
+ maxConcurrent: {},
191
+ uploadForm: {},
192
+ uploadUrl: {},
193
+ downloadUrl: {},
194
+ continueOnError: { type: Boolean }
195
+ },
196
+ emits: ["before:file-list", "before:upload", "after:upload"],
197
+ setup(F, { emit: E }) {
198
+ const t = F, o = t.uploadForm, g = C(!1), S = t.maxCount ?? 1, k = t.maxConcurrent ?? 3, p = C([]), x = E;
199
+ D(
200
+ () => o.visible.value,
201
+ () => {
202
+ g.value = o.visible.value;
203
+ }
204
+ );
205
+ const c = C(t.uploadUrl), f = C(t.downloadUrl), O = async () => {
206
+ const n = c.value;
207
+ if (!n) {
208
+ u.error("未配置文件上传地址!");
209
+ return;
210
+ }
211
+ x("before:upload", p.value);
212
+ const i = new X(n, k);
213
+ o.isFormLoading.value = !0;
214
+ try {
215
+ if (p.value.length === 0) {
216
+ u.warning("请选择上传的文件!");
217
+ return;
218
+ }
219
+ await i.uploadFiles(
220
+ p.value,
221
+ (e) => {
222
+ },
223
+ (e) => {
224
+ o.isFormLoading.value = !1;
225
+ let a = 0;
226
+ for (const l of e)
227
+ l.status === r.Error && a++;
228
+ a ? a < e.length ? t.continueOnError ? (u.error("上传结束,部分文件上传失败!"), u.warning("保存上传成功的文件!"), x("after:upload", e), _()) : u.error("上传结束,部分文件上传失败,取消保存!") : u.error("上传结束,所有文件上传失败!") : (u.success("全部文件上传成功!"), x("after:upload", e), _());
229
+ }
230
+ );
231
+ } catch (e) {
232
+ o.isFormLoading.value = !1, console.error("上传错误:", e), u.error("上传错误,请稍后再试!"), x("after:upload", p.value);
233
+ }
234
+ }, _ = async () => {
235
+ switch (t.mode) {
236
+ case "Row":
237
+ o.formData.value && (await Y(t.gridCtrl, o.formData.value)).status === H.SUCCESS && (o.visible.value = !1);
238
+ break;
239
+ }
240
+ };
241
+ T(() => {
242
+ const n = t.gridCtrl.page;
243
+ if (c.value = c.value ?? n.urls.upload, f.value = f.value ?? n.urls.download, !c.value) {
244
+ u.error("未配置文件上传地址!");
245
+ return;
246
+ }
247
+ if (c.value.api || (c.value.api = n.api), c.value.authorize === void 0 && (c.value.authorize = n.authorize), !f.value) {
248
+ u.error("未配置文件下载地址!");
249
+ return;
250
+ }
251
+ f.value.api || (f.value.api = n.api), f.value.authorize === void 0 && (f.value.authorize = n.authorize);
252
+ for (const e in o.formData.value)
253
+ t.gridCtrl.rowData.value && (o.formData.value[e] = t.gridCtrl.rowData.value[e]);
254
+ const i = [];
255
+ x("before:file-list", o, i), p.value.push(...i), g.value = o.visible.value;
256
+ });
257
+ const U = () => {
258
+ o.visible.value = !1;
259
+ };
260
+ return (n, i) => (h(), K(s(q), {
261
+ title: "文件上传",
262
+ open: g.value,
263
+ "onUpdate:open": i[1] || (i[1] = (e) => g.value = e),
264
+ wrapClassName: "modal mx-auto " + (n.$attrs.width ? "w-[" + n.$attrs.width + "]" : "w-[430px]"),
265
+ onClose: U
266
+ }, {
267
+ footer: m(() => [
268
+ v(s(G), null, {
269
+ default: m(() => [
270
+ v(s(L), { onClick: U }, {
271
+ default: m(() => i[2] || (i[2] = [
272
+ b("取消")
273
+ ])),
274
+ _: 1,
275
+ __: [2]
276
+ }),
277
+ v(s(L), {
278
+ onClick: O,
279
+ type: "primary",
280
+ loading: s(o).isFormSaving.value
281
+ }, {
282
+ default: m(() => i[3] || (i[3] = [
283
+ b(" 上传文件并保存 ")
284
+ ])),
285
+ _: 1,
286
+ __: [3]
287
+ }, 8, ["loading"])
288
+ ]),
289
+ _: 1
290
+ })
291
+ ]),
292
+ default: m(() => [
293
+ v(s(de), {
294
+ "file-list": p.value,
295
+ "onUpdate:fileList": i[0] || (i[0] = (e) => p.value = e),
296
+ "download-url": f.value,
297
+ "max-count": s(S),
298
+ "file-ext": n.fileExt
299
+ }, null, 8, ["file-list", "download-url", "max-count", "file-ext"])
300
+ ]),
301
+ _: 1
302
+ }, 8, ["open", "wrapClassName"]));
303
+ }
304
+ });
305
+ export {
306
+ Ue as _,
307
+ de as a
308
+ };
@@ -0,0 +1,42 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ icon?(_: {}): any;
6
+ default?(_: {}): any;
7
+ };
8
+ refs: {};
9
+ rootEl: any;
10
+ };
11
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
+ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
13
+ tiptext: StringConstructor;
14
+ placement: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ iconProps: ObjectConstructor;
19
+ icon: StringConstructor;
20
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
21
+ click: (...args: any[]) => void;
22
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
23
+ tiptext: StringConstructor;
24
+ placement: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ };
28
+ iconProps: ObjectConstructor;
29
+ icon: StringConstructor;
30
+ }>> & Readonly<{
31
+ onClick?: ((...args: any[]) => any) | undefined;
32
+ }>, {
33
+ placement: string;
34
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
35
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
36
+ export default _default;
37
+ type __VLS_WithTemplateSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
42
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/common/button/index.vue"],"names":[],"mappings":";AAqOA,iBAAS,cAAc;WA4FT,OAAO,IAA6B;;sBAXvB,GAAG;yBACA,GAAG;;;;EAehC;AAqED,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;4EA8DnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<{
3
+ icon: {
4
+ type: StringConstructor;
5
+ };
6
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
7
+ icon: {
8
+ type: StringConstructor;
9
+ };
10
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
11
+ export default _default;
12
+ //# sourceMappingURL=appicon.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appicon.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/common/icon/appicon.vue"],"names":[],"mappings":";;;;;;;;;;AA2GA,wBAUG"}
@@ -0,0 +1,4 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
3
+ export default _default;
4
+ //# sourceMappingURL=fullscreen.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fullscreen.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/common/icon/fullscreen.vue"],"names":[],"mappings":";;AA2EA,wBAMG"}
@@ -0,0 +1,23 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ text?: string;
4
+ maxWidth?: string;
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: any;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
23
+ //# sourceMappingURL=helper.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/common/icon/helper.vue"],"names":[],"mappings":";AAoCA,KAAK,WAAW,GAAG;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAUF,iBAAS,cAAc;WA0DT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,244 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<ExtractPropTypes<{
3
+ autoSwitch: {
4
+ type: BooleanConstructor;
5
+ default: boolean;
6
+ };
7
+ tiptext: {
8
+ type: StringConstructor;
9
+ };
10
+ tipsize: {
11
+ type: StringConstructor;
12
+ };
13
+ tipcolor: {
14
+ type: StringConstructor;
15
+ };
16
+ placement: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ icon: {
21
+ type: StringConstructor;
22
+ };
23
+ icons: {
24
+ type: {
25
+ (arrayLength: number): string[];
26
+ (...items: string[]): string[];
27
+ new (arrayLength: number): string[];
28
+ new (...items: string[]): string[];
29
+ isArray(arg: any): arg is any[];
30
+ readonly prototype: any[];
31
+ from<T>(arrayLike: ArrayLike<T>): T[];
32
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
33
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
34
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
35
+ of<T>(...items: T[]): T[];
36
+ readonly [Symbol.species]: ArrayConstructor;
37
+ };
38
+ default: () => never[];
39
+ };
40
+ iconIndex: {
41
+ type: NumberConstructor;
42
+ default: number;
43
+ };
44
+ clickable: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
48
+ clickEvent: {
49
+ type: StringConstructor;
50
+ };
51
+ data: {
52
+ type: (StringConstructor | ObjectConstructor)[];
53
+ };
54
+ fontsize: {
55
+ type: StringConstructor;
56
+ default: string;
57
+ };
58
+ size: {
59
+ type: (StringConstructor | {
60
+ (arrayLength: number): String[];
61
+ (...items: String[]): String[];
62
+ new (arrayLength: number): String[];
63
+ new (...items: String[]): String[];
64
+ isArray(arg: any): arg is any[];
65
+ readonly prototype: any[];
66
+ from<T>(arrayLike: ArrayLike<T>): T[];
67
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
68
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
69
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
70
+ of<T>(...items: T[]): T[];
71
+ readonly [Symbol.species]: ArrayConstructor;
72
+ })[];
73
+ default: () => string[];
74
+ };
75
+ position: {
76
+ type: {
77
+ (arrayLength: number): (string | number)[];
78
+ (...items: (string | number)[]): (string | number)[];
79
+ new (arrayLength: number): (string | number)[];
80
+ new (...items: (string | number)[]): (string | number)[];
81
+ isArray(arg: any): arg is any[];
82
+ readonly prototype: any[];
83
+ from<T>(arrayLike: ArrayLike<T>): T[];
84
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
85
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
86
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
87
+ of<T>(...items: T[]): T[];
88
+ readonly [Symbol.species]: ArrayConstructor;
89
+ };
90
+ };
91
+ center: {
92
+ type: StringConstructor;
93
+ };
94
+ angle: {
95
+ type: NumberConstructor;
96
+ };
97
+ color: {
98
+ type: StringConstructor;
99
+ default: string;
100
+ };
101
+ className: {
102
+ type: StringConstructor;
103
+ default: string;
104
+ };
105
+ flip: {
106
+ type: BooleanConstructor;
107
+ default: boolean;
108
+ };
109
+ spin: {
110
+ type: BooleanConstructor;
111
+ default: boolean;
112
+ };
113
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
114
+ click: (...args: any[]) => void;
115
+ "update:iconIndex": (...args: any[]) => void;
116
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
117
+ autoSwitch: {
118
+ type: BooleanConstructor;
119
+ default: boolean;
120
+ };
121
+ tiptext: {
122
+ type: StringConstructor;
123
+ };
124
+ tipsize: {
125
+ type: StringConstructor;
126
+ };
127
+ tipcolor: {
128
+ type: StringConstructor;
129
+ };
130
+ placement: {
131
+ type: StringConstructor;
132
+ default: string;
133
+ };
134
+ icon: {
135
+ type: StringConstructor;
136
+ };
137
+ icons: {
138
+ type: {
139
+ (arrayLength: number): string[];
140
+ (...items: string[]): string[];
141
+ new (arrayLength: number): string[];
142
+ new (...items: string[]): string[];
143
+ isArray(arg: any): arg is any[];
144
+ readonly prototype: any[];
145
+ from<T>(arrayLike: ArrayLike<T>): T[];
146
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
147
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
148
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
149
+ of<T>(...items: T[]): T[];
150
+ readonly [Symbol.species]: ArrayConstructor;
151
+ };
152
+ default: () => never[];
153
+ };
154
+ iconIndex: {
155
+ type: NumberConstructor;
156
+ default: number;
157
+ };
158
+ clickable: {
159
+ type: BooleanConstructor;
160
+ default: boolean;
161
+ };
162
+ clickEvent: {
163
+ type: StringConstructor;
164
+ };
165
+ data: {
166
+ type: (StringConstructor | ObjectConstructor)[];
167
+ };
168
+ fontsize: {
169
+ type: StringConstructor;
170
+ default: string;
171
+ };
172
+ size: {
173
+ type: (StringConstructor | {
174
+ (arrayLength: number): String[];
175
+ (...items: String[]): String[];
176
+ new (arrayLength: number): String[];
177
+ new (...items: String[]): String[];
178
+ isArray(arg: any): arg is any[];
179
+ readonly prototype: any[];
180
+ from<T>(arrayLike: ArrayLike<T>): T[];
181
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
182
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
183
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
184
+ of<T>(...items: T[]): T[];
185
+ readonly [Symbol.species]: ArrayConstructor;
186
+ })[];
187
+ default: () => string[];
188
+ };
189
+ position: {
190
+ type: {
191
+ (arrayLength: number): (string | number)[];
192
+ (...items: (string | number)[]): (string | number)[];
193
+ new (arrayLength: number): (string | number)[];
194
+ new (...items: (string | number)[]): (string | number)[];
195
+ isArray(arg: any): arg is any[];
196
+ readonly prototype: any[];
197
+ from<T>(arrayLike: ArrayLike<T>): T[];
198
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
199
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
200
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
201
+ of<T>(...items: T[]): T[];
202
+ readonly [Symbol.species]: ArrayConstructor;
203
+ };
204
+ };
205
+ center: {
206
+ type: StringConstructor;
207
+ };
208
+ angle: {
209
+ type: NumberConstructor;
210
+ };
211
+ color: {
212
+ type: StringConstructor;
213
+ default: string;
214
+ };
215
+ className: {
216
+ type: StringConstructor;
217
+ default: string;
218
+ };
219
+ flip: {
220
+ type: BooleanConstructor;
221
+ default: boolean;
222
+ };
223
+ spin: {
224
+ type: BooleanConstructor;
225
+ default: boolean;
226
+ };
227
+ }>> & Readonly<{
228
+ onClick?: ((...args: any[]) => any) | undefined;
229
+ "onUpdate:iconIndex"?: ((...args: any[]) => any) | undefined;
230
+ }>, {
231
+ size: string | String[];
232
+ placement: string;
233
+ color: string;
234
+ icons: string[];
235
+ iconIndex: number;
236
+ clickable: boolean;
237
+ flip: boolean;
238
+ autoSwitch: boolean;
239
+ fontsize: string;
240
+ className: string;
241
+ spin: boolean;
242
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
243
+ export default _default;
244
+ //# sourceMappingURL=index.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/common/icon/index.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyjCA,wBA6NG"}