@skyfox2000/webui 1.0.13 → 1.2.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 (162) hide show
  1. package/lib/assets/modules/file-upload-CBUcsUnR.js +170 -0
  2. package/lib/assets/modules/form-validate-CgX7aR7T.js +297 -0
  3. package/lib/assets/modules/index-Civhd8xG.js +112 -0
  4. package/lib/assets/modules/index-DQMdt51R.js +726 -0
  5. package/lib/assets/modules/{index-BEWJ_qAH.js → index-DmWrkTXX.js} +1 -1
  6. package/lib/assets/modules/{menuTabs-BXdbFZor.js → menuTabs-BRYvFWA-.js} +131 -121
  7. package/lib/assets/modules/settingInfo-BZakNKIN.js +999 -0
  8. package/lib/assets/modules/uploadList-B7XoxGOh.js +278 -0
  9. package/lib/components/common/icon/index.vue.d.ts +1 -1
  10. package/lib/components/content/dialog/index.vue.d.ts +1 -1
  11. package/lib/components/content/drawer/index.vue.d.ts +1 -1
  12. package/lib/components/content/form/index.vue.d.ts +1 -1
  13. package/lib/components/content/search/index.vue.d.ts +1 -1
  14. package/lib/components/content/table/index.vue.d.ts +1 -1
  15. package/lib/components/content/table/tableOperate.vue.d.ts +1 -1
  16. package/lib/components/content/toolbar/icontool.vue.d.ts +1 -1
  17. package/lib/components/content/toolbar/index.vue.d.ts +1 -1
  18. package/lib/components/content/tree/index.vue.d.ts +1 -1
  19. package/lib/components/form/transfer/transferTable.vue.d.ts +1 -1
  20. package/lib/components/form/treeSelect/index.vue.d.ts +1 -1
  21. package/lib/components/form/upload/uploadList.vue.d.ts +1 -1
  22. package/lib/const/options.d.ts +32 -0
  23. package/lib/directives/enter-submit.d.ts +4 -0
  24. package/lib/directives/index.d.ts +2 -0
  25. package/lib/directives/permission.d.ts +5 -0
  26. package/lib/es/AceEditor/index.js +9 -8
  27. package/lib/es/BasicLayout/index.js +28 -24
  28. package/lib/es/Error403/index.js +15 -10
  29. package/lib/es/Error404/index.js +15 -10
  30. package/lib/es/ExcelForm/index.js +380 -175
  31. package/lib/es/UploadForm/index.js +23 -20
  32. package/lib/index.d.ts +42 -2
  33. package/lib/router/index.d.ts +16 -0
  34. package/lib/stores/appInfo.d.ts +34 -0
  35. package/lib/stores/hostInfo.d.ts +9 -0
  36. package/lib/stores/pageInfo.d.ts +18 -0
  37. package/lib/stores/pinia.d.ts +3 -0
  38. package/lib/stores/settingInfo.d.ts +8 -0
  39. package/lib/stores/userInfo.d.ts +21 -0
  40. package/lib/typings/data.d.ts +80 -0
  41. package/lib/typings/form.d.ts +171 -0
  42. package/lib/typings/menu.d.ts +7 -0
  43. package/lib/typings/option.d.ts +175 -0
  44. package/lib/typings/page.d.ts +69 -0
  45. package/lib/typings/table.d.ts +181 -0
  46. package/lib/typings/tools.d.ts +130 -0
  47. package/lib/typings/tree.d.ts +72 -0
  48. package/lib/typings/upload.d.ts +161 -0
  49. package/lib/typings/urls.d.ts +69 -0
  50. package/lib/utils/cache.d.ts +23 -0
  51. package/lib/utils/data.d.ts +6 -0
  52. package/lib/utils/download.d.ts +4 -0
  53. package/lib/utils/eventbus.d.ts +16 -0
  54. package/lib/utils/export-table.d.ts +12 -0
  55. package/lib/utils/file-upload.d.ts +15 -0
  56. package/lib/utils/form-excel.d.ts +30 -0
  57. package/lib/utils/form-validate.d.ts +29 -0
  58. package/lib/utils/form.d.ts +9 -0
  59. package/lib/utils/icon-loader.d.ts +125 -0
  60. package/lib/utils/isEmpty.d.ts +1 -0
  61. package/lib/utils/main-openapis.d.ts +9 -0
  62. package/lib/utils/menu.d.ts +6 -0
  63. package/lib/utils/options.d.ts +10 -0
  64. package/lib/utils/page.d.ts +25 -0
  65. package/lib/utils/table.d.ts +21 -0
  66. package/lib/utils/tools.d.ts +18 -0
  67. package/lib/utils/tree.d.ts +3 -0
  68. package/lib/vite-env.d.ts +8 -0
  69. package/lib/webui.css +1 -1
  70. package/lib/webui.es.js +1020 -854
  71. package/package.json +7 -6
  72. package/src/components/common/icon/appicon.vue +1 -1
  73. package/src/components/common/icon/fullscreen.vue +2 -1
  74. package/src/components/common/icon/index.vue +1 -1
  75. package/src/components/common/icon/layoutIcon.vue +1 -1
  76. package/src/components/common/icon/projectIcon.vue +1 -1
  77. package/src/components/common/icon/toolIcon.vue +1 -1
  78. package/src/components/content/dialog/excelForm.vue +2 -2
  79. package/src/components/content/dialog/index.vue +1 -1
  80. package/src/components/content/dialog/uploadForm.vue +7 -6
  81. package/src/components/content/drawer/index.vue +43 -18
  82. package/src/components/content/form/formItem.vue +1 -1
  83. package/src/components/content/form/index.vue +1 -1
  84. package/src/components/content/search/index.vue +1 -1
  85. package/src/components/content/search/searchItem.vue +1 -1
  86. package/src/components/content/table/index.vue +8 -5
  87. package/src/components/content/table/tableOperate.vue +8 -4
  88. package/src/components/content/toolbar/icontool.vue +2 -2
  89. package/src/components/content/toolbar/index.vue +9 -5
  90. package/src/components/content/tree/index.vue +1 -1
  91. package/src/components/error/error403.vue +2 -2
  92. package/src/components/error/error404.vue +2 -2
  93. package/src/components/form/autoComplete/index.vue +1 -1
  94. package/src/components/form/cascader/index.vue +1 -2
  95. package/src/components/form/checkbox/index.vue +11 -5
  96. package/src/components/form/datePicker/index.vue +1 -1
  97. package/src/components/form/input/index.vue +1 -1
  98. package/src/components/form/input/inputNumber.vue +1 -1
  99. package/src/components/form/input/inputPassword.vue +1 -1
  100. package/src/components/form/radio/index.vue +1 -1
  101. package/src/components/form/radio/radioStatus.vue +1 -1
  102. package/src/components/form/rangePicker/index.vue +1 -1
  103. package/src/components/form/select/index.vue +1 -1
  104. package/src/components/form/switch/index.vue +7 -3
  105. package/src/components/form/textarea/index.vue +1 -1
  106. package/src/components/form/transfer/index.vue +1 -1
  107. package/src/components/form/transfer/transferTable.vue +42 -22
  108. package/src/components/form/treeSelect/index.vue +2 -3
  109. package/src/components/form/upload/uploadList.vue +1 -1
  110. package/src/components/layout/breadcrumb/index.vue +1 -1
  111. package/src/components/layout/header/headerExits.vue +1 -1
  112. package/src/components/layout/header/index.vue +1 -1
  113. package/src/components/layout/header/user.vue +2 -1
  114. package/src/components/layout/menu/index.vue +9 -3
  115. package/src/components/layout/menu/menuTabs.vue +10 -12
  116. package/src/components/layout/page/basicLayout.vue +1 -1
  117. package/src/const/options.ts +114 -0
  118. package/src/directives/enter-submit.ts +13 -0
  119. package/src/directives/index.ts +26 -0
  120. package/src/directives/permission.ts +144 -0
  121. package/src/index.ts +201 -0
  122. package/src/router/index.ts +196 -0
  123. package/src/stores/appInfo.ts +471 -0
  124. package/src/stores/hostInfo.ts +117 -0
  125. package/src/stores/pageInfo.ts +131 -0
  126. package/src/stores/pinia.ts +10 -0
  127. package/src/stores/settingInfo.ts +53 -0
  128. package/src/stores/userInfo.ts +392 -0
  129. package/src/typings/data.d.ts +81 -0
  130. package/src/typings/form.d.ts +172 -0
  131. package/src/typings/menu.d.ts +7 -0
  132. package/src/typings/option.d.ts +177 -0
  133. package/src/typings/page.d.ts +70 -0
  134. package/src/typings/table.d.ts +182 -0
  135. package/src/typings/tools.d.ts +131 -0
  136. package/src/typings/tree.d.ts +73 -0
  137. package/src/typings/upload.d.ts +162 -0
  138. package/src/typings/urls.d.ts +70 -0
  139. package/src/utils/cache.ts +175 -0
  140. package/src/utils/data.ts +189 -0
  141. package/src/utils/download.ts +80 -0
  142. package/src/utils/eventbus.ts +78 -0
  143. package/src/utils/export-table.ts +155 -0
  144. package/src/utils/file-upload.ts +304 -0
  145. package/src/utils/form-excel.ts +523 -0
  146. package/src/utils/form-validate.ts +368 -0
  147. package/src/utils/form.ts +188 -0
  148. package/src/utils/icon-loader.ts +412 -0
  149. package/src/utils/isEmpty.ts +18 -0
  150. package/src/utils/main-openapis.ts +72 -0
  151. package/src/utils/menu.ts +89 -0
  152. package/src/utils/options.ts +324 -0
  153. package/src/utils/page.ts +262 -0
  154. package/src/utils/table.ts +274 -0
  155. package/src/utils/tools.ts +362 -0
  156. package/src/utils/tree.ts +28 -0
  157. package/tsconfig.json +1 -8
  158. package/vite.config.ts +7 -4
  159. package/lib/assets/modules/index-BahGnrAq.js +0 -415
  160. package/lib/assets/modules/index-BoKIa2sr.js +0 -109
  161. package/lib/assets/modules/index-D47Ci-T3.js +0 -107
  162. package/lib/assets/modules/uploadList-Dzlg47V0.js +0 -182
