@web-utils/component 2.8.0 → 2.8.2

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 (95) hide show
  1. package/base.css +1 -1
  2. package/card/index.mjs +33 -37
  3. package/chat/index.mjs +132 -123
  4. package/chunks/{dataformat.25e22176.mjs → dataformat.ab62230f.mjs} +1 -1
  5. package/chunks/{detail.6e53ede8.mjs → detail.6e46de33.mjs} +1 -1
  6. package/chunks/dic.7f13b573.mjs +130 -0
  7. package/chunks/{event.a018cb06.mjs → event.1ac32f1d.mjs} +2 -2
  8. package/chunks/{init.f04c7036.mjs → init.47ce5ed9.mjs} +2 -2
  9. package/chunks/json-beautifier.21cfffea.mjs +126 -0
  10. package/chunks/util.505913d9.mjs +266 -0
  11. package/column/index.mjs +2 -2
  12. package/column-default/index.mjs +1 -1
  13. package/column-dynamic/index.mjs +1 -1
  14. package/column-menu/index.mjs +81 -79
  15. package/column-slot/index.mjs +8 -7
  16. package/comment/index.mjs +6 -10
  17. package/data-pay/index.mjs +16 -13
  18. package/data-table-picker/index.mjs +22 -22
  19. package/dialog-excel/index.mjs +8 -8
  20. package/dialog-filter/index.mjs +4 -2
  21. package/dialog-form/index.mjs +6 -6
  22. package/dynamic-table/index.mjs +8 -8
  23. package/editable-tree/index.mjs +5 -5
  24. package/flow/index.mjs +11 -11
  25. package/flow/style.css +1 -1
  26. package/flow-node/index.mjs +2 -2
  27. package/form-block/index.mjs +156 -0
  28. package/form-block/style.css +1 -0
  29. package/form-button/index.mjs +16 -38
  30. package/form-group/index.mjs +28 -33
  31. package/form-input-tag/index.mjs +99 -0
  32. package/form-temp/index.mjs +15 -27
  33. package/fy-array/index.mjs +44 -42
  34. package/fy-cascader/index.mjs +1 -1
  35. package/fy-checkbox/index.mjs +2 -1
  36. package/fy-code/index.mjs +1 -1
  37. package/fy-curd/index.mjs +29 -31
  38. package/fy-date/index.mjs +1 -1
  39. package/fy-dialog-form/index.mjs +5 -11
  40. package/fy-draggable/index.mjs +3 -3
  41. package/fy-dynamic/index.mjs +3 -3
  42. package/fy-empty/index.mjs +1 -1
  43. package/fy-form/index.mjs +133 -122
  44. package/fy-form-design/index.mjs +2596 -2893
  45. package/fy-form-design/style.css +1 -1
  46. package/fy-input/index.mjs +10 -15
  47. package/fy-input-color/index.mjs +1 -1
  48. package/fy-input-icon/index.mjs +21 -16
  49. package/fy-input-map/index.mjs +22 -19
  50. package/fy-input-number/index.mjs +1 -1
  51. package/fy-input-table/index.mjs +1 -1
  52. package/fy-input-tree/index.mjs +5 -6
  53. package/fy-radio/index.mjs +3 -1
  54. package/fy-rate/index.mjs +2 -1
  55. package/fy-select/index.mjs +29 -28
  56. package/fy-slider/index.mjs +2 -2
  57. package/fy-switch/index.mjs +2 -1
  58. package/fy-tabs/index.mjs +19 -17
  59. package/fy-time/index.mjs +1 -1
  60. package/fy-title/index.mjs +1 -1
  61. package/fy-tree/index.mjs +8 -6
  62. package/fy-u-editor/index.mjs +10 -14
  63. package/fy-upload/index.mjs +85 -84
  64. package/header-menu/index.mjs +1 -1
  65. package/header-search/index.mjs +7 -5
  66. package/image-cropper/index.mjs +1 -1
  67. package/image-preview/index.mjs +1 -1
  68. package/index.cjs +62 -38
  69. package/index.css +1 -1
  70. package/index.mjs +17121 -16215
  71. package/license/index.mjs +1 -1
  72. package/login/index.mjs +1 -1
  73. package/monaco-editor/index.mjs +196 -0
  74. package/package.json +3 -2
  75. package/present-view/index.mjs +360 -0
  76. package/present-view/style.css +1 -0
  77. package/process-designer/index.mjs +10 -2
  78. package/queue/index.mjs +3 -8
  79. package/queue/style.css +1 -0
  80. package/record-video/index.mjs +1 -1
  81. package/search/index.mjs +2 -2
  82. package/search-popover/index.mjs +25 -24
  83. package/sign/index.mjs +17 -18
  84. package/sign/style.css +1 -1
  85. package/swiper/index.mjs +1 -1
  86. package/table-page/index.mjs +21 -23
  87. package/text-ellipsis/index.mjs +1 -1
  88. package/tinymce-editor/style.css +1 -1
  89. package/tinymce-wrapper/index.mjs +290 -97
  90. package/verify/index.mjs +1 -1
  91. package/web-types.json +829 -320
  92. package/x-input-tag/index.mjs +182 -0
  93. package/x-input-tag/style.css +1 -0
  94. package/chunks/dic.e8280157.mjs +0 -130
  95. package/chunks/util.17330567.mjs +0 -266
