@skyfox2000/webui 1.3.19 → 1.3.20

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 (129) hide show
  1. package/lib/AceEditor.d.ts +1 -0
  2. package/lib/BasicLayout.d.ts +1 -0
  3. package/lib/Error403.d.ts +1 -0
  4. package/lib/Error404.d.ts +1 -0
  5. package/lib/ExcelForm.d.ts +1 -0
  6. package/lib/MenuLayout.d.ts +1 -0
  7. package/lib/UploadForm.d.ts +1 -0
  8. package/lib/assets/modules/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  9. package/lib/assets/modules/baseLayout-B9dSxkYo.js +79 -0
  10. package/lib/assets/modules/file-upload-JBIvw5Xx.js +204 -0
  11. package/lib/assets/modules/index-BMkaOjBS.js +380 -0
  12. package/lib/assets/modules/index-BOYtm8ib.js +112 -0
  13. package/lib/assets/modules/index-BkChvyed.js +109 -0
  14. package/lib/assets/modules/menuTabs-BFPjaQRI.js +671 -0
  15. package/lib/assets/modules/toolIcon-XOgjdQdO.js +50 -0
  16. package/lib/assets/modules/uploadList-BedljASx.js +2407 -0
  17. package/lib/assets/modules/uploadList-CW7OIDS3.js +382 -0
  18. package/lib/components/common/alert/index.vue.d.ts +13 -0
  19. package/lib/components/common/button/index.vue.d.ts +41 -0
  20. package/lib/components/common/icon/appicon.vue.d.ts +11 -0
  21. package/lib/components/common/icon/fullscreen.vue.d.ts +3 -0
  22. package/lib/components/common/icon/helper.vue.d.ts +23 -0
  23. package/lib/components/common/icon/index.vue.d.ts +243 -0
  24. package/lib/components/common/icon/layoutIcon.vue.d.ts +43 -0
  25. package/lib/components/common/icon/projectIcon.vue.d.ts +59 -0
  26. package/lib/components/common/icon/toolIcon.vue.d.ts +43 -0
  27. package/lib/components/common/index.d.ts +22 -0
  28. package/lib/components/common/loading/index.vue.d.ts +3 -0
  29. package/lib/components/common/tooltip/index.vue.d.ts +21 -0
  30. package/lib/components/content/dialog/index.vue.d.ts +35 -0
  31. package/lib/components/content/drawer/index.vue.d.ts +28 -0
  32. package/lib/components/content/form/formItem.vue.d.ts +28 -0
  33. package/lib/components/content/form/index.vue.d.ts +25 -0
  34. package/lib/components/content/index.d.ts +22 -0
  35. package/lib/components/content/search/index.vue.d.ts +32 -0
  36. package/lib/components/content/search/searchItem.vue.d.ts +23 -0
  37. package/lib/components/content/table/index.vue.d.ts +127 -0
  38. package/lib/components/content/table/tableOperate.vue.d.ts +18 -0
  39. package/lib/components/content/toolbar/icontool.vue.d.ts +7 -0
  40. package/lib/components/content/toolbar/index.vue.d.ts +18 -0
  41. package/lib/components/content/tree/index.vue.d.ts +46 -0
  42. package/lib/components/form/aceEditor/aceConfig.d.ts +8 -0
  43. package/lib/components/form/autoComplete/index.vue.d.ts +101 -0
  44. package/lib/components/form/cascader/index.vue.d.ts +80 -0
  45. package/lib/components/form/checkbox/index.vue.d.ts +100 -0
  46. package/lib/components/form/datePicker/index.vue.d.ts +6 -0
  47. package/lib/components/form/index.d.ts +41 -0
  48. package/lib/components/form/input/index.vue.d.ts +29 -0
  49. package/lib/components/form/input/inputIcon.vue.d.ts +10 -0
  50. package/lib/components/form/input/inputNumber.vue.d.ts +3 -0
  51. package/lib/components/form/input/inputPassword.vue.d.ts +3 -0
  52. package/lib/components/form/propEditor/index.vue.d.ts +15 -0
  53. package/lib/components/form/radio/index.vue.d.ts +105 -0
  54. package/lib/components/form/radio/radioStatus.vue.d.ts +31 -0
  55. package/lib/components/form/rangePicker/index.vue.d.ts +16 -0
  56. package/lib/components/form/select/index.vue.d.ts +119 -0
  57. package/lib/components/form/switch/index.vue.d.ts +76 -0
  58. package/lib/components/form/textarea/index.vue.d.ts +3 -0
  59. package/lib/components/form/timePicker/index.vue.d.ts +6 -0
  60. package/lib/components/form/transfer/index.vue.d.ts +38 -0
  61. package/lib/components/form/transfer/transferTable.vue.d.ts +38 -0
  62. package/lib/components/form/treeSelect/index.vue.d.ts +47 -0
  63. package/lib/components/form/upload/uploadList.vue.d.ts +488 -0
  64. package/lib/components/index.d.ts +4 -0
  65. package/lib/components/layout/breadcrumb/index.vue.d.ts +3 -0
  66. package/lib/components/layout/content/index.vue.d.ts +22 -0
  67. package/lib/components/layout/datetime/index.vue.d.ts +3 -0
  68. package/lib/components/layout/header/headerExits.vue.d.ts +3 -0
  69. package/lib/components/layout/header/index.vue.d.ts +3 -0
  70. package/lib/components/layout/header/user.vue.d.ts +3 -0
  71. package/lib/components/layout/index.d.ts +14 -0
  72. package/lib/components/layout/menu/index.vue.d.ts +6 -0
  73. package/lib/components/layout/menu/menuTabs.vue.d.ts +3 -0
  74. package/lib/const/options.d.ts +32 -0
  75. package/lib/directives/enter-submit.d.ts +4 -0
  76. package/lib/directives/index.d.ts +2 -0
  77. package/lib/directives/permission.d.ts +5 -0
  78. package/lib/es/AceEditor/index.js +167 -0
  79. package/lib/es/BasicLayout/index.js +54 -0
  80. package/lib/es/Error403/index.js +39 -0
  81. package/lib/es/Error404/index.js +39 -0
  82. package/lib/es/ExcelForm/index.js +491 -0
  83. package/lib/es/MenuLayout/index.js +54 -0
  84. package/lib/es/UploadForm/index.js +110 -0
  85. package/lib/index.d.ts +46 -0
  86. package/lib/router/index.d.ts +15 -0
  87. package/lib/stores/appInfo.d.ts +31 -0
  88. package/lib/stores/hostInfo.d.ts +11 -0
  89. package/lib/stores/pageInfo.d.ts +18 -0
  90. package/lib/stores/pinia.d.ts +3 -0
  91. package/lib/stores/settingInfo.d.ts +8 -0
  92. package/lib/stores/userInfo.d.ts +25 -0
  93. package/lib/typings/data.d.ts +80 -0
  94. package/lib/typings/form.d.ts +206 -0
  95. package/lib/typings/menu.d.ts +7 -0
  96. package/lib/typings/option.d.ts +209 -0
  97. package/lib/typings/page.d.ts +70 -0
  98. package/lib/typings/table.d.ts +181 -0
  99. package/lib/typings/tools.d.ts +130 -0
  100. package/lib/typings/tree.d.ts +72 -0
  101. package/lib/typings/upload.d.ts +161 -0
  102. package/lib/typings/urls.d.ts +69 -0
  103. package/lib/utils/cache.d.ts +23 -0
  104. package/lib/utils/data.d.ts +6 -0
  105. package/lib/utils/download.d.ts +6 -0
  106. package/lib/utils/eventbus.d.ts +16 -0
  107. package/lib/utils/excel-preview.d.ts +24 -0
  108. package/lib/utils/excel-view.d.ts +25 -0
  109. package/lib/utils/export-table.d.ts +12 -0
  110. package/lib/utils/file-upload.d.ts +17 -0
  111. package/lib/utils/form-csv.d.ts +18 -0
  112. package/lib/utils/form-excel.d.ts +36 -0
  113. package/lib/utils/form-validate.d.ts +29 -0
  114. package/lib/utils/form.d.ts +9 -0
  115. package/lib/utils/icon-loader.d.ts +125 -0
  116. package/lib/utils/isEmpty.d.ts +1 -0
  117. package/lib/utils/main-openapis.d.ts +8 -0
  118. package/lib/utils/menu.d.ts +6 -0
  119. package/lib/utils/options.d.ts +7 -0
  120. package/lib/utils/page.d.ts +30 -0
  121. package/lib/utils/table.d.ts +21 -0
  122. package/lib/utils/tools.d.ts +18 -0
  123. package/lib/utils/tree.d.ts +3 -0
  124. package/lib/vite-env.d.ts +8 -0
  125. package/lib/webui.css +1 -0
  126. package/lib/webui.es.js +2345 -0
  127. package/package.json +1 -1
  128. package/.cursorignore +0 -8
  129. package/scripts/userInput.py +0 -2