@@ -1,415 +0,0 @@
1
- import { defineComponent as V, useAttrs as $, ref as y, watch as S, onMounted as E, onUnmounted as T, createElementBlock as g, openBlock as f, createVNode as w, unref as o, mergeProps as B, withCtx as _, createCommentVNode as F, Fragment as I, renderList as Q, createBlock as j, normalizeClass as G, createTextVNode as z, toDisplayString as A, createElementVNode as H } from "vue";
2
- import { AutoComplete as W, CheckboxGroup as X, Checkbox as Y, RadioGroup as Z, Radio as ee, Select as ae, SelectOption as le } from "ant-design-vue";
3
- import { OptionCommProps as q, outFormDataFields as te, useInputFactory as D, unloadOption as J, onOptionChanged as U, getSelectedLabels as K, formValidate as R, loadOption as L, isEmpty as P, OPTIONS as ue, circleLoading as re } from "@skyfox2000/webbase";
4
- const fe = /* @__PURE__ */ V({
5
- inheritAttrs: !1,
6
- __name: "index",
7
- props: {
8
- ...q,
9
- autoload: {
10
- type: Boolean,
11
- default: !1
12
- },
13
- value: {
14
- type: [String, Number, null, Array],
15
- default: void 0
16
- },
17
- /**
18
- * 查询字段
19
- * - 模糊查询
20
- */
21
- searchField: {
22
- type: String
23
- },
24
- /**
25
- * 自定义查询参数
26
- * - 查询参数
27
- * - query参数
28
- */
29
- onsearch: {
30
- type: Function
31
- },
32
- /**
33
- * 修改输入数据则自动清空关联数据
34
- */
35
- autoClean: {
36
- type: Boolean,
37
- default: !0
38
- }
39
- },
40
- emits: ["update:value", "select", "change", "update:labels"],
41
- setup(c, { emit: M }) {
42
- var k, l, s;
43
- const e = c, C = $(), t = y({
44
- ...e.url,
45
- url: ((k = e.url) == null ? void 0 : k.url) || "",
46
- fieldMap: e.fieldMap || ((l = e.url) == null ? void 0 : l.fieldMap),
47
- params: e.params || ((s = e.url) == null ? void 0 : s.params),
48
- loadingText: !1
49
- }), r = y(void 0);
50
- S(
51
- () => e.value,
52
- () => {
53
- r.value = e.value;
54
- },
55
- { immediate: !0 }
56
- ), S(
57
- () => r.value,
58
- (u) => {
59
- e.autoClean && e.formData && e.outFields && u !== e.value && te(e.formData, e.outFields, null);
60
- }
61
- );
62
- const i = D(), { editorCtrl: b, errInfo: d, labelText: m } = i, p = M;
63
- i.inputEmit = p;
64
- const v = y([]), h = (u) => {
65
- var N;
66
- if (v.value = [], u === "") return;
67
- let a = u.trim(), n = {
68
- ...t.value.params,
69
- Query: {
70
- ...(N = t.value.params) == null ? void 0 : N.Query
71
- }
72
- };
73
- e.searchField && (n.Query[e.searchField] = {
74
- $like: "%" + a + "%"
75
- }), e.onsearch && e.onsearch(a, n), L(!0, e, v, i, t.value, n);
76
- }, x = (u) => {
77
- const a = U(e, u, v, i);
78
- p("update:value", u), p("select", u);
79
- const n = K(a);
80
- p("update:labels", n), d != null && d.value.errClass && b && R(b);
81
- };
82
- return E(() => {
83
- t.value && !t.value.fieldMap && (t.value.fieldMap = {
84
- title: "Name",
85
- label: "Name",
86
- value: "Name",
87
- key: "Id"
88
- });
89
- }), T(() => {
90
- J(e, i);
91
- }), (u, a) => {
92
- var n;
93
- return f(), g("div", null, [
94
- w(o(W), B({
95
- value: r.value,
96
- "onUpdate:value": a[0] || (a[0] = (N) => r.value = N),
97
- class: [(n = o(d)) == null ? void 0 : n.errClass, "error w-full"],
98
- options: v.value,
99
- onSearch: h,
100
- onSelect: x,
101
- placeholder: e.url && !e.url.loading ? "请输入并选择" + o(m) : ""
102
- }, o(C)), null, 16, ["value", "class", "options", "placeholder"])
103
- ]);
104
- };
105
- }
106
- }), se = { class: "min-h-[32px] pt-[5px]" }, ne = {
107
- key: 1,
108
- class: "text-center text-gray-500"
109
- }, me = /* @__PURE__ */ V({
110
- inheritAttrs: !1,
111
- __name: "index",
112
- props: {
113
- ...q,
114
- nodata: {
115
- type: String,
116
- default: ""
117
- },
118
- /**
119
- * 换行数量
120
- */
121
- wrap: {
122
- type: Number
123
- },
124
- disabledItems: {
125
- type: Array
126
- }
127
- },
128
- emits: ["change", "update:labels"],
129
- setup(c, { emit: M }) {
130
- var p, v, h;
131
- const e = c, C = $(), t = y({
132
- ...e.url,
133
- url: ((p = e.url) == null ? void 0 : p.url) || "",
134
- fieldMap: e.fieldMap || ((v = e.url) == null ? void 0 : v.fieldMap),
135
- params: e.params || ((h = e.url) == null ? void 0 : h.params),
136
- loadingText: !1
137
- }), r = D(), { errInfo: i } = r, b = M;
138
- r.inputEmit = b;
139
- const d = y([]), m = (x) => {
140
- const l = U(e, x, d, r), s = K(l);
141
- b("update:labels", s);
142
- };
143
- return E(() => {
144
- t.value && !t.value.fieldMap && (t.value.fieldMap = {
145
- title: "Name",
146
- label: "Name",
147
- value: "Id",
148
- key: "Id"
149
- }), L(e.autoload, e, d, r, t.value, t.value.params);
150
- }), T(() => {
151
- J(e, r);
152
- }), (x, k) => (f(), g("div", se, [
153
- w(o(X), B({
154
- onChange: m,
155
- class: "w-full mb-[-3px]"
156
- }, o(C)), {
157
- default: _(() => [
158
- d.value.length > 0 ? (f(!0), g(I, { key: 0 }, Q(d.value, (l) => {
159
- var s;
160
- return f(), j(o(Y), {
161
- key: l.value,
162
- value: l.value,
163
- disabled: l.disabled || l.value && c.disabledItems && c.disabledItems.indexOf(l.value.toString()) > -1,
164
- class: G([
165
- ((s = o(i)) == null ? void 0 : s.errClass) === "error" ? "error !text-red-400" : "",
166
- "text-nowrap",
167
- "pb-1",
168
- c.wrap ? `w-1/${e.wrap}` : ""
169
- ])
170
- }, {
171
- default: _(() => [
172
- z(A(l.label), 1)
173
- ]),
174
- _: 2
175
- }, 1032, ["value", "disabled", "class"]);
176
- }), 128)) : c.nodata ? (f(), g("div", ne, A(c.nodata), 1)) : F("", !0)
177
- ]),
178
- _: 1
179
- }, 16)
180
- ]));
181
- }
182
- }), oe = { class: "min-h-[32px] pt-1" }, ie = {
183
- key: 1,
184
- class: "text-center text-gray-500"
185
- }, ye = /* @__PURE__ */ V({
186
- inheritAttrs: !1,
187
- __name: "index",
188
- props: {
189
- ...q,
190
- value: {
191
- type: [String, Number, null, Array],
192
- default: void 0
193
- },
194
- nodata: {
195
- type: String,
196
- default: "无数据"
197
- },
198
- /**
199
- * 换行数量
200
- */
201
- wrap: {
202
- type: Number
203
- }
204
- },
205
- emits: ["change", "update:value", "update:labels"],
206
- setup(c, { emit: M }) {
207
- var h, x, k;
208
- const e = c, C = $(), t = y({
209
- ...e.url,
210
- url: ((h = e.url) == null ? void 0 : h.url) || "",
211
- fieldMap: e.fieldMap || ((x = e.url) == null ? void 0 : x.fieldMap),
212
- params: e.params || ((k = e.url) == null ? void 0 : k.params),
213
- loadingText: !1
214
- }), r = y(e.value), i = D(), { errInfo: b } = i, d = y([]), m = M;
215
- i.inputEmit = m, S(
216
- () => r.value,
217
- (l) => {
218
- m("update:value", l);
219
- }
220
- );
221
- const p = (l, s) => {
222
- if (typeof l == "object" && typeof s == "object") {
223
- const u = JSON.stringify(l) === JSON.stringify(s);
224
- return u && (r.value = l), u;
225
- }
226
- return l === s;
227
- }, v = (l) => {
228
- const s = l.target.value, u = U(e, s, d, i), a = K(u);
229
- m("update:labels", a);
230
- };
231
- return E(() => {
232
- var l;
233
- t.value && !t.value.fieldMap && (t.value.fieldMap = {
234
- label: "Name",
235
- value: "Id",
236
- key: "Id"
237
- }), L(e.autoload, e, d, i, t.value, (l = t.value) == null ? void 0 : l.params);
238
- }), T(() => {
239
- J(e, i);
240
- }), (l, s) => (f(), g("div", oe, [
241
- w(o(Z), B({
242
- value: r.value,
243
- "onUpdate:value": s[0] || (s[0] = (u) => r.value = u),
244
- autocheck: !1,
245
- onChange: v,
246
- class: "w-full flex align-items flex-wrap mb-[-3px]"
247
- }, o(C)), {
248
- default: _(() => [
249
- d.value.length > 0 ? (f(!0), g(I, { key: 0 }, Q(d.value, (u) => {
250
- var a;
251
- return f(), g(I, {
252
- key: u.value
253
- }, [
254
- u.visible !== !1 ? (f(), j(o(ee), {
255
- key: 0,
256
- checked: p(u.value, e.value),
257
- value: u.value,
258
- class: G([
259
- ((a = o(b)) == null ? void 0 : a.errClass) === "error" ? "error !text-red-400" : "",
260
- "text-nowrap",
261
- "pb-1",
262
- c.wrap ? `w-1/${e.wrap}` : ""
263
- ])
264
- }, {
265
- default: _(() => [
266
- z(A(u.label), 1)
267
- ]),
268
- _: 2
269
- }, 1032, ["checked", "value", "class"])) : F("", !0)
270
- ], 64);
271
- }), 128)) : c.nodata ? (f(), g("div", ie, A(c.nodata), 1)) : F("", !0)
272
- ]),
273
- _: 1
274
- }, 16, ["value"])
275
- ]));
276
- }
277
- }), de = {
278
- key: 0,
279
- class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
280
- }, be = /* @__PURE__ */ V({
281
- inheritAttrs: !1,
282
- __name: "index",
283
- props: {
284
- ...q,
285
- value: {
286
- type: [String, Number, Array, null],
287
- default: void 0
288
- },
289
- /**
290
- * 自动选择第一个选项
291
- */
292
- selectFirst: {
293
- type: Boolean,
294
- default: !1
295
- },
296
- /**
297
- * 数据源OPTIONS的key
298
- */
299
- dataKey: {
300
- type: String,
301
- required: !1
302
- },
303
- /**
304
- * 是否显示全部选项
305
- */
306
- all: {
307
- type: Boolean,
308
- default: !1
309
- },
310
- /**
311
- * 自定义全部选项的值
312
- * 如果all为true,则显示全部选项
313
- * 未设置allValue,则默认[0, 1]
314
- */
315
- allValue: {
316
- type: [String, Number, Array],
317
- required: !1
318
- }
319
- },
320
- emits: ["change", "update:value", "update:labels"],
321
- setup(c, { emit: M }) {
322
- var l, s, u;
323
- const e = c, C = $(), t = y({
324
- ...e.url,
325
- url: ((l = e.url) == null ? void 0 : l.url) || "",
326
- fieldMap: e.fieldMap || ((s = e.url) == null ? void 0 : s.fieldMap),
327
- params: e.params || ((u = e.url) == null ? void 0 : u.params),
328
- loadingText: !1
329
- }), r = D(), { editorCtrl: i, errInfo: b, labelText: d } = r, m = y(void 0), p = M;
330
- r.inputEmit = p;
331
- const v = y([]);
332
- S(
333
- () => v.value,
334
- (a) => {
335
- a.length > 0 && P(e.value) && e.selectFirst ? (m.value = a[0].value, k(a[0].value)) : m.value = e.value === null ? void 0 : e.value;
336
- }
337
- );
338
- const h = y(C.placeholder);
339
- S(
340
- () => t.value.loading,
341
- (a) => {
342
- a ? h.value = "" : h.value || (h.value = "请选择" + d.value);
343
- },
344
- { immediate: !0 }
345
- );
346
- const x = y(e.value);
347
- S(
348
- () => m.value,
349
- (a) => {
350
- if (C.mode === "multiple" && P(a) && P(x.value)) {
351
- p("update:value", x.value);
352
- return;
353
- }
354
- p("update:value", a);
355
- }
356
- );
357
- const k = (a) => {
358
- const n = U(e, a, v, r), N = K(n);
359
- m.value = a, p("update:labels", N), p("change", a), b != null && b.value.errClass && i && R(i);
360
- };
361
- return E(() => {
362
- var a;
363
- if (t.value && !t.value.fieldMap && (t.value.fieldMap = {
364
- label: "Name",
365
- value: "Id",
366
- key: "Id"
367
- }), e.dataKey) {
368
- const n = JSON.parse(JSON.stringify(ue.getOptions(e.dataKey)));
369
- v.value = n;
370
- } else L(e.autoload, e, v, r, t.value, (a = t.value) == null ? void 0 : a.params);
371
- }), T(() => {
372
- J(e, r);
373
- }), (a, n) => {
374
- var N;
375
- return f(), g("div", null, [
376
- e.url && e.url.loading === !0 ? (f(), g("div", de, [
377
- w(o(re), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
378
- n[1] || (n[1] = H("span", null, "数据加载中...", -1))
379
- ])) : F("", !0),
380
- w(o(ae), B({
381
- class: [(N = o(b)) == null ? void 0 : N.errClass, "w-full"],
382
- value: m.value,
383
- "onUpdate:value": n[0] || (n[0] = (O) => m.value = O),
384
- "allow-clear": !0,
385
- onChange: k,
386
- placeholder: h.value,
387
- "label-in-value": !1
388
- }, o(C)), {
389
- default: _(() => [
390
- (f(!0), g(I, null, Q(v.value, (O) => (f(), g(I, {
391
- key: O.value
392
- }, [
393
- O.visible !== !1 ? (f(), j(o(le), {
394
- key: 0,
395
- value: O.value
396
- }, {
397
- default: _(() => [
398
- z(A(O.label), 1)
399
- ]),
400
- _: 2
401
- }, 1032, ["value"])) : F("", !0)
402
- ], 64))), 128))
403
- ]),
404
- _: 1
405
- }, 16, ["class", "value", "placeholder"])
406
- ]);
407
- };
408
- }
409
- });
410
- export {
411
- fe as _,
412
- me as a,
413
- ye as b,
414
- be as c
415
- };
@@ -1,109 +0,0 @@
1
- import { defineComponent as d, useAttrs as f, createElementBlock as u, openBlock as x, createVNode as e, withCtx as n, unref as o, mergeProps as r, renderSlot as p } from "vue";
2
- import { Button as _ } from "ant-design-vue";
3
- import { a as P, _ as k } from "./index-BEWJ_qAH.js";
4
- const C = /* @__PURE__ */ d({
5
- inheritAttrs: !1,
6
- __name: "index",
7
- props: {
8
- /**
9
- * 提示标题
10
- * @props
11
- * @name content
12
- * @type {string}
13
- */
14
- tiptext: String,
15
- /**
16
- * 提示显示位置
17
- * @props
18
- * @name placement
19
- * @type {string}
20
- * @default 'top'
21
- */
22
- placement: {
23
- type: String,
24
- default: "top"
25
- },
26
- /**
27
- * 内置图标属性设置
28
- * @props
29
- * @name iconProps
30
- * @type {object}
31
- * @summary 内置图标复杂属性设置,仅支持前置图标
32
- */
33
- iconProps: Object,
34
- /**
35
- * 默认使用框架图标
36
- * 其它图标请自定义
37
- * @props
38
- * @name icon
39
- * @type {string}
40
- */
41
- icon: String
42
- // /**
43
- // * 点击事件
44
- // * @props
45
- // * @name clickEvent
46
- // * @summary 格式 "空间名#事件名",空间名和事件名用#分隔,事件名用.分隔
47
- // * @type {string}
48
- // */
49
- // clickEvent: {
50
- // type: String
51
- // },
52
- // /**
53
- // * 点击传输数据
54
- // * @props
55
- // * @name data
56
- // * @summary 点击事件传输的默认数据
57
- // * @type {object|string}
58
- // */
59
- // data: {
60
- // type: [Object, String]
61
- // }
62
- },
63
- emits: [
64
- /**
65
- * 点击事件
66
- * @emits
67
- * @name click
68
- * @summary 图标按钮点击时触发的事件
69
- */
70
- "click"
71
- ],
72
- setup(i, { emit: l }) {
73
- const c = f(), t = i, a = l, m = () => {
74
- t.iconProps && t.iconProps.icons && (t.iconProps.iconIndex = (t.iconProps.iconIndex + 1) % t.iconProps.icons.length), a("click");
75
- };
76
- return (s, b) => (x(), u("div", null, [
77
- e(P, {
78
- title: t.tiptext,
79
- disabled: t.tiptext ? void 0 : "disabled",
80
- placement: i.placement
81
- }, {
82
- default: n(() => [
83
- e(o(_), r({ class: "px-[10px] py-[4px] flex items-center gap-1" }, o(c), { onClick: m }), {
84
- icon: n(() => [
85
- p(s.$slots, "icon", {}, () => [
86
- e(k, r({
87
- icon: t.icon,
88
- class: [
89
- o(c).type === "primary" ? "ant-btn-primary" : "",
90
- "cursor-pointer w-[17px] h-[17px] mx-auto"
91
- ],
92
- clickable: ""
93
- }, t.iconProps), null, 16, ["icon", "class"])
94
- ])
95
- ]),
96
- default: n(() => [
97
- p(s.$slots, "default")
98
- ]),
99
- _: 3
100
- }, 16)
101
- ]),
102
- _: 3
103
- }, 8, ["title", "disabled", "placement"])
104
- ]));
105
- }
106
- });
107
- export {
108
- C as _
109
- };
@@ -1,107 +0,0 @@
1
- import { defineComponent as A, provide as B, ref as S, watch as p, onMounted as F, createBlock as i, openBlock as r, unref as a, withCtx as t, createElementVNode as N, renderSlot as V, createVNode as b, createCommentVNode as d, createTextVNode as u, toDisplayString as f } from "vue";
2
- import { _ as v } from "./index-BoKIa2sr.js";
3
- import { Modal as E, Space as M } from "ant-design-vue";
4
- import "@skyfox2000/fapi";
5
- import { ProviderKeys as $, onFormClose as D, onFormSave as K, onFormSaveAs as P } from "@skyfox2000/webbase";
6
- import "./index-BEWJ_qAH.js";
7
- const U = { class: "overflow-y-auto w-full h-full" }, J = /* @__PURE__ */ A({
8
- __name: "index",
9
- props: {
10
- saveText: {},
11
- saveAsText: {},
12
- cancelText: {},
13
- editorCtrl: {},
14
- dialogSave: { type: Function },
15
- width: {},
16
- full: { type: Boolean },
17
- open: { type: Boolean }
18
- },
19
- emits: ["update:open"],
20
- setup(C, { emit: T }) {
21
- const n = C, e = n.editorCtrl;
22
- B($.EditorControl, e);
23
- const l = S(n.open ?? !1), h = T, k = S(n.width ?? 430);
24
- p(
25
- () => e == null ? void 0 : e.visible.value,
26
- (o) => {
27
- l.value = o ?? !1;
28
- }
29
- ), p(
30
- () => n.open,
31
- (o) => {
32
- l.value = o;
33
- }
34
- ), p(
35
- () => l.value,
36
- (o) => {
37
- h("update:open", o), o || m();
38
- }
39
- ), F(() => {
40
- l.value = (e == null ? void 0 : e.visible.value) ?? !1;
41
- });
42
- const x = () => {
43
- n.dialogSave || e && K(e);
44
- }, _ = () => {
45
- e && P(e);
46
- }, m = () => {
47
- e ? D(e) : l.value = !1;
48
- };
49
- return (o, c) => (r(), i(a(E), {
50
- open: l.value,
51
- "onUpdate:open": c[0] || (c[0] = (s) => l.value = s),
52
- wrapClassName: "modal mx-auto min-w-[430px] " + (o.full ? "full-modal w-full" : ""),
53
- width: k.value
54
- }, {
55
- footer: t(() => [
56
- b(a(M), null, {
57
- default: t(() => {
58
- var s, y, g, w;
59
- return [
60
- o.cancelText !== "" ? (r(), i(a(v), {
61
- key: 0,
62
- onClick: m
63
- }, {
64
- default: t(() => [
65
- u(f(o.cancelText ?? "取消"), 1)
66
- ]),
67
- _: 1
68
- })) : d("", !0),
69
- o.saveAsText !== "" && ((s = a(e)) == null ? void 0 : s.saveAsBtnVisible) !== !1 ? (r(), i(a(v), {
70
- key: 1,
71
- onClick: _,
72
- type: "primary",
73
- loading: (y = a(e)) == null ? void 0 : y.isFormSaving.value
74
- }, {
75
- default: t(() => [
76
- u(f(o.saveAsText ?? "另存为"), 1)
77
- ]),
78
- _: 1
79
- }, 8, ["loading"])) : d("", !0),
80
- o.saveText !== "" && ((g = a(e)) == null ? void 0 : g.saveBtnVisible) !== !1 ? (r(), i(a(v), {
81
- key: 2,
82
- onClick: x,
83
- type: "primary",
84
- loading: (w = a(e)) == null ? void 0 : w.isFormSaving.value
85
- }, {
86
- default: t(() => [
87
- u(f(o.saveText ?? "保存"), 1)
88
- ]),
89
- _: 1
90
- }, 8, ["loading"])) : d("", !0)
91
- ];
92
- }),
93
- _: 1
94
- })
95
- ]),
96
- default: t(() => [
97
- N("div", U, [
98
- V(o.$slots, "default")
99
- ])
100
- ]),
101
- _: 3
102
- }, 8, ["open", "wrapClassName", "width"]));
103
- }
104
- });
105
- export {
106
- J as _
107
- };