@@ -1,5 +1,5 @@
1
- import { s as a, l as n, a as h, b as r } from "./dic.e8280157.mjs";
2
- import { d, D as c } from "./util.17330567.mjs";
1
+ import { s as a, l as n, a as h, b as r } from "./dic.7f13b573.mjs";
2
+ import { d, D as c } from "./util.505913d9.mjs";
3
3
  import { s as l } from "./slot.4b391395.mjs";
4
4
  import { isBlank as s } from "@web-utils/core";
5
5
  const f = {
@@ -0,0 +1,126 @@
1
+ const p = /[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, O = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
2
+ let s, y;
3
+ const N = {
4
+ // table of character substitutions
5
+ "\b": "\\b",
6
+ " ": "\\t",
7
+ "\n": "\\n",
8
+ "\f": "\\f",
9
+ "\r": "\\r",
10
+ '"': '\\"',
11
+ "'": "\\'",
12
+ "\\": "\\\\"
13
+ };
14
+ let h;
15
+ function x(f, n = {}) {
16
+ const e = n.space || 2, t = n.dropQuotesOnKeys !== !1, r = n.dropQuotesOnNumbers || !1, l = n.inlineShortArrays || !1, u = n.inlineShortArraysDepth || 1, a = n.quoteType || "single", c = n.minify || !1;
17
+ r && S(f);
18
+ let o = d(f, null, c ? void 0 : e, t, a);
19
+ if (l && !c) {
20
+ let i = j(o);
21
+ if (u > 1)
22
+ for (let m = 1; m < u && (o = i, i = j(o), i !== o); m++)
23
+ ;
24
+ o = i;
25
+ }
26
+ return o;
27
+ }
28
+ function S(f) {
29
+ if (!$(f))
30
+ return;
31
+ const n = Object.keys(f);
32
+ n && n.forEach(function(e) {
33
+ const t = f[e];
34
+ if (typeof t == "string") {
35
+ const r = t - 0;
36
+ f[e] = isNaN(r) ? t : r;
37
+ } else
38
+ ($(t) || Array.isArray(t)) && S(t);
39
+ });
40
+ }
41
+ function $(f) {
42
+ return f && typeof f == "object";
43
+ }
44
+ function j(f, n) {
45
+ if (n || (n = 80), typeof n != "number" || n < 20)
46
+ throw Error(`Invalid width '${n}'. Expecting number equal or larger than 20.`);
47
+ const e = f.split(`
48
+ `);
49
+ let t = 0, r = null, l = [];
50
+ for (; t < e.length; ) {
51
+ const u = !!e[t].match(/\[/), a = !!e[t].match(/\],?/);
52
+ if (u && !a)
53
+ l = [e[t]], r = t;
54
+ else if (a && !u && r) {
55
+ l.push((e[t] || "").trim());
56
+ const c = l.join(" ");
57
+ c.length < n && (e.splice(r, t - r + 1, c), t = r), r = null, l = [];
58
+ } else
59
+ r && l.push((e[t] || "").trim());
60
+ t += 1;
61
+ }
62
+ return e.join(`
63
+ `);
64
+ }
65
+ function d(f, n, e, t, r) {
66
+ let l;
67
+ if (s = "", y = "", typeof e == "number")
68
+ for (l = 0; l < e; l += 1)
69
+ y += " ";
70
+ else
71
+ typeof e == "string" && (y = e);
72
+ if (h = n, n && typeof n != "function" && (typeof n != "object" || typeof n.length != "number"))
73
+ throw new Error("JSON.stringify");
74
+ return b("", { "": f }, t, r);
75
+ }
76
+ function b(f, n, e, t) {
77
+ let r, l, u, a;
78
+ const c = s;
79
+ let o, i = n[f];
80
+ switch (i && typeof i == "object" && typeof i.toJSON == "function" && (i = i.toJSON(f)), typeof h == "function" && (i = h.call(n, f, i)), typeof i) {
81
+ case "function":
82
+ return i;
83
+ case "string":
84
+ return g(i, t);
85
+ case "number":
86
+ return isFinite(i) ? String(i) : "null";
87
+ case "boolean":
88
+ case "null":
89
+ return String(i);
90
+ case "object":
91
+ if (!i)
92
+ return "null";
93
+ if (s += y, o = [], Object.prototype.toString.apply(i) === "[object Array]") {
94
+ for (a = i.length, r = 0; r < a; r += 1)
95
+ o[r] = b(r, i, e, t) || "null";
96
+ return u = o.length === 0 ? "[]" : s ? `[
97
+ ${s}${o.join(`,
98
+ ${s}`)}
99
+ ${c}]` : `[${o.join(",")}]`, s = c, u;
100
+ }
101
+ if (h && typeof h == "object")
102
+ for (a = h.length, r = 0; r < a; r += 1)
103
+ typeof h[r] == "string" && (l = h[r], u = b(l, i, e, t), u && o.push((e ? A(l, t) : g(l, t)) + (s ? ": " : ":") + u));
104
+ else
105
+ for (l in i)
106
+ Object.prototype.hasOwnProperty.call(i, l) && (u = b(l, i, e, t), u && o.push((e ? A(l, t) : g(l, t)) + (s ? ": " : ":") + u));
107
+ return u = o.length === 0 ? "{}" : s ? `{
108
+ ${s}${o.join(`,
109
+ ${s}`)}
110
+ ${c}}` : `{${o.join(",")}}`, s = c, u;
111
+ }
112
+ }
113
+ function g(f, n) {
114
+ p.lastIndex = 0;
115
+ let e = '"';
116
+ return n === "single" && (e = "'"), p.test(f) ? e + f.replace(p, function(t) {
117
+ const r = N[t];
118
+ return typeof r == "string" ? r : `\\u${`0000${t.charCodeAt(0).toString(16)}`.slice(-4)}`;
119
+ }) + e : e + f + e;
120
+ }
121
+ function A(f, n) {
122
+ return O.test(f) ? f : g(f, n);
123
+ }
124
+ export {
125
+ x as c
126
+ };
@@ -0,0 +1,266 @@
1
+ import { isBlank as l, getObjType as p } from "@web-utils/core";
2
+ const O = "fy-", f = {
3
+ rowKey: "id",
4
+ rowParentKey: "parentId",
5
+ nodeKey: "id",
6
+ label: "label",
7
+ value: "value",
8
+ desc: "desc",
9
+ groups: "groups",
10
+ title: "title",
11
+ leaf: "leaf",
12
+ children: "children",
13
+ hasChildren: "hasChildren",
14
+ labelText: "名称",
15
+ disabled: "disabled"
16
+ }, _ = {
17
+ name: "name",
18
+ url: "url",
19
+ fileName: "file",
20
+ res: ""
21
+ }, $ = [
22
+ "dates",
23
+ "date",
24
+ "datetime",
25
+ "datetimerange",
26
+ "daterange",
27
+ "time",
28
+ "timerange",
29
+ "week",
30
+ "month",
31
+ "monthrange",
32
+ "year"
33
+ ], C = ["tree", "number", "icon", "color", "table", "map"], S = ["img", "array", "url"], N = ["cascader", "tree", "select"], D = ["slider"], M = S.concat(["upload", "dynamic", "map", "checkbox", "cascader", "dynamic", "timerange", "monthrange", "daterange", "datetimerange", "dates"]), R = $.concat(["select", "checkbox", "radio", "cascader", "tree", "color", "icon", "table", "map"]), w = " | ", v = ",", m = {
34
+ img: /\.(gif|jpg|jpeg|png|webp|svg|GIF|JPG|JPEG|PNG|WEBP|SVG)/,
35
+ video: /\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|ogg|mp4)/,
36
+ audio: /\.(mp3|wav|MP3|WAV)/
37
+ }, k = (e, n) => {
38
+ if (!l(e))
39
+ return m.audio.test(e) || n === "audio" ? "audio" : m.video.test(e) || n === "video" ? "video" : m.img.test(e) || n === "img" ? "img" : !1;
40
+ };
41
+ function K(e = 0, n = 2) {
42
+ return Number(e.toFixed(n));
43
+ }
44
+ function V(e, n = "") {
45
+ let r = u(e);
46
+ return l(n) || n.split(".").forEach((t) => {
47
+ r = l(r[t]) ? "" : r[t];
48
+ }), r;
49
+ }
50
+ const P = (e) => new Function(`return ${e}`)();
51
+ function F(e, n = "", r) {
52
+ let t;
53
+ const o = p(r);
54
+ return l(r) ? o === "array" ? t = `obj.${n}=[]` : o === "object" ? t = `obj.${n}={}` : ["number", "boolean"].includes(o) ? t = `obj.${n}=undefined` : t = `obj.${n}=''` : o === "string" ? t = `obj.${n}='${r}'` : t = `obj.${n}=${r}`, P(t), e;
55
+ }
56
+ function G(e, n) {
57
+ typeof e == "object" && e instanceof Blob && (e = URL.createObjectURL(e));
58
+ const r = document.createElement("a");
59
+ r.href = e, r.download = n || "";
60
+ let t;
61
+ window.MouseEvent ? t = new MouseEvent("click") : (t = document.createEvent("MouseEvents"), t.initMouseEvent(
62
+ "click",
63
+ !0,
64
+ !1,
65
+ window,
66
+ 0,
67
+ 0,
68
+ 0,
69
+ 0,
70
+ 0,
71
+ !1,
72
+ !1,
73
+ !1,
74
+ !1,
75
+ 0,
76
+ null
77
+ )), r.dispatchEvent(t);
78
+ }
79
+ function U(e) {
80
+ return e.forEach((n, r) => {
81
+ e[r] = Number(n);
82
+ }), e;
83
+ }
84
+ function b(...e) {
85
+ let n = e[0] || {}, r = !1;
86
+ const t = Array.prototype.slice.call(e);
87
+ let o = 1, s, i, c, a, d = !1;
88
+ for (typeof n == "boolean" && (r = n, o++, n = e[1]); o < t.length; o++)
89
+ if ((s = t[o]) != null)
90
+ for (c in s)
91
+ a = s[c], i = n[c], r && (toString.call(a) === "[object Object]" || (d = toString.call(a) === "[object Array]")) ? (d ? i = toString.call(i) === "[object Array]" ? i : [] : i = toString.call(i) === "[object Object]" ? i : {}, n[c] = b(r, i, a)) : a !== void 0 && a !== i && (n[c] = a);
92
+ return n;
93
+ }
94
+ function B(e, n) {
95
+ const r = n.split("."), t = r.splice(0, 1)[0], o = {};
96
+ if (o[t] = {}, r.length >= 2) {
97
+ const s = "{", i = "}";
98
+ let c = "";
99
+ r.forEach((a) => {
100
+ c = `${c}${s}"${a}":`;
101
+ }), c = `${c}""`;
102
+ for (let a = 0; a < r.length; a++)
103
+ c = `${c}${i}`;
104
+ c = JSON.parse(c), o[t] = c;
105
+ }
106
+ return e = b(!0, e, o), e;
107
+ }
108
+ function J(e, n) {
109
+ const r = e.split(","), t = r[0].match(/:(.*?);/)[1], o = atob(r[1]);
110
+ let s = o.length;
111
+ const i = new Uint8Array(s);
112
+ for (; s--; )
113
+ i[s] = o.charCodeAt(s);
114
+ return new File([i], n, {
115
+ type: t
116
+ });
117
+ }
118
+ function W(e, n, r = "prop") {
119
+ let t = -1;
120
+ const o = (() => {
121
+ let s;
122
+ return e.forEach((i) => {
123
+ i.column ? s = "group" : i.children && (s = "tree");
124
+ }), s;
125
+ })();
126
+ return o === "group" ? e.forEach((s) => {
127
+ const i = y(s.column, n, r, !0);
128
+ i !== -1 && (t = i);
129
+ }) : o === "tree" ? t = E(e, n, { value: r }, !0) : t = y(e, n, r, !0), t;
130
+ }
131
+ function Y() {
132
+ const e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", n = e.length;
133
+ let r = "";
134
+ for (let t = 0; t < 16; t++)
135
+ r += e.charAt(Math.floor(Math.random() * n));
136
+ return r;
137
+ }
138
+ const u = (e) => {
139
+ const n = p(e);
140
+ let r;
141
+ if (n === "array")
142
+ r = [];
143
+ else if (n === "object")
144
+ r = {};
145
+ else
146
+ return e;
147
+ if (n === "array") {
148
+ e = e;
149
+ let t = 0;
150
+ const o = e.length;
151
+ for (; t < o; t++)
152
+ e[t] && delete e[t].$parent, r.push(u(e[t]));
153
+ } else if (n === "object")
154
+ for (const t in e) {
155
+ const o = e[t];
156
+ o && delete o.$parent, r[t] = u(e[t]);
157
+ }
158
+ return r;
159
+ }, H = (e, n = "") => (e || (e = n), e ? (e = `${e}`, e.indexOf("%") === -1 && e.indexOf("px") === -1 && (e = `${e}px`), e) : ""), T = (e, n) => l(e) ? e : n === "number" ? Number(e) : n === "string" ? `${e}` : e, j = (e = [], n = {}, r) => {
160
+ const t = n.value || f.value, o = n.children || f.children;
161
+ return e.forEach((s) => {
162
+ s[t] = T(s[t], r), s[o] && j(s[o], n, r);
163
+ }), e;
164
+ }, q = (e, n, r) => {
165
+ if (l(e))
166
+ return n;
167
+ const t = n instanceof Array, o = t ? n : [n];
168
+ r = r || f;
169
+ const s = [];
170
+ for (let i = 0; i < o.length; i++)
171
+ s.push(E(e, o[i], r) || o[i]);
172
+ return t ? s.join(w) : s.join();
173
+ }, z = (e, n = ["", "$"], r = !0) => {
174
+ const t = r ? u(e) : e;
175
+ for (const o in t)
176
+ n.includes("") && l(t[o]) && delete t[o], n.includes("$") && o.indexOf("$") !== -1 && delete t[o];
177
+ return t;
178
+ }, I = (e = [], n = {}) => {
179
+ let r = u(e);
180
+ const t = n[f.groups] || f.groups;
181
+ return e.forEach((o) => {
182
+ o[t] && (r = r.concat(o[t]));
183
+ }), r;
184
+ }, E = (e, n, r, t = null) => {
185
+ let o;
186
+ t || (e = I(e, r));
187
+ const s = (i) => {
188
+ const c = r.label || f.label, a = r.value || f.value, d = r.children || f.children;
189
+ for (let g = 0; g < i.length; g++) {
190
+ const h = i[g], A = h[d] || [];
191
+ h[a] === n ? o = t ? h : h[c] : s(A);
192
+ }
193
+ };
194
+ return s(e), o;
195
+ }, L = (e) => (Array.isArray(e) ? e : e.data) || [], Q = (e, n = "", r = null) => {
196
+ const t = n.split(".");
197
+ let o = e;
198
+ return t[0] === "" && r !== "object" ? L(e) : (t[0] !== "" && t.forEach((s) => {
199
+ o = o[s];
200
+ }), o);
201
+ }, y = (e, n, r, t) => {
202
+ r = r || f.value;
203
+ for (let o = 0; o < e.length; o++)
204
+ if (e[o][r] === n)
205
+ return t ? e[o] : o;
206
+ return -1;
207
+ }, X = (e = "", n) => {
208
+ const r = e.toString().length;
209
+ e = "";
210
+ for (let t = 0; t < r; t++)
211
+ e = e + n;
212
+ return e;
213
+ }, Z = (e = [], n, r) => e.filter((t) => !l(t[n])).sort((t, o) => r(t, o)).concat(e.filter((t) => l(t[n]))), ee = (e, n) => e ? (n.forEach((r) => {
214
+ if (r.includes("$"))
215
+ delete e[r];
216
+ else if (!l(e[r])) {
217
+ const t = p(e[r]);
218
+ t === "array" ? e[r] = [] : t === "object" ? e[r] = {} : ["number", "boolean"].includes(t) ? e[r] = void 0 : e[r] = "";
219
+ }
220
+ }), e) : {}, te = (e, n) => typeof e == "boolean" ? e : l(e) ? n : e;
221
+ function ne(e = {}, n) {
222
+ n = n || this;
223
+ const r = ["uploadPreview", "uploadBefore", "uploadAfter", "uploadDelete", "uploadError", "uploadExceed"], t = {};
224
+ return e.type === "upload" ? r.forEach((o) => {
225
+ e[o] || (t[o] = n[o]);
226
+ }) : r.forEach((o) => {
227
+ t[o] = n[o];
228
+ }), t;
229
+ }
230
+ export {
231
+ M as A,
232
+ J as B,
233
+ G as C,
234
+ f as D,
235
+ C as I,
236
+ O as K,
237
+ N as M,
238
+ D as R,
239
+ R as S,
240
+ Z as a,
241
+ w as b,
242
+ v as c,
243
+ u as d,
244
+ U as e,
245
+ S as f,
246
+ V as g,
247
+ X as h,
248
+ k as i,
249
+ $ as j,
250
+ q as k,
251
+ j as l,
252
+ Q as m,
253
+ W as n,
254
+ te as o,
255
+ T as p,
256
+ B as q,
257
+ Y as r,
258
+ H as s,
259
+ _ as t,
260
+ ne as u,
261
+ z as v,
262
+ K as w,
263
+ F as x,
264
+ ee as y,
265
+ P as z
266
+ };
package/column/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as s, D as l } from "../chunks/util.17330567.mjs";
1
+ import { a as s, D as l } from "../chunks/util.505913d9.mjs";
2
2
  import { isBlank as p } from "@web-utils/core";