@@ -0,0 +1,167 @@
1
+ import { defineComponent as F, defineAsyncComponent as M, ref as m, watch as V, onMounted as J, createElementBlock as x, openBlock as p, Fragment as K, createElementVNode as v, createVNode as _, toDisplayString as W, unref as i, createBlock as P, withKeys as f, normalizeClass as N, withModifiers as w, withCtx as z, createCommentVNode as L } from "vue";
2
+ import "ant-design-vue";
3
+ import { _ as q } from "../../assets/modules/toolIcon-XOgjdQdO.js";
4
+ import "@skyfox2000/fapi";
5
+ import "../../assets/modules/uploadList-BedljASx.js";
6
+ import "@skyfox2000/microbase";
7
+ import "vue-m-message";
8
+ import "async-validator";
9
+ import "dayjs";
10
+ import { _ as D } from "../../assets/modules/index-BOYtm8ib.js";
11
+ import "vue-draggable-next";
12
+ const h = async (s) => window.ace ? window.ace : new Promise((l, t) => {
13
+ const o = document.createElement("script");
14
+ o.src = `${s}ace/ace.js`, o.async = !0, o.onload = () => {
15
+ window.ace.config.set("basePath", `${s}ace/`);
16
+ const n = document.createElement("script");
17
+ n.src = `${s}ace/ext-language_tools.js`, n.async = !0, n.onload = () => {
18
+ l(window.ace);
19
+ }, n.onerror = () => {
20
+ t(new Error("Failed to load language tools extension"));
21
+ }, document.head.appendChild(n);
22
+ }, o.onerror = () => {
23
+ t(new Error("Failed to load Ace editor"));
24
+ }, document.head.appendChild(o);
25
+ }), Q = async (s, l) => {
26
+ const t = await h(s), o = `${s}ace/mode-${l}.js`, n = `${s}ace/worker-${l}.js`;
27
+ if (!document.querySelector(`script[src="${o}"]`)) {
28
+ const r = document.createElement("script");
29
+ r.src = o, r.async = !0, document.head.appendChild(r), await new Promise((a) => {
30
+ r.onload = a, r.onerror = a;
31
+ });
32
+ }
33
+ t.config.setModuleUrl(`ace/mode/${l}`, o), t.config.setModuleUrl(`ace/mode/${l}_worker`, n);
34
+ }, R = async (s, l) => {
35
+ const t = await h(s), o = `${s}ace/theme-${l}.js`;
36
+ if (!document.querySelector(`script[src="${o}"]`)) {
37
+ const n = document.createElement("script");
38
+ n.src = o, n.async = !0, document.head.appendChild(n), await new Promise((r) => {
39
+ n.onload = r, n.onerror = r;
40
+ });
41
+ }
42
+ t.config.setModuleUrl(`ace/theme/${l}`, o);
43
+ }, T = { class: "w-full overflow-hidden rounded-md border-1 border-solid border-gray-300" }, G = { class: "w-full h-[30px] bg-[#ccc] relative flex items-center justify-between px-2" }, H = { class: "flex-1 overflow-hidden" }, I = {
44
+ key: 1,
45
+ class: "h-[500px] w-[99.3%] flex justify-center items-center border-1 border-solid border-gray-200"
46
+ }, $ = "github", ie = /* @__PURE__ */ F({
47
+ __name: "index",
48
+ props: {
49
+ value: {},
50
+ baseUrl: {},
51
+ lang: {}
52
+ },
53
+ emits: ["update:value"],
54
+ setup(s, { emit: l }) {
55
+ const t = s, o = t.baseUrl.endsWith("/") ? t.baseUrl : t.baseUrl + "/", n = M(() => h(o).then(() => import("vue3-ace-editor").then((c) => c.VAceEditor))), r = t.lang ?? "json", a = m(""), b = t.value ? "h-[240px]" : "h-[100px]", S = {
56
+ useWorker: !0,
57
+ showPrintMargin: !1,
58
+ highlightActiveLine: !0,
59
+ highlightSelectedWord: !0,
60
+ tabSize: 3,
61
+ fontSize: 10,
62
+ wrap: !0,
63
+ readOnly: !1
64
+ }, g = m({
65
+ ...S
66
+ }), k = l, C = () => {
67
+ r === "json" ? A() && k("update:value", JSON.parse(a.value)) : k("update:value", a.value);
68
+ }, A = () => {
69
+ if (a.value) {
70
+ let e = a.value;
71
+ const u = /(\w+)(?=\s*:)/g;
72
+ e = e.replace(u, '"$1"');
73
+ const U = /'([^']*)'/g;
74
+ e = e.replace(U, '"$1"');
75
+ try {
76
+ const E = JSON.parse(e), B = JSON.stringify(E, null, 3);
77
+ return a.value = B, !0;
78
+ } catch {
79
+ }
80
+ }
81
+ return !1;
82
+ }, j = () => {
83
+ t.value && typeof t.value == "object" ? a.value = JSON.stringify(t.value, null, 3) : a.value = t.value ?? "";
84
+ };
85
+ V(
86
+ () => t.value,
87
+ (c, e) => {
88
+ c !== e && j();
89
+ }
90
+ );
91
+ const d = m(!1), y = m(!1), O = () => {
92
+ d.value = !d.value;
93
+ };
94
+ return J(async () => {
95
+ try {
96
+ await h(o), await Promise.all([R(o, $), Q(o, r)]), y.value = !0, j(), g.value = {
97
+ ...S
98
+ // TODO 会提示拼写错误
99
+ // enableBasicAutocompletion: true,
100
+ // enableLiveAutocompletion: true,
101
+ // enableSnippets: true,
102
+ };
103
+ } catch (c) {
104
+ console.error("Failed to load Ace editor:", c);
105
+ }
106
+ }), (c, e) => (p(), x(K, null, [
107
+ v("div", T, [
108
+ v("div", G, [
109
+ v("div", null, W(i(r).toUpperCase()), 1),
110
+ _(i(q), {
111
+ icon: "icon-fullscreen",
112
+ clickable: "",
113
+ class: "w-4 h-4 text-[12px]",
114
+ onClick: O
115
+ })
116
+ ]),
117
+ v("div", H, [
118
+ y.value ? (p(), P(i(n), {
119
+ key: 0,
120
+ class: N([i(b)]),
121
+ value: a.value,
122
+ "onUpdate:value": e[0] || (e[0] = (u) => a.value = u),
123
+ lang: i(r),
124
+ theme: $,
125
+ options: g.value,
126
+ onBlur: C,
127
+ onKeyup: e[1] || (e[1] = f(w(() => {
128
+ }, ["stop"]), ["enter", "native"])),
129
+ onKeydown: e[2] || (e[2] = f(w(() => {
130
+ }, ["stop"]), ["enter", "native"]))
131
+ }, null, 8, ["class", "value", "lang", "options"])) : (p(), x("div", {
132
+ key: 1,
133
+ class: N([i(b), "flex justify-center items-center"])
134
+ }, "加载编辑器中...", 2))
135
+ ])
136
+ ]),
137
+ _(i(D), {
138
+ title: "代码编辑器",
139
+ open: d.value,
140
+ "onUpdate:open": e[6] || (e[6] = (u) => d.value = u),
141
+ width: 680,
142
+ footer: null
143
+ }, {
144
+ default: z(() => [
145
+ d.value && y.value ? (p(), P(i(n), {
146
+ key: 0,
147
+ class: "h-[500px] w-[99.3%] border-1 border-solid border-gray-200",
148
+ value: a.value,
149
+ "onUpdate:value": e[3] || (e[3] = (u) => a.value = u),
150
+ lang: i(r),
151
+ theme: $,
152
+ options: g.value,
153
+ onBlur: C,
154
+ onKeyup: e[4] || (e[4] = f(w(() => {
155
+ }, ["stop"]), ["enter", "native"])),
156
+ onKeydown: e[5] || (e[5] = f(w(() => {
157
+ }, ["stop"]), ["enter", "native"]))
158
+ }, null, 8, ["value", "lang", "options"])) : d.value ? (p(), x("div", I, " 加载编辑器中... ")) : L("", !0)
159
+ ]),
160
+ _: 1
161
+ }, 8, ["open"])
162
+ ], 64));
163
+ }
164
+ });
165
+ export {
166
+ ie as default
167
+ };
@@ -0,0 +1,54 @@
1
+ import { defineComponent as f, ref as d, watch as _, onMounted as v, resolveComponent as h, createBlock as o, openBlock as t, withCtx as s, createElementVNode as C, normalizeClass as x, createVNode as w, KeepAlive as y, unref as n, resolveDynamicComponent as I } from "vue";
2
+ import { _ as g } from "../../assets/modules/baseLayout-B9dSxkYo.js";
3
+ import { ad as A, a as S } from "../../assets/modules/uploadList-BedljASx.js";
4
+ import "@skyfox2000/microbase";
5
+ import "@skyfox2000/fapi";
6
+ import b from "vue-m-message";
7
+ import "async-validator";
8
+ import "dayjs";
9
+ import "ant-design-vue";
10
+ import "vue-draggable-next";
11
+ const j = /* @__PURE__ */ f({
12
+ __name: "basicLayout",
13
+ props: {
14
+ routes: {}
15
+ },
16
+ setup(a) {
17
+ const l = a, e = A(), p = S(), r = d("h-[calc(100vh-80px)]");
18
+ return _(
19
+ () => p.fullscreen,
20
+ (c) => {
21
+ r.value = c ? "h-[calc(100vh-40px)]" : "h-[calc(100vh-80px)]";
22
+ }
23
+ ), v(() => {
24
+ b.closeAll();
25
+ }), (c, k) => {
26
+ const m = h("router-view");
27
+ return t(), o(g, {
28
+ routes: l.routes
29
+ }, {
30
+ default: s(() => [
31
+ C("div", {
32
+ class: x(["relative overflow-y-auto", r.value])
33
+ }, [
34
+ w(m, null, {
35
+ default: s(({ Component: u, route: i }) => [
36
+ (t(), o(y, {
37
+ include: n(e).CachedComponents,
38
+ exclude: n(e).ExcludeComponents
39
+ }, [
40
+ (t(), o(I(n(e).cacheComponent(u, i))))
41
+ ], 1032, ["include", "exclude"]))
42
+ ]),
43
+ _: 1
44
+ })
45
+ ], 2)
46
+ ]),
47
+ _: 1
48
+ }, 8, ["routes"]);
49
+ };
50
+ }
51
+ });
52
+ export {
53
+ j as default
54
+ };
@@ -0,0 +1,39 @@
1
+ import { defineComponent as i, createBlock as p, openBlock as m, unref as r, withCtx as e, createVNode as n, createTextVNode as a } from "vue";
2
+ import { r as s } from "../../assets/modules/uploadList-BedljASx.js";
3
+ import "@skyfox2000/microbase";
4
+ import "@skyfox2000/fapi";
5
+ import "vue-m-message";
6
+ import "async-validator";
7
+ import "dayjs";
8
+ import { Result as u, Button as c } from "ant-design-vue";
9
+ import "vue-draggable-next";
10
+ const V = /* @__PURE__ */ i({
11
+ __name: "error403",
12
+ setup(_) {
13
+ const o = () => {
14
+ s.back();
15
+ };
16
+ return (l, t) => (m(), p(r(u), {
17
+ status: "403",
18
+ title: "403",
19
+ "sub-title": "您没有权限访问当前页面!"
20
+ }, {
21
+ extra: e(() => [
22
+ n(r(c), {
23
+ type: "primary",
24
+ onClick: o
25
+ }, {
26
+ default: e(() => t[0] || (t[0] = [
27
+ a("点击返回")
28
+ ])),
29
+ _: 1,
30
+ __: [0]
31
+ })
32
+ ]),
33
+ _: 1
34
+ }));
35
+ }
36
+ });
37
+ export {
38
+ V as default
39
+ };
@@ -0,0 +1,39 @@
1
+ import { defineComponent as i, createBlock as p, openBlock as m, unref as r, withCtx as e, createVNode as n, createTextVNode as a } from "vue";
2
+ import { r as s } from "../../assets/modules/uploadList-BedljASx.js";
3
+ import "@skyfox2000/microbase";
4
+ import "@skyfox2000/fapi";
5
+ import "vue-m-message";
6
+ import "async-validator";
7
+ import "dayjs";
8
+ import { Result as u, Button as c } from "ant-design-vue";
9
+ import "vue-draggable-next";
10
+ const V = /* @__PURE__ */ i({
11
+ __name: "error404",
12
+ setup(_) {
13
+ const o = () => {
14
+ s.back();
15
+ };
16
+ return (l, t) => (m(), p(r(u), {
17
+ status: "404",
18
+ title: "404",
19
+ "sub-title": "页面不存在或者没有权限访问页面!"
20
+ }, {
21
+ extra: e(() => [
22
+ n(r(c), {
23
+ type: "primary",
24
+ onClick: o
25
+ }, {
26
+ default: e(() => t[0] || (t[0] = [
27
+ a("点击返回")
28
+ ])),
29
+ _: 1,
30
+ __: [0]
31
+ })
32
+ ]),
33
+ _: 1
34
+ }));
35
+ }
36
+ });
37
+ export {
38
+ V as default
39
+ };