@skyfox2000/webui 1.5.7 → 1.5.10
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/lib/assets/modules/{baseLayout-DfTxHOFc.js → baseLayout-BuQjrozB.js} +9 -9
- package/lib/assets/modules/{file-upload-DTOdV5vM.js → file-upload-DcusqXDb.js} +5 -5
- package/lib/assets/modules/{index-M1qERbea.js → index-BlQB5KSU.js} +2 -2
- package/lib/assets/modules/{index-BwMaOrJT.js → index-CW_ZCHWs.js} +1 -1
- package/lib/assets/modules/index-CekzHbWp.js +114 -0
- package/lib/assets/modules/{menuTabs-DWaBSRNr.js → menuTabs-BYSjomB7.js} +44 -36
- package/lib/assets/modules/{toolIcon-BYnHhAy-.js → toolIcon-D4vAp0qA.js} +1 -1
- package/lib/assets/modules/{upload-template-BKm9mFq8.js → upload-template-NU0Bpg4N.js} +2056 -2176
- package/lib/assets/modules/uploadList-ENSsTfpD.js +472 -0
- package/lib/const/options.d.ts +6 -20
- package/lib/const/stores.d.ts +11 -0
- package/lib/es/AceEditor/index.js +70 -70
- package/lib/es/BasicLayout/index.js +6 -6
- package/lib/es/Error403/index.js +1 -1
- package/lib/es/Error404/index.js +1 -1
- package/lib/es/ExcelForm/index.js +16 -16
- package/lib/es/MenuLayout/index.js +6 -6
- package/lib/es/TemplateFile/index.js +5 -5
- package/lib/es/UploadForm/index.js +5 -5
- package/lib/index.d.ts +2 -1
- package/lib/locales/default.d.ts +137 -115
- package/lib/utils/tools.d.ts +1 -0
- package/lib/webui.css +1 -1
- package/lib/webui.es.js +1692 -1547
- package/package.json +1 -1
- package/src/components/content/dialog/index.vue +1 -0
- package/src/components/content/form/formItem.vue +3 -2
- package/src/components/content/search/index.vue +1 -0
- package/src/components/content/search/searchItem.vue +3 -2
- package/src/components/form/aceEditor/index.vue +5 -3
- package/src/components/form/cascader/index.vue +5 -3
- package/src/components/form/checkbox/index.vue +1 -1
- package/src/components/form/datePicker/index.vue +2 -1
- package/src/components/form/input/index.vue +1 -1
- package/src/components/form/input/inputNumber.vue +3 -1
- package/src/components/form/input/inputPassword.vue +3 -1
- package/src/components/form/propEditor/index.vue +8 -3
- package/src/components/form/radio/index.vue +2 -1
- package/src/components/form/radio/radioStatus.vue +2 -1
- package/src/components/form/switch/index.vue +3 -1
- package/src/components/form/textarea/index.vue +1 -1
- package/src/components/form/timePicker/index.vue +4 -1
- package/src/components/form/treeSelect/index.vue +3 -1
- package/src/components/form/upload/imageList.vue +8 -6
- package/src/components/form/upload/uploadList.vue +6 -5
- package/src/components/layout/datetime/index.vue +15 -4
- package/src/components/layout/header/language.vue +2 -0
- package/src/const/options.ts +76 -52
- package/src/const/stores.ts +58 -0
- package/src/index.ts +2 -0
- package/src/locales/default.ts +145 -123
- package/src/locales/en-US.json +320 -0
- package/src/locales/index.ts +109 -39
- package/src/stores/hostInfo.ts +2 -19
- package/src/stores/userInfo.ts +2 -30
- package/src/utils/options.ts +2 -2
- package/src/utils/tools.ts +88 -83
- package/lib/assets/modules/index-BDoBUrYA.js +0 -114
- package/lib/assets/modules/uploadList-CHvr6Hp1.js +0 -472
package/src/utils/tools.ts
CHANGED
|
@@ -260,89 +260,94 @@ export const onColumnVisibleChanged = (column: any, checked: boolean) => {
|
|
|
260
260
|
* @param click参数规范
|
|
261
261
|
* - <T>(pageCtrl: PageData<T>) => void
|
|
262
262
|
*/
|
|
263
|
-
export const defaultTools: IconTool[] = [
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
263
|
+
export const defaultTools: IconTool[] = [];
|
|
264
|
+
|
|
265
|
+
export const initTools = () => {
|
|
266
|
+
if (defaultTools.length > 0) return;
|
|
267
|
+
defaultTools.push(...[
|
|
268
|
+
{
|
|
269
|
+
key: 'Reload',
|
|
270
|
+
label: $t('webui.utils.tools.refreshTable'),
|
|
271
|
+
icon: 'icon-reload',
|
|
272
|
+
click: onReloadClick,
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
key: 'Query',
|
|
276
|
+
label: $t('webui.utils.tools.expandSearch'),
|
|
277
|
+
labels: [$t('webui.utils.tools.expandSearch'), $t('webui.utils.tools.collapseSearch')],
|
|
278
|
+
icon: 'icon-search',
|
|
279
|
+
iconStatus: 0,
|
|
280
|
+
click: onSearchClick,
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
key: 'RowHeight',
|
|
284
|
+
label: $t('webui.utils.tools.rowHeight'),
|
|
285
|
+
icon: 'icon-row-height',
|
|
286
|
+
click: onRowHeightClick,
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
key: 'tool.multiple.checkbox',
|
|
290
|
+
label: $t('webui.utils.tools.showCheckbox'),
|
|
291
|
+
labels: [$t('webui.utils.tools.showCheckbox'), $t('webui.utils.tools.hideCheckbox')],
|
|
292
|
+
icon: 'icon-checkbox',
|
|
293
|
+
click: onCheckboxClick,
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
key: 'tool.expand.rows',
|
|
297
|
+
label: $t('webui.utils.tools.expandRows'),
|
|
298
|
+
labels: [$t('webui.utils.tools.expandRows'), $t('webui.utils.tools.collapseRows')],
|
|
299
|
+
icon: 'icon-row-collapse',
|
|
300
|
+
iconStatus: 0,
|
|
301
|
+
icons: ['icon-row-collapse', 'icon-row-expand'],
|
|
302
|
+
click: onAllRowExpandClick,
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
key: 'tool.export.excel',
|
|
306
|
+
label: $t('webui.utils.tools.exportExcel'),
|
|
307
|
+
icon: 'icon-export-excel',
|
|
308
|
+
children: [
|
|
309
|
+
{
|
|
310
|
+
key: 'tool.export.excel.all',
|
|
311
|
+
label: $t('webui.utils.tools.exportAllRecords'),
|
|
312
|
+
click: onExportExcelClick,
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
key: 'tool.export.excel.selected',
|
|
316
|
+
label: $t('webui.utils.tools.exportSelectedRecords'),
|
|
317
|
+
click: onExportExcelClick,
|
|
318
|
+
},
|
|
319
|
+
],
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
key: 'tool.export.pdf',
|
|
323
|
+
label: $t('webui.utils.tools.exportPDF'),
|
|
324
|
+
icon: 'icon-export-pdf',
|
|
325
|
+
children: [
|
|
326
|
+
{
|
|
327
|
+
key: 'tool.export.pdf.selected',
|
|
328
|
+
label: $t('webui.utils.tools.exportSelectedRecords'),
|
|
329
|
+
click: onExportPDFClick,
|
|
330
|
+
},
|
|
331
|
+
],
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
key: 'TableHeadset',
|
|
335
|
+
label: $t('webui.utils.tools.tableHeaderSettings'),
|
|
336
|
+
icon: 'icon-headset',
|
|
337
|
+
dropdown: 'headset',
|
|
338
|
+
click: () => { }, // 不设置点击事件
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
key: 'Fullscreen',
|
|
342
|
+
label: $t('webui.utils.tools.setFullscreen'),
|
|
343
|
+
labels: [$t('webui.utils.tools.setFullscreen'), $t('webui.utils.tools.exitFullscreen')],
|
|
344
|
+
icon: 'icon-fullscreen',
|
|
345
|
+
iconStatus: 0,
|
|
346
|
+
icons: ['icon-fullscreen', 'icon-exitscreen'],
|
|
347
|
+
click: onFullscreenClick,
|
|
348
|
+
},
|
|
349
|
+
])
|
|
350
|
+
};
|
|
346
351
|
|
|
347
352
|
/**
|
|
348
353
|
* 工具栏工厂
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { defineComponent as B, provide as N, ref as y, watch as p, onMounted as $, createBlock as n, openBlock as r, unref as a, withCtx as s, createElementVNode as V, renderSlot as A, createVNode as x, createCommentVNode as d, createTextVNode as m, toDisplayString as u } from "vue";
|
|
2
|
-
import { _ as v } from "./index-BwMaOrJT.js";
|
|
3
|
-
import { Modal as D, Space as _ } from "ant-design-vue";
|
|
4
|
-
import "@skyfox2000/fapi";
|
|
5
|
-
import { P as E, e as M, b as P, d as K } from "./upload-template-BKm9mFq8.js";
|
|
6
|
-
import "@skyfox2000/microbase";
|
|
7
|
-
import "vue-m-message";
|
|
8
|
-
import "async-validator";
|
|
9
|
-
import "dayjs";
|
|
10
|
-
import "vue-draggable-next";
|
|
11
|
-
const U = { class: "overflow-y-auto w-full h-full" }, R = /* @__PURE__ */ B({
|
|
12
|
-
__name: "index",
|
|
13
|
-
props: {
|
|
14
|
-
saveText: {},
|
|
15
|
-
saveAsText: {},
|
|
16
|
-
cancelText: {},
|
|
17
|
-
editorCtrl: {},
|
|
18
|
-
dialogSave: { type: Function },
|
|
19
|
-
dialogSaveAs: { type: Function },
|
|
20
|
-
width: {},
|
|
21
|
-
full: { type: Boolean },
|
|
22
|
-
open: { type: Boolean }
|
|
23
|
-
},
|
|
24
|
-
emits: ["update:open"],
|
|
25
|
-
setup(C, { emit: T }) {
|
|
26
|
-
const l = C, o = l.editorCtrl;
|
|
27
|
-
N(E.EditorControl, o);
|
|
28
|
-
const t = y(l.open ?? !1), b = T, h = y(l.width ?? 430);
|
|
29
|
-
p(
|
|
30
|
-
() => o == null ? void 0 : o.visible.value,
|
|
31
|
-
(e) => {
|
|
32
|
-
t.value = e ?? !1;
|
|
33
|
-
}
|
|
34
|
-
), p(
|
|
35
|
-
() => l.open,
|
|
36
|
-
(e) => {
|
|
37
|
-
t.value = e;
|
|
38
|
-
}
|
|
39
|
-
), p(
|
|
40
|
-
() => t.value,
|
|
41
|
-
(e) => {
|
|
42
|
-
b("update:open", e), e || f();
|
|
43
|
-
}
|
|
44
|
-
), $(() => {
|
|
45
|
-
t.value = (o == null ? void 0 : o.visible.value) ?? !1;
|
|
46
|
-
});
|
|
47
|
-
const k = () => {
|
|
48
|
-
l.dialogSave ? l.dialogSave() : o && P(o);
|
|
49
|
-
}, F = () => {
|
|
50
|
-
l.dialogSaveAs ? l.dialogSaveAs() : o && K(o);
|
|
51
|
-
}, f = () => {
|
|
52
|
-
o ? M(o) : t.value = !1;
|
|
53
|
-
};
|
|
54
|
-
return (e, c) => (r(), n(a(D), {
|
|
55
|
-
open: t.value,
|
|
56
|
-
"onUpdate:open": c[0] || (c[0] = (i) => t.value = i),
|
|
57
|
-
wrapClassName: "modal mx-auto min-w-[430px] " + (e.full ? "full-modal w-full" : ""),
|
|
58
|
-
width: h.value
|
|
59
|
-
}, {
|
|
60
|
-
footer: s(() => [
|
|
61
|
-
A(e.$slots, "footer", {}, () => [
|
|
62
|
-
x(a(_), null, {
|
|
63
|
-
default: s(() => {
|
|
64
|
-
var i, g, w, S;
|
|
65
|
-
return [
|
|
66
|
-
e.cancelText !== "" ? (r(), n(a(v), {
|
|
67
|
-
key: 0,
|
|
68
|
-
onClick: f
|
|
69
|
-
}, {
|
|
70
|
-
default: s(() => [
|
|
71
|
-
m(u(e.cancelText ?? e.$t("webui.common.cancel")), 1)
|
|
72
|
-
]),
|
|
73
|
-
_: 1
|
|
74
|
-
})) : d("", !0),
|
|
75
|
-
e.saveAsText !== "" && ((i = a(o)) == null ? void 0 : i.saveAsBtnVisible) !== !1 ? (r(), n(a(v), {
|
|
76
|
-
key: 1,
|
|
77
|
-
onClick: F,
|
|
78
|
-
type: "primary",
|
|
79
|
-
loading: (g = a(o)) == null ? void 0 : g.isFormSaving.value
|
|
80
|
-
}, {
|
|
81
|
-
default: s(() => [
|
|
82
|
-
m(u(e.saveAsText ?? e.$t("webui.common.saveAs")), 1)
|
|
83
|
-
]),
|
|
84
|
-
_: 1
|
|
85
|
-
}, 8, ["loading"])) : d("", !0),
|
|
86
|
-
e.saveText !== "" && ((w = a(o)) == null ? void 0 : w.saveBtnVisible) !== !1 ? (r(), n(a(v), {
|
|
87
|
-
key: 2,
|
|
88
|
-
onClick: k,
|
|
89
|
-
type: "primary",
|
|
90
|
-
loading: (S = a(o)) == null ? void 0 : S.isFormSaving.value
|
|
91
|
-
}, {
|
|
92
|
-
default: s(() => [
|
|
93
|
-
m(u(e.saveText ?? e.$t("webui.common.save")), 1)
|
|
94
|
-
]),
|
|
95
|
-
_: 1
|
|
96
|
-
}, 8, ["loading"])) : d("", !0)
|
|
97
|
-
];
|
|
98
|
-
}),
|
|
99
|
-
_: 1
|
|
100
|
-
})
|
|
101
|
-
])
|
|
102
|
-
]),
|
|
103
|
-
default: s(() => [
|
|
104
|
-
V("div", U, [
|
|
105
|
-
A(e.$slots, "default")
|
|
106
|
-
])
|
|
107
|
-
]),
|
|
108
|
-
_: 3
|
|
109
|
-
}, 8, ["open", "wrapClassName", "width"]));
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
export {
|
|
113
|
-
R as _
|
|
114
|
-
};
|