3
3
  import { n as c } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
4
4
  var d = function() {
@@ -88,7 +88,7 @@ const f = {
88
88
  if (this.crud.isMobile && ["fixed"].includes(n))
89
89
  return !1;
90
90
  const r = e == null ? void 0 : e[n];
91
- if (!(n === "width" && r == 0))
91
+ if (!(n === "width" && r === 0))
92
92
  return n === "filters" ? this.handleFilters(t, r) : n === "hide" ? (e == null ? void 0 : e.hide) !== !0 : r;
93
93
  }
94
94
  }
@@ -1,5 +1,5 @@
1
1
  import { c as r } from "../chunks/config.46422d7f.mjs";
2
- import { o as d } from "../chunks/util.17330567.mjs";
2
+ import { o as d } from "../chunks/util.505913d9.mjs";
3
3
  import { n as c } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
4
4
  var a = function() {
5
5
  var e = this, n = e.$createElement, t = e._self._c || n;
@@ -1,4 +1,4 @@
1
- import { o as u } from "../chunks/util.17330567.mjs";
1
+ import { o as u } from "../chunks/util.505913d9.mjs";
2
2
  import { n as c } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
3
3
  var p = function() {
4
4
  var n = this, t = n.$createElement, l = n._self._c || t;
@@ -1,6 +1,6 @@
1
1
  import { c as u } from "../chunks/config.46422d7f.mjs";
2
2
  import { p as d } from "../chunks/permission.ce5d2121.mjs";
3
- import { o as a } from "../chunks/util.17330567.mjs";
3
+ import { o as a } from "../chunks/util.505913d9.mjs";
4
4
  import { n as l } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
5
5
  var m = function() {
6
6
  var e = this, o = e.$createElement, r = e._self._c || o;
@@ -17,12 +17,85 @@ var m = function() {
17
17
  },
18
18
  scopedSlots: e._u([{
19
19
  key: "default",
20
- fn: function(s) {
21
- var n = s.row, t = s.$index;
20
+ fn: function(c) {
21
+ var n = c.row, t = c.$index;
22
22
  return [e.isMenu ? r("ElDropdown", {
23
23
  attrs: {
24
24
  size: e.crud.isMediumSize
25
- }
25
+ },
26
+ scopedSlots: e._u([{
27
+ key: "dropdown",
28
+ fn: function() {
29
+ return [r("ElDropdownMenu", [e.optVal(e.crud.tableOption.viewBtn, e.config.viewBtn) ? r("ElDropdownItem", {
30
+ directives: [{
31
+ name: "permission",
32
+ rawName: "v-permission",
33
+ value: e.crud.getPermission("viewBtn", n, t),
34
+ expression: "crud.getPermission('viewBtn', row, $index)"
35
+ }],
36
+ attrs: {
37
+ icon: e.crud.getBtnIcon("viewBtn")
38
+ },
39
+ nativeOn: {
40
+ click: function(i) {
41
+ return e.crud.rowView(n, t);
42
+ }
43
+ }
44
+ }, [e._v(" " + e._s(e.crud.menuIcon("viewBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) ? r("ElDropdownItem", {
45
+ directives: [{
46
+ name: "permission",
47
+ rawName: "v-permission",
48
+ value: e.crud.getPermission("editBtn", n, t),
49
+ expression: "crud.getPermission('editBtn', row, $index)"
50
+ }],
51
+ attrs: {
52
+ icon: e.crud.getBtnIcon("editBtn")
53
+ },
54
+ nativeOn: {
55
+ click: function(i) {
56
+ return e.crud.rowEdit(n, t);
57
+ }
58
+ }
59
+ }, [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.copyBtn, e.config.copyBtn) ? r("ElDropdownItem", {
60
+ directives: [{
61
+ name: "permission",
62
+ rawName: "v-permission",
63
+ value: e.crud.getPermission("copyBtn", n, t),
64
+ expression: "crud.getPermission('copyBtn', row, $index)"
65
+ }],
66
+ attrs: {
67
+ icon: e.crud.getBtnIcon("copyBtn")
68
+ },
69
+ nativeOn: {
70
+ click: function(i) {
71
+ return e.crud.rowCopy(n);
72
+ }
73
+ }
74
+ }, [e._v(" " + e._s(e.crud.menuIcon("copyBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.delBtn, e.config.delBtn) ? r("ElDropdownItem", {
75
+ directives: [{
76
+ name: "permission",
77
+ rawName: "v-permission",
78
+ value: e.crud.getPermission("delBtn", n, t),
79
+ expression: "crud.getPermission('delBtn', row, $index)"
80
+ }],
81
+ attrs: {
82
+ icon: e.crud.getBtnIcon("delBtn")
83
+ },
84
+ nativeOn: {
85
+ click: function(i) {
86
+ return e.crud.rowDel(n, t);
87
+ }
88
+ }
89
+ }, [e._v(" " + e._s(e.crud.menuIcon("delBtn")) + " ")]) : e._e(), e._t("menuBtn", null, {
90
+ row: n,
91
+ type: e.menuText("primary"),
92
+ disabled: e.crud.btnDisabled,
93
+ size: e.crud.isMediumSize,
94
+ index: t
95
+ })], 2)];
96
+ },
97
+ proxy: !0
98
+ }], null, !0)
26
99
  }, [r("ElButton", {
27
100
  attrs: {
28
101
  type: "text",
@@ -30,78 +103,7 @@ var m = function() {
30
103
  }
31
104
  }, [e._v(" " + e._s(e.crud.tableOption.menuBtnTitle || "按钮") + " "), r("i", {
32
105
  staticClass: "el-icon-arrow-down el-icon--right"
33
- })]), r("ElDropdownMenu", {
34
- attrs: {
35
- slot: "dropdown"
36
- },
37
- slot: "dropdown"
38
- }, [e.optVal(e.crud.tableOption.viewBtn, e.config.viewBtn) ? r("ElDropdownItem", {
39
- directives: [{
40
- name: "permission",
41
- rawName: "v-permission",
42
- value: e.crud.getPermission("viewBtn", n, t),
43
- expression: "crud.getPermission('viewBtn', row, $index)"
44
- }],
45
- attrs: {
46
- icon: e.crud.getBtnIcon("viewBtn")
47
- },
48
- nativeOn: {
49
- click: function(i) {
50
- return e.crud.rowView(n, t);
51
- }
52
- }
53
- }, [e._v(" " + e._s(e.crud.menuIcon("viewBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) ? r("ElDropdownItem", {
54
- directives: [{
55
- name: "permission",
56
- rawName: "v-permission",
57
- value: e.crud.getPermission("editBtn", n, t),
58
- expression: "crud.getPermission('editBtn', row, $index)"
59
- }],
60
- attrs: {
61
- icon: e.crud.getBtnIcon("editBtn")
62
- },
63
- nativeOn: {
64
- click: function(i) {
65
- return e.crud.rowEdit(n, t);
66
- }
67
- }
68
- }, [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.copyBtn, e.config.copyBtn) ? r("ElDropdownItem", {
69
- directives: [{
70
- name: "permission",
71
- rawName: "v-permission",
72
- value: e.crud.getPermission("copyBtn", n, t),
73
- expression: "crud.getPermission('copyBtn', row, $index)"
74
- }],
75
- attrs: {
76
- icon: e.crud.getBtnIcon("copyBtn")
77
- },
78
- nativeOn: {
79
- click: function(i) {
80
- return e.crud.rowCopy(n);
81
- }
82
- }
83
- }, [e._v(" " + e._s(e.crud.menuIcon("copyBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.delBtn, e.config.delBtn) ? r("ElDropdownItem", {
84
- directives: [{
85
- name: "permission",
86
- rawName: "v-permission",
87
- value: e.crud.getPermission("delBtn", n, t),
88
- expression: "crud.getPermission('delBtn', row, $index)"
89
- }],
90
- attrs: {
91
- icon: e.crud.getBtnIcon("delBtn")
92
- },
93
- nativeOn: {
94
- click: function(i) {
95
- return e.crud.rowDel(n, t);
96
- }
97
- }
98
- }, [e._v(" " + e._s(e.crud.menuIcon("delBtn")) + " ")]) : e._e(), e._t("menuBtn", null, {
99
- row: n,
100
- type: e.menuText("primary"),
101
- disabled: e.crud.btnDisabled,
102
- size: e.crud.isMediumSize,
103
- index: t
104
- })], 2)], 1) : ["button", "text", "icon"].includes(e.menuType) ? [e.optVal(e.crud.tableOption.cellBtn, e.config.cellBtn) ? [e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) && !n.$cellEdit ? r("ElButton", {
106
+ })])], 1) : ["button", "text", "icon"].includes(e.menuType) ? [e.optVal(e.crud.tableOption.cellBtn, e.config.cellBtn) ? [e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) && !n.$cellEdit ? r("ElButton", {
105
107
  directives: [{
106
108
  name: "permission",
107
109
  rawName: "v-permission",
@@ -263,7 +265,7 @@ const B = {
263
265
  return ["text", "menu"].includes(this.menuType) ? "text" : e;
264
266
  }
265
267
  }
266
- }, c = {};
268
+ }, s = {};
267
269
  var v = /* @__PURE__ */ l(
268
270
  B,
269
271
  m,
@@ -275,8 +277,8 @@ var v = /* @__PURE__ */ l(
275
277
  null
276
278
  );
277
279
  function g(e) {
278
- for (let o in c)
279
- this[o] = c[o];
280
+ for (let o in s)
281
+ this[o] = s[o];
280
282
  }
281
283
  const f = /* @__PURE__ */ function() {
282
284
  return v.exports;
@@ -1,6 +1,6 @@
1
- import { d as h } from "../chunks/detail.6e53ede8.mjs";
2
- import { o as f, u as b, i as g, D as p, b as y, d as _ } from "../chunks/util.17330567.mjs";
3
- import { s as C } from "../chunks/dic.e8280157.mjs";
1
+ import { d as h } from "../chunks/detail.6e46de33.mjs";
2
+ import { o as f, u as b, i as g, D as p, b as y, d as _ } from "../chunks/util.505913d9.mjs";
3
+ import { s as C } from "../chunks/dic.7f13b573.mjs";
4
4
  import { isBlank as i } from "@web-utils/core";
5
5
  import { n as $ } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
6
6
  var v = function() {
@@ -202,7 +202,9 @@ const d = {}, D = {
202
202
  },
203
203
  columnChange(e, t, l) {
204
204
  const n = `${l}-${t.prop}`;
205
- d[n] || (this.handleChange(t, e), typeof t.change == "function" && t.cell == !0 && t.change({ row: e, column: t, index: l, value: e[t.prop] })), d[n] = !0, this.$nextTick(() => d[n] = !1);
205
+ d[n] || (this.handleChange(t, e), typeof t.change == "function" && t.cell === !0 && t.change({ row: e, column: t, index: l, value: e[t.prop] })), d[n] = !0, this.$nextTick(() => {
206
+ d[n] = !1;
207
+ });
206
208
  },
207
209
  handleChange(e, t) {
208
210
  e.cascader && this.$nextTick(() => {
@@ -223,9 +225,8 @@ const d = {}, D = {
223
225
  });
224
226
  },
225
227
  handleDetail(e, t) {
226
- let l;
227
- const n = t.parentProp ? (this.crud.cascaderDIC[e.$index] || {})[t.prop] : this.crud.DIC[t.prop];
228
- return l = h(e, t, this.crud.tableOption, n), !i(n) && this.crud.tableOption.filterDic !== !0 && (e[`$${t.prop}`] = l), l;
228
+ const l = t.parentProp ? (this.crud.cascaderDIC[e.$index] || {})[t.prop] : this.crud.DIC[t.prop], n = h(e, t, this.crud.tableOption, l);
229
+ return !i(l) && this.crud.tableOption.filterDic !== !0 && (e[`$${t.prop}`] = n), n;
229
230
  },
230
231
  corArray(e, t) {
231
232
  let l = this.handleDetail(e, t);