mic-org 1.1.6 → 1.1.8

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/README.md CHANGED
@@ -7,8 +7,8 @@
7
7
 
8
8
  ---------------------------------
9
9
 
10
- ## 版本 1.1.6
10
+ ## 版本 1.1.8
11
11
 
12
12
  - 1.优化说明文档
13
13
  - 2.链接地:http://10.252.105.30:32089/mic/
14
- - 3.check方法增加formdata类型返回
14
+ - 3.domHeight方法优化
package/dist/mic.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as q, openBlock as p, createElementBlock as A, createElementVNode as b, h as G, render as Z, reactive as P, useModel as R, toRefs as j, resolveComponent as v, normalizeStyle as E, unref as u, toDisplayString as K, createVNode as C, mergeProps as I, mergeModels as L, withKeys as X, renderSlot as T, withCtx as k, Fragment as U, renderList as B, createBlock as $, watch as ee, createSlots as te, createCommentVNode as F, ref as le, toHandlers as O, createTextVNode as Q } from "vue";
1
+ import { defineComponent as q, openBlock as p, createElementBlock as A, createElementVNode as b, h as G, render as Z, reactive as F, useModel as R, toRefs as j, resolveComponent as v, normalizeStyle as E, unref as u, toDisplayString as K, createVNode as C, mergeProps as I, mergeModels as L, withKeys as X, renderSlot as T, withCtx as k, Fragment as U, renderList as B, createBlock as $, watch as ee, createSlots as te, createCommentVNode as H, ref as le, toHandlers as P, createTextVNode as Q } from "vue";
2
2
  const ae = /* @__PURE__ */ new Map([
3
3
  ["String", ""],
4
4
  ["Number", 0],
@@ -6,7 +6,7 @@ const ae = /* @__PURE__ */ new Map([
6
6
  ["Undefined", ""],
7
7
  ["Boolean", !1],
8
8
  ["Array", []]
9
- ]), oe = () => {
9
+ ]), ne = () => {
10
10
  const a = Array.prototype;
11
11
  a?.equal || (a.equal = function(e) {
12
12
  if (this.length === 0 || !e)
@@ -14,40 +14,40 @@ const ae = /* @__PURE__ */ new Map([
14
14
  result: !1,
15
15
  data: []
16
16
  };
17
- const o = Array.isArray(e) ? e : new Array(e), l = this[0];
18
- return o.every((t) => this.every((n) => n[t] === l[t])) ? {
17
+ const n = Array.isArray(e) ? e : new Array(e), l = this[0];
18
+ return n.every((t) => this.every((o) => o[t] === l[t])) ? {
19
19
  result: !0,
20
- data: o.map((t) => l[t])
20
+ data: n.map((t) => l[t])
21
21
  } : {
22
22
  result: !1,
23
23
  data: []
24
24
  };
25
25
  });
26
- }, ne = () => {
26
+ }, oe = () => {
27
27
  const a = Array.prototype;
28
28
  a?.deepIncludes || (a.deepIncludes = function(e) {
29
29
  if (this.length === 0 || !e)
30
30
  return !1;
31
- for (let o of this)
32
- if (Object.entries(e).every(([s, t]) => o[s] == t))
31
+ for (let n of this)
32
+ if (Object.entries(e).every(([s, t]) => n[s] == t))
33
33
  return !0;
34
34
  return !1;
35
35
  });
36
36
  }, se = () => {
37
37
  "exact" in Math || Object.defineProperty(Math, "exact", {
38
- value: function(a, e, o) {
38
+ value: function(a, e, n) {
39
39
  let l = new Array(2).fill(0), s = [], t = [];
40
40
  `${a}`.includes(".") && (s = `${a}`.split("."), l[0] = s?.[1]?.length ?? 0, a = Number(s.join(""))), `${e}`.includes(".") && (t = `${e}`.split("."), l[1] = t?.[1]?.length, e = Number(t.join("")));
41
- let n = Math.max(...l);
42
- switch (o) {
41
+ let o = Math.max(...l);
42
+ switch (n) {
43
43
  case "*":
44
44
  return a * e / Math.pow(10, l.reduce((m, r) => m + r, 0));
45
45
  case "/":
46
- return a * Math.pow(10, n - l[0]) / (e * Math.pow(10, n - l[1]));
46
+ return a * Math.pow(10, o - l[0]) / (e * Math.pow(10, o - l[1]));
47
47
  case "+":
48
- return (a * Math.pow(10, n - l[0]) + e * Math.pow(10, n - l[1])) / Math.pow(10, n);
48
+ return (a * Math.pow(10, o - l[0]) + e * Math.pow(10, o - l[1])) / Math.pow(10, o);
49
49
  case "-":
50
- return (a * Math.pow(10, n - l[0]) - e * Math.pow(10, n - l[1])) / Math.pow(10, n);
50
+ return (a * Math.pow(10, o - l[0]) - e * Math.pow(10, o - l[1])) / Math.pow(10, o);
51
51
  }
52
52
  },
53
53
  writable: !0,
@@ -58,28 +58,28 @@ const ae = /* @__PURE__ */ new Map([
58
58
  // 是否可枚举(避免出现在 for...in 循环中)
59
59
  });
60
60
  };
61
- oe();
62
61
  ne();
62
+ oe();
63
63
  se();
64
64
  const W = (a) => Object.prototype.toString.call(a).replace(/^\[object (\S+)\]$/, "$1"), J = (a, e) => {
65
- const o = W(a);
66
- if (["String", "Number", "Null", "Undefined", "Boolean", "Array"].includes(o))
67
- return e ?? ae.get(o);
65
+ const n = W(a);
66
+ if (["String", "Number", "Null", "Undefined", "Boolean", "Array"].includes(n))
67
+ return e ?? ae.get(n);
68
68
  {
69
- const s = a, t = e, n = {};
69
+ const s = a, t = e, o = {};
70
70
  return Object.keys(s).forEach((m) => {
71
- n[m] = J(
71
+ o[m] = J(
72
72
  s[m],
73
73
  t?.[m]
74
74
  );
75
- }), n;
75
+ }), o;
76
76
  }
77
77
  };
78
78
  var re = /* @__PURE__ */ q({
79
79
  name: "Loading",
80
80
  __name: "loading",
81
81
  setup(a) {
82
- return (e, o) => (p(), A("svg", {
82
+ return (e, n) => (p(), A("svg", {
83
83
  xmlns: "http://www.w3.org/2000/svg",
84
84
  viewBox: "0 0 1024 1024"
85
85
  }, [
@@ -91,10 +91,10 @@ var re = /* @__PURE__ */ q({
91
91
  }
92
92
  }), ie = re;
93
93
  const ce = (a, e) => {
94
- const o = a.__vccOpts || a;
94
+ const n = a.__vccOpts || a;
95
95
  for (const [l, s] of e)
96
- o[l] = s;
97
- return o;
96
+ n[l] = s;
97
+ return n;
98
98
  }, de = {}, ue = { class: "msg" };
99
99
  function pe(a, e) {
100
100
  return p(), A("div", ue, [...e[0] || (e[0] = [
@@ -109,13 +109,13 @@ function pe(a, e) {
109
109
  ], -1)
110
110
  ])]);
111
111
  }
112
- const me = /* @__PURE__ */ ce(de, [["render", pe], ["__scopeId", "data-v-f3f41b24"]]), fe = (a, { className: e, loadStyle: o }) => {
112
+ const me = /* @__PURE__ */ ce(de, [["render", pe], ["__scopeId", "data-v-f3f41b24"]]), fe = (a, { className: e, loadStyle: n }) => {
113
113
  let l = {
114
114
  color: "#409EFF",
115
115
  bgColor: "rgba(255,255,255,.8)"
116
- }, s, t, n;
116
+ }, s, t, o;
117
117
  return async (m) => {
118
- s = document.getElementsByClassName(e)?.[0], t = document.createElement("div"), t.style.display = "flex", t.style.flexDirection = "row", t.style.alignItems = "center", t.style.justifyContent = "center", t.style.cursor = "not-allowed", t.style.backgroundColor = o?.bgColor ?? l.bgColor;
118
+ s = document.getElementsByClassName(e)?.[0], t = document.createElement("div"), t.style.display = "flex", t.style.flexDirection = "row", t.style.alignItems = "center", t.style.justifyContent = "center", t.style.cursor = "not-allowed", t.style.backgroundColor = n?.bgColor ?? l.bgColor;
119
119
  const r = (h) => {
120
120
  h.stopPropagation(), h.preventDefault();
121
121
  };
@@ -126,14 +126,14 @@ const me = /* @__PURE__ */ ce(de, [["render", pe], ["__scopeId", "data-v-f3f41b2
126
126
  const h = G(ie, {
127
127
  class: "mic-loader",
128
128
  style: {
129
- color: o?.color ?? l.color,
129
+ color: n?.color ?? l.color,
130
130
  width: "14px",
131
131
  height: "14px"
132
132
  }
133
133
  });
134
134
  Z(h, t), s.appendChild(t);
135
135
  } else {
136
- n = document.body.style.overflow, document.body.style.overflow = "hidden", document.documentElement.style.overflow = "hidden", t.style.position = "fixed", t.style.zIndex = "99999", t.style.left = "0", t.style.top = "0", t.style.width = "100vw", t.style.height = "100vh";
136
+ o = document.body.style.overflow, document.body.style.overflow = "hidden", document.documentElement.style.overflow = "hidden", t.style.position = "fixed", t.style.zIndex = "99999", t.style.left = "0", t.style.top = "0", t.style.width = "100vw", t.style.height = "100vh";
137
137
  const h = G(me);
138
138
  Z(h, t), document.body.appendChild(t);
139
139
  }
@@ -141,22 +141,22 @@ const me = /* @__PURE__ */ ce(de, [["render", pe], ["__scopeId", "data-v-f3f41b2
141
141
  } catch (h) {
142
142
  console.error("~~ ==== 💥💥💥💥 ==== ~ Load ~~", h);
143
143
  } finally {
144
- t.removeEventListener("click", r), s ? s.removeChild(t) : (document.body.style.overflow = n, document.documentElement.style.overflow = n, document.body.removeChild(t)), t = null, s = null;
144
+ t.removeEventListener("click", r), s ? s.removeChild(t) : (document.body.style.overflow = o, document.documentElement.style.overflow = o, document.body.removeChild(t)), t = null, s = null;
145
145
  }
146
146
  };
147
147
  }, he = (a) => {
148
- const e = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], o = ["", "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿", "拾", "佰", "仟"], l = ["角", "分"], s = /^(\d{1,12})(\.(\d{1,2}))?$/;
148
+ const e = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], n = ["", "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿", "拾", "佰", "仟"], l = ["角", "分"], s = /^(\d{1,12})(\.(\d{1,2}))?$/;
149
149
  if (a == null)
150
150
  return "零元整";
151
151
  const t = String(a).trim().replace(/,/g, "");
152
152
  if (!s.test(t))
153
153
  throw new Error("金额格式错误!仅支持12位整数+2位小数");
154
- const [n = "", m = ""] = t.split("."), r = parseInt(n, 10), h = m.padEnd(2, "0");
154
+ const [o = "", m = ""] = t.split("."), r = parseInt(o, 10), h = m.padEnd(2, "0");
155
155
  function D(x) {
156
156
  let g = "", c = !1;
157
157
  const d = x.length;
158
158
  for (let f = 0; f < d; f++) {
159
- const S = parseInt(x[f], 10), z = d - 1 - f, M = o[z];
159
+ const S = parseInt(x[f], 10), z = d - 1 - f, M = n[z];
160
160
  S === 0 ? (c = !0, (M === "万" || M === "亿") && (g += M, c = !1)) : (c && (g += "零"), g += e[S] + M, c = !1);
161
161
  }
162
162
  return g = g.replace(/亿万/, "亿"), g || "零";
@@ -166,30 +166,30 @@ const me = /* @__PURE__ */ ce(de, [["render", pe], ["__scopeId", "data-v-f3f41b2
166
166
  const c = parseInt(x[0], 10), d = parseInt(x[1], 10);
167
167
  return c !== 0 && (g += e[c] + l[0], d === 0 && (g += "整")), d !== 0 && (c === 0 && r !== 0 && (g += "零"), g += e[d] + l[1]), g;
168
168
  }
169
- const w = D(n), V = _(h);
169
+ const w = D(o), V = _(h);
170
170
  return V ? `${w}元${V}` : `${w}元整`;
171
- }, N = (a, e) => {
172
- const o = Object.prototype.toString.call(a).replace(/^\[object (\S+)\]$/, "$1"), l = Object.prototype.toString.call(e).replace(/^\[object (\S+)\]$/, "$1");
173
- if (o != l)
171
+ }, O = (a, e) => {
172
+ const n = Object.prototype.toString.call(a).replace(/^\[object (\S+)\]$/, "$1"), l = Object.prototype.toString.call(e).replace(/^\[object (\S+)\]$/, "$1");
173
+ if (n != l)
174
174
  return !1;
175
- if (["String", "Number", "Null", "Undefined", "Boolean"].includes(o))
175
+ if (["String", "Number", "Null", "Undefined", "Boolean"].includes(n))
176
176
  return a === e;
177
- if (o === "File") {
177
+ if (n === "File") {
178
178
  let t = ["name", "size", "type", "lastModified"];
179
- for (let n of t)
180
- if (!N(a[n], e[n]))
179
+ for (let o of t)
180
+ if (!O(a[o], e[o]))
181
181
  return !1;
182
182
  }
183
- if (o == "Object") {
184
- for (let [t, n] of Object.entries(a))
185
- if (!N(n, e[t]))
183
+ if (n == "Object") {
184
+ for (let [t, o] of Object.entries(a))
185
+ if (!O(o, e[t]))
186
186
  return !1;
187
187
  }
188
- if (o == "Array") {
188
+ if (n == "Array") {
189
189
  if (a.length != e.length)
190
190
  return !1;
191
191
  for (let t = 0; t < a.length; t++)
192
- if (!N(a[t], e[t]))
192
+ if (!O(a[t], e[t]))
193
193
  return !1;
194
194
  }
195
195
  return !0;
@@ -197,7 +197,7 @@ const me = /* @__PURE__ */ ce(de, [["render", pe], ["__scopeId", "data-v-f3f41b2
197
197
  check: W,
198
198
  reset: J,
199
199
  capital: he,
200
- equal: N,
200
+ equal: O,
201
201
  load: fe
202
202
  };
203
203
  class ge {
@@ -209,11 +209,11 @@ class ge {
209
209
  }
210
210
  // 绑定监听(增加边界校验)
211
211
  bind(e) {
212
- !this.element || this.observer || (this.observer = new ResizeObserver((o) => {
213
- const l = o[0];
212
+ !this.element || this.observer || (this.observer = new ResizeObserver((n) => {
213
+ const l = n[0];
214
214
  if (!l?.contentRect) return;
215
- const { width: s, height: t } = l.contentRect, n = window.getComputedStyle(this.element);
216
- e?.(s + parseInt(n.marginLeft) + parseInt(n.marginRight), t + parseInt(n.marginTop) + parseInt(n.marginBottom));
215
+ const { width: s, height: t } = l.contentRect, o = window.getComputedStyle(this.element);
216
+ e?.(s + parseInt(o.marginLeft) + parseInt(o.marginRight), t + parseInt(o.marginTop) + parseInt(o.marginBottom));
217
217
  }), this.observer.observe(this.element, {
218
218
  box: "border-box"
219
219
  // 显式指定监听的盒模型(可选)
@@ -230,19 +230,19 @@ class ge {
230
230
  }
231
231
  class ye {
232
232
  domList;
233
- #e = P({
233
+ #e = F({
234
234
  value: 0
235
235
  });
236
- #t = P({
236
+ #t = F({
237
237
  value: 0
238
238
  });
239
239
  constructor(e) {
240
- this.domList = e.map((o) => ({
241
- ...o,
240
+ this.domList = e.map((n) => ({
241
+ ...n,
242
242
  height: 0,
243
243
  width: 0,
244
244
  exa: void 0
245
- })), this.#l();
245
+ }));
246
246
  }
247
247
  get height() {
248
248
  return this.#t;
@@ -250,10 +250,10 @@ class ye {
250
250
  get width() {
251
251
  return this.#e;
252
252
  }
253
- #l() {
253
+ init() {
254
254
  for (let e of this.domList)
255
- e.exa = new ge(document.querySelector(e.name)), e.exa.bind((o, l) => {
256
- e.height = l, e.width = o, this.#t.value = 0, this.#e.value = 0;
255
+ e.exa = new ge(document.querySelector(e.name)), e.exa.bind((n, l) => {
256
+ e.height = l, e.width = n, this.#t.value = 0, this.#e.value = 0;
257
257
  for (let s of this.domList)
258
258
  switch (s.type) {
259
259
  case "+":
@@ -307,14 +307,14 @@ const je = {
307
307
  }),
308
308
  emits: /* @__PURE__ */ L(["change"], ["update:modelValue"]),
309
309
  setup(a, { emit: e }) {
310
- const o = R(a, "modelValue"), l = a, { label: s, format: t, border: n, width: m, span: r } = j(l), h = e, D = (_) => {
310
+ const n = R(a, "modelValue"), l = a, { label: s, format: t, border: o, width: m, span: r } = j(l), h = e, D = (_) => {
311
311
  h("change", _);
312
312
  };
313
313
  return (_, w) => {
314
314
  const V = v("el-date-picker");
315
315
  return p(), A("div", {
316
316
  class: "mic-search-item",
317
- style: E({ border: u(n), "grid-column": `span ${u(r)}` })
317
+ style: E({ border: u(o), "grid-column": `span ${u(r)}` })
318
318
  }, [
319
319
  b("div", {
320
320
  class: "mic-search-item-left",
@@ -322,8 +322,8 @@ const je = {
322
322
  }, K(u(s)), 5),
323
323
  b("div", be, [
324
324
  C(V, I({
325
- modelValue: o.value,
326
- "onUpdate:modelValue": w[0] || (w[0] = (x) => o.value = x),
325
+ modelValue: n.value,
326
+ "onUpdate:modelValue": w[0] || (w[0] = (x) => n.value = x),
327
327
  format: u(t),
328
328
  "value-format": u(t),
329
329
  "range-separator": "-"
@@ -362,7 +362,7 @@ const je = {
362
362
  }),
363
363
  emits: /* @__PURE__ */ L(["change", "keydown"], ["update:modelValue"]),
364
364
  setup(a, { emit: e }) {
365
- const o = R(a, "modelValue"), l = a, { label: s, border: t, width: n, span: m } = j(l), r = e, h = (_) => {
365
+ const n = R(a, "modelValue"), l = a, { label: s, border: t, width: o, span: m } = j(l), r = e, h = (_) => {
366
366
  r("change", _);
367
367
  }, D = () => {
368
368
  r("keydown");
@@ -375,12 +375,12 @@ const je = {
375
375
  }, [
376
376
  b("div", {
377
377
  class: "mic-search-item-left",
378
- style: E({ width: u(n) })
378
+ style: E({ width: u(o) })
379
379
  }, K(u(s)), 5),
380
380
  b("div", _e, [
381
381
  C(V, I({
382
- modelValue: o.value,
383
- "onUpdate:modelValue": w[0] || (w[0] = (x) => o.value = x),
382
+ modelValue: n.value,
383
+ "onUpdate:modelValue": w[0] || (w[0] = (x) => n.value = x),
384
384
  onInput: h,
385
385
  onKeydown: X(D, ["enter"])
386
386
  }, _.$attrs), null, 16, ["modelValue"])
@@ -399,10 +399,10 @@ const je = {
399
399
  }
400
400
  },
401
401
  setup(a) {
402
- const e = a, { span: o } = j(e);
402
+ const e = a, { span: n } = j(e);
403
403
  return (l, s) => (p(), A("div", {
404
404
  class: "mic-search-box",
405
- style: E({ "grid-template-columns": `repeat(${u(o)}, calc( 100% / ${u(o)} - 12px * ${u(o) - 1} / ${u(o)} ))` })
405
+ style: E({ "grid-template-columns": `repeat(${u(n)}, calc( 100% / ${u(n)} - 12px * ${u(n) - 1} / ${u(n)} ))` })
406
406
  }, [
407
407
  T(l.$slots, "default")
408
408
  ], 4));
@@ -443,14 +443,14 @@ const je = {
443
443
  }),
444
444
  emits: /* @__PURE__ */ L(["change"], ["update:modelValue"]),
445
445
  setup(a, { emit: e }) {
446
- const o = R(a, "modelValue"), l = a, { label: s, options: t, border: n, width: m, span: r } = j(l), h = e, D = (_) => {
446
+ const n = R(a, "modelValue"), l = a, { label: s, options: t, border: o, width: m, span: r } = j(l), h = e, D = (_) => {
447
447
  h("change", _);
448
448
  };
449
449
  return (_, w) => {
450
450
  const V = v("el-option"), x = v("el-select");
451
451
  return p(), A("div", {
452
452
  class: "mic-search-item",
453
- style: E({ border: u(n), "grid-column": `span ${u(r)}` })
453
+ style: E({ border: u(o), "grid-column": `span ${u(r)}` })
454
454
  }, [
455
455
  b("div", {
456
456
  class: "mic-search-item-left",
@@ -458,8 +458,8 @@ const je = {
458
458
  }, K(u(s)), 5),
459
459
  b("div", xe, [
460
460
  C(x, I({
461
- modelValue: o.value,
462
- "onUpdate:modelValue": w[0] || (w[0] = (g) => o.value = g),
461
+ modelValue: n.value,
462
+ "onUpdate:modelValue": w[0] || (w[0] = (g) => n.value = g),
463
463
  onChange: D
464
464
  }, _.$attrs), {
465
465
  default: k(() => [
@@ -485,10 +485,10 @@ const je = {
485
485
  }
486
486
  },
487
487
  setup(a) {
488
- const e = a, { span: o } = j(e);
488
+ const e = a, { span: n } = j(e);
489
489
  return (l, s) => (p(), A("div", {
490
490
  class: "mic-search-vac",
491
- style: E({ "grid-column": `span ${u(o)}` })
491
+ style: E({ "grid-column": `span ${u(n)}` })
492
492
  }, [
493
493
  T(l.$slots, "default")
494
494
  ], 4));
@@ -541,8 +541,8 @@ const je = {
541
541
  }
542
542
  },
543
543
  emits: ["selection-change", "page-change"],
544
- setup(a, { expose: e, emit: o }) {
545
- const l = a, { tableData: s, columns: t, page: n } = j(l), m = o, r = P({
544
+ setup(a, { expose: e, emit: n }) {
545
+ const l = a, { tableData: s, columns: t, page: o } = j(l), m = n, r = F({
546
546
  isCurrentAll: !1,
547
547
  //是否全选
548
548
  isIndeterminate: !1,
@@ -585,15 +585,15 @@ const je = {
585
585
  }), r.isCurrentAll = !1, r.isIndeterminate = !1, r.selectData = [], m("selection-change", []);
586
586
  }, x = (c) => {
587
587
  m("page-change", {
588
- total: n.value.total,
589
- currentPage: n.value.currentPage,
588
+ total: o.value.total,
589
+ currentPage: o.value.currentPage,
590
590
  pageSize: c
591
591
  });
592
592
  }, g = (c) => {
593
593
  m("page-change", {
594
- total: n.value.total,
594
+ total: o.value.total,
595
595
  currentPage: c,
596
- pageSize: n.value.pageSize
596
+ pageSize: o.value.pageSize
597
597
  });
598
598
  };
599
599
  return e({
@@ -636,20 +636,23 @@ const je = {
636
636
  C(f, {
637
637
  style: { height: "20px" },
638
638
  modelValue: y.row.checked,
639
- "onUpdate:modelValue": (H) => y.row.checked = H,
639
+ "onUpdate:modelValue": (N) => y.row.checked = N,
640
640
  disabled: y.row.disabled,
641
- onChange: (H) => _(y.row)
641
+ onChange: (N) => _(y.row)
642
642
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "onChange"])
643
643
  ]),
644
644
  _: 1
645
- }, 16)) : i?.hidden ? F("", !0) : (p(), $(S, I({
645
+ }, 16)) : i?.hidden ? H("", !0) : (p(), $(S, I({
646
646
  key: 1,
647
647
  type: i?.type
648
648
  }, { ref_for: !0 }, i.attr), te({ _: 2 }, [
649
649
  c.$slots?.[i.attr?.prop] ? {
650
650
  name: "default",
651
- fn: k((y) => [
652
- T(c.$slots, i.attr?.prop, { scope: y })
651
+ fn: k(({ row: y, $index: N }) => [
652
+ T(c.$slots, i.attr?.prop, {
653
+ row: y,
654
+ index: N
655
+ })
653
656
  ]),
654
657
  key: "0"
655
658
  } : void 0
@@ -665,19 +668,19 @@ const je = {
665
668
  size: "small",
666
669
  onSizeChange: x,
667
670
  "page-sizes": [10, 20, 50, 100],
668
- "page-size": u(n).pageSize,
671
+ "page-size": u(o).pageSize,
669
672
  layout: "total,sizes",
670
- total: u(n).total
673
+ total: u(o).total
671
674
  }, null, 8, ["page-size", "total"])
672
675
  ]),
673
676
  C(M, {
674
677
  onCurrentChange: g,
675
678
  size: "small",
676
- "current-page": u(n).currentPage,
679
+ "current-page": u(o).currentPage,
677
680
  "page-sizes": [10, 20, 50, 100],
678
- "page-size": u(n).pageSize,
681
+ "page-size": u(o).pageSize,
679
682
  layout: "prev, pager, next",
680
- total: u(n).total
683
+ total: u(o).total
681
684
  }, null, 8, ["current-page", "page-size", "total"])
682
685
  ])
683
686
  ]);
@@ -722,19 +725,19 @@ const je = {
722
725
  }),
723
726
  emits: /* @__PURE__ */ L(["confirm"], ["update:show", "update:form"]),
724
727
  setup(a, { emit: e }) {
725
- const o = R(a, "show"), l = R(a, "form"), s = a, t = e, n = le(), m = () => {
726
- o.value = !1;
728
+ const n = R(a, "show"), l = R(a, "form"), s = a, t = e, o = le(), m = () => {
729
+ n.value = !1;
727
730
  }, r = () => {
728
- n.value.validate(async (h) => {
731
+ o.value.validate(async (h) => {
729
732
  h && t("confirm", l);
730
733
  });
731
734
  };
732
735
  return (h, D) => {
733
736
  const _ = v("el-input"), w = v("el-date-picker"), V = v("el-option"), x = v("el-select"), g = v("el-form-item"), c = v("el-col"), d = v("el-row"), f = v("el-form"), S = v("el-button"), z = v("el-dialog");
734
- return o.value ? (p(), $(z, I({
737
+ return n.value ? (p(), $(z, I({
735
738
  key: 0,
736
- modelValue: o.value,
737
- "onUpdate:modelValue": D[0] || (D[0] = (M) => o.value = M)
739
+ modelValue: n.value,
740
+ "onUpdate:modelValue": D[0] || (D[0] = (M) => n.value = M)
738
741
  }, h.$attrs), {
739
742
  footer: k(() => [
740
743
  b("div", qe, [
@@ -763,13 +766,13 @@ const je = {
763
766
  C(f, {
764
767
  model: l.value,
765
768
  ref_key: "formRef",
766
- ref: n,
769
+ ref: o,
767
770
  rules: s?.rules,
768
771
  "label-width": s.labelWidth
769
772
  }, {
770
773
  default: k(() => [
771
774
  (p(!0), A(U, null, B(s.formList, (M) => (p(), A(U, null, [
772
- M.module ? (p(), A("p", Le, K(M.module), 1)) : F("", !0),
775
+ M.module ? (p(), A("p", Le, K(M.module), 1)) : H("", !0),
773
776
  C(d, { gutter: 20 }, {
774
777
  default: k(() => [
775
778
  (p(!0), A(U, null, B(M.children, (i) => (p(), $(c, {
@@ -785,15 +788,15 @@ const je = {
785
788
  key: 0,
786
789
  modelValue: l.value[i.prop],
787
790
  "onUpdate:modelValue": (y) => l.value[i.prop] = y
788
- }, { ref_for: !0 }, i.attr, O(i.event)), null, 16, ["modelValue", "onUpdate:modelValue"])) : i.type == "time" ? (p(), $(w, I({
791
+ }, { ref_for: !0 }, i.attr, P(i.event)), null, 16, ["modelValue", "onUpdate:modelValue"])) : i.type == "time" ? (p(), $(w, I({
789
792
  key: 1,
790
793
  modelValue: l.value[i.prop],
791
794
  "onUpdate:modelValue": (y) => l.value[i.prop] = y
792
- }, { ref_for: !0 }, i.attr, O(i.event)), null, 16, ["modelValue", "onUpdate:modelValue"])) : i.type == "select" ? (p(), $(x, I({
795
+ }, { ref_for: !0 }, i.attr, P(i.event)), null, 16, ["modelValue", "onUpdate:modelValue"])) : i.type == "select" ? (p(), $(x, I({
793
796
  key: 2,
794
797
  modelValue: l.value[i.prop],
795
798
  "onUpdate:modelValue": (y) => l.value[i.prop] = y
796
- }, { ref_for: !0 }, i.attr, O(i.event)), {
799
+ }, { ref_for: !0 }, i.attr, P(i.event)), {
797
800
  default: k(() => [
798
801
  (p(!0), A(U, null, B(s.optionList?.[i.prop], (y) => (p(), $(V, {
799
802
  key: y.value,
@@ -822,7 +825,7 @@ const je = {
822
825
  }, 8, ["model", "rules", "label-width"])
823
826
  ]),
824
827
  _: 3
825
- }, 16, ["modelValue"])) : F("", !0);
828
+ }, 16, ["modelValue"])) : H("", !0);
826
829
  };
827
830
  }
828
831
  }), Y = {
@@ -836,8 +839,8 @@ const je = {
836
839
  }, Be = {
837
840
  install(a) {
838
841
  Object.keys(Y).forEach((e) => {
839
- const o = Y[e];
840
- a.component(e, o);
842
+ const n = Y[e];
843
+ a.component(e, n);
841
844
  });
842
845
  }
843
846
  };
package/dist/mic.umd.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(C,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(C=typeof globalThis<"u"?globalThis:C||self,e(C["mic-org"]={},C.Vue))})(this,(function(C,e){"use strict";var B=document.createElement("style");B.textContent=`@charset "UTF-8";:root{--mic-theme-color:#005eba;--mic-search-color:#333;--mic-search-background:#fff;--mic-search-interval:1px solid #ddd}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.mic-loader{animation:spin 2s linear infinite}@keyframes loading-rotate{to{transform:rotate(360deg)}}@keyframes custom-spin-move{to{opacity:1}}.circular{display:inline;height:30px;width:30px;animation:loading-rotate 2s linear infinite}.loading-path .dot1{transform:translate(3.75px,3.75px);fill:var(--mic-theme-color);animation:custom-spin-move 1s infinite linear alternate;opacity:.3}.loading-path .dot2{transform:translate(calc(100% - 3.75px),3.75px);fill:var(--mic-theme-color);animation:custom-spin-move 1s infinite linear alternate;opacity:.3;animation-delay:.4s}.loading-path .dot3{transform:translate(3.75px,calc(100% - 3.75px));fill:var(--mic-theme-color);animation:custom-spin-move 1s infinite linear alternate;opacity:.3;animation-delay:1.2s}.loading-path .dot4{transform:translate(calc(100% - 3.75px),calc(100% - 3.75px));fill:var(--mic-theme-color);animation:custom-spin-move 1s infinite linear alternate;opacity:.3;animation-delay:.8s}.mic-search-box{width:100%;display:grid;grid-gap:14px 12px;grid-auto-rows:34px;grid-auto-flow:row dense}.mic-search-vac{display:flex;flex-direction:row;align-items:center;justify-content:flex-end}.mic-search-item{width:100%;height:100%;border-radius:4px;overflow:hidden;background-color:var(--mic-search-background);display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.mic-search-item-left{height:70%;border-right:var(--mic-search-interval);color:var(--mic-search-color);padding:0 6px;line-height:1;display:flex;flex-direction:row;align-items:center;justify-content:center}.mic-search-item-right{flex:1}.mic-search-item .el-date-editor,.mic-search-item .el-input,.mic-search-item .el-select{width:100%!important;height:100%!important}.mic-search-item .el-input__wrapper,.mic-search-item .el-select__wrapper{box-shadow:none;padding:1px 6px}.mic-search-item .el-input-group__append{border:none;background:none;box-shadow:none}.mic-search-item .el-input.is-disabled .el-input__wrapper{background:none}.mic-search-item .el-range__icon,.mic-search-item .el-input__prefix{display:none}.mic-search-item .is-focus,.mic-search-item .is-hovering{box-shadow:none!important}.mic-table{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;background-color:#fff}.mic-table-button{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between}.mic-table-button-left,.mic-table-button-right{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:12px}.mic-table-button-left .el-button+.el-button,.mic-table-button-right .el-button+.el-button{margin:0!important}.mic-table-cont{margin-top:10px;width:100%}.mic-table-page{width:100%;margin-top:10px;display:flex;flex-direction:row;align-items:center;justify-content:space-between}.mic-table-page .el-pager .number{border:1px solid #fff;margin-left:10px}.mic-table-page .el-pager .number:last-child{margin-right:10px}.mic-table-page .el-pager .active{border:1px solid #005eba!important;color:#005eba!important}.mic-dialog-module{position:relative;padding-left:12px;font-size:16px;font-weight:700;margin-bottom:10px}.mic-dialog-module:before{content:"";width:4px;height:18px;border-radius:2px;background-color:#1a6bf3;position:absolute;left:0;top:2px}@keyframes rotate-f3f41b24{0%{transform:rotate(360deg)}to{transform:rotate(0)}}@keyframes grow-f3f41b24{0%{width:18px;margin-left:0}50%{width:0px;margin-left:18px}51%{width:0px;margin-left:0}to{width:18px;margin-left:0}}.msg[data-v-f3f41b24]{width:100%;height:100%;display:flex;flex-direction:row;align-items:center;justify-content:center}.msg-box[data-v-f3f41b24]{display:flex;flex-direction:column;align-items:center}.msg-box .anim[data-v-f3f41b24]{width:18px;height:3px;margin-top:-16px}.msg-box .anim span[data-v-f3f41b24]{display:inline-block;background-color:#fff;height:3px;animation:grow-f3f41b24 infinite linear 1.5s}.msg-box .text[data-v-f3f41b24]{margin-top:20px;color:#fff9;font-size:12px;letter-spacing:1px}
2
- /*$vite$:1*/`,document.head.appendChild(B);const z=new Map([["String",""],["Number",0],["Null",""],["Undefined",""],["Boolean",!1],["Array",[]]]),I=()=>{const l=Array.prototype;l?.equal||(l.equal=function(t){if(this.length===0||!t)return{result:!1,data:[]};const a=Array.isArray(t)?t:new Array(t),n=this[0];return a.every(o=>this.every(r=>r[o]===n[o]))?{result:!0,data:a.map(o=>n[o])}:{result:!1,data:[]}})},$=()=>{const l=Array.prototype;l?.deepIncludes||(l.deepIncludes=function(t){if(this.length===0||!t)return!1;for(let a of this)if(Object.entries(t).every(([i,o])=>a[i]==o))return!0;return!1})},L=()=>{"exact"in Math||Object.defineProperty(Math,"exact",{value:function(l,t,a){let n=new Array(2).fill(0),i=[],o=[];`${l}`.includes(".")&&(i=`${l}`.split("."),n[0]=i?.[1]?.length??0,l=Number(i.join(""))),`${t}`.includes(".")&&(o=`${t}`.split("."),n[1]=o?.[1]?.length,t=Number(o.join("")));let r=Math.max(...n);switch(a){case"*":return l*t/Math.pow(10,n.reduce((p,s)=>p+s,0));case"/":return l*Math.pow(10,r-n[0])/(t*Math.pow(10,r-n[1]));case"+":return(l*Math.pow(10,r-n[0])+t*Math.pow(10,r-n[1]))/Math.pow(10,r);case"-":return(l*Math.pow(10,r-n[0])-t*Math.pow(10,r-n[1]))/Math.pow(10,r)}},writable:!0,configurable:!0,enumerable:!1})};I(),$(),L();const S=l=>Object.prototype.toString.call(l).replace(/^\[object (\S+)\]$/,"$1"),E=(l,t)=>{const a=S(l);if(["String","Number","Null","Undefined","Boolean","Array"].includes(a))return t??z.get(a);{const i=l,o=t,r={};return Object.keys(i).forEach(p=>{r[p]=E(i[p],o?.[p])}),r}};var j=e.defineComponent({name:"Loading",__name:"loading",setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),q=j;const T=(l,t)=>{const a=l.__vccOpts||l;for(const[n,i]of t)a[n]=i;return a},P={},U={class:"msg"};function R(l,t){return e.openBlock(),e.createElementBlock("div",U,[...t[0]||(t[0]=[e.createElementVNode("div",{class:"msg-box"},[e.createElementVNode("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAbCAMAAAAXixzOAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAapQTFRF////////////////////AAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////HTy8uAAAAI50Uk5TrqyPajIAB1en2fPy2KZWQFr/silZ4N9ehegbBZj64eKUBJ53epPXwKJMCE3Cnfh4PkkBhiBsZvtoCUIR71xh7Q8L/DV8q3HOKCzJjV+7/g3W2vdKryexI8d2NKClL8bxXRy6vheaAkflAwb18EgkHxLjZ8S8efnRNznT7iXp9ljD9EPnMzDso+YxOISDaSuSWmEAAAIySURBVHicY2SAAkYQYEACjDDw4z9MiOsjsgIGAUZBFPWf4Gx+xj9QFuvHf1CW0C8Uzewomhk4GF9DGGKMX4EkDyPjvy9gg57g1CzICHElUKPYPYi48ksgm4nxNoMqI+NTBgaZGzDNskheYwRpVrgCZusyAnUqXwQxDe4w8Eieh6r5Z3KLQf0sVPMvZMuRNDOYPPnCoHkayDBjvMqgcwKuxvIygx7jUQKabRjPMxgdAjLszzL8+YGkyOEMg9w1ApodTzP8+g2KF6dTDOZ7kRS5nGCw3I1DsxUoEF6902Q8zKByAcj0OsRgvxUlXH0O2L4+A9bsiNDMvgk1qpw3gsiAPQwfWFA0B+5mcFuHHlXua1E1qymtAZKh2xm8VqFoDt/K4LMCu2Z7PiDz1znLTUDKfykDQ8wGhsDFKJrj1jEELwRrNpRBOHsBUoAlMjKuZGAJmcMg85L9V/xsJL2qjsuif83HH9oMGUsYGGKng6MG5AI4AEb0978MBDRnLQKmp29Arz9j4JU9BVeTzbiAIWYGIc25QKdZ7AEy8uYxJJ89AhX1uvEKmubxaBaNZpzNEH7qMpDprLKUIY2xFyxcwjidIYuxE5dmbUcQa+NjIGF79xZYOEl8MgODNHMAwzfuiQwMBYzNDFDNtqZomhHA8O01KKt+1me4KGt+AwNMMwpA1lzK+LUTzjGxEYZwwnez32bAodkAxorcfhRVSjeisgNYQuy6DBeJP4OmmZWBfDCqmUQAAGtNvMC8einoAAAAAElFTkSuQmCC"}),e.createElementVNode("div",{class:"anim"},[e.createElementVNode("span")]),e.createElementVNode("div",{class:"text"},[e.createElementVNode("span",null,"Loading...")])],-1)])])}const K=T(P,[["render",R],["__scopeId","data-v-f3f41b24"]]),F=(l,{className:t,loadStyle:a})=>{let n={color:"#409EFF",bgColor:"rgba(255,255,255,.8)"},i,o,r;return async p=>{i=document.getElementsByClassName(t)?.[0],o=document.createElement("div"),o.style.display="flex",o.style.flexDirection="row",o.style.alignItems="center",o.style.justifyContent="center",o.style.cursor="not-allowed",o.style.backgroundColor=a?.bgColor??n.bgColor;const s=g=>{g.stopPropagation(),g.preventDefault()};o.addEventListener("click",s);try{if(i){i.style.position="relative",o.style.position="absolute",o.style.left="-1px",o.style.top="-1px",o.style.zIndex="10",o.style.width="calc(100% + 2px)",o.style.height="calc(100% + 2px)";const g=e.h(q,{class:"mic-loader",style:{color:a?.color??n.color,width:"14px",height:"14px"}});e.render(g,o),i.appendChild(o)}else{r=document.body.style.overflow,document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",o.style.position="fixed",o.style.zIndex="99999",o.style.left="0",o.style.top="0",o.style.width="100vw",o.style.height="100vh";const g=e.h(K);e.render(g,o),document.body.appendChild(o)}await l(p)}catch(g){console.error("~~ ==== 💥💥💥💥 ==== ~ Load ~~",g)}finally{o.removeEventListener("click",s),i?i.removeChild(o):(document.body.style.overflow=r,document.documentElement.style.overflow=r,document.body.removeChild(o)),o=null,i=null}}},O=l=>{const t=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],a=["","拾","佰","仟","万","拾","佰","仟","亿","拾","佰","仟"],n=["角","分"],i=/^(\d{1,12})(\.(\d{1,2}))?$/;if(l==null)return"零元整";const o=String(l).trim().replace(/,/g,"");if(!i.test(o))throw new Error("金额格式错误!仅支持12位整数+2位小数");const[r="",p=""]=o.split("."),s=parseInt(r,10),g=p.padEnd(2,"0");function w(x){let h="",d=!1;const m=x.length;for(let f=0;f<m;f++){const A=parseInt(x[f],10),V=m-1-f,_=a[V];A===0?(d=!0,(_==="万"||_==="亿")&&(h+=_,d=!1)):(d&&(h+="零"),h+=t[A]+_,d=!1)}return h=h.replace(/亿万/,"亿"),h||"零"}function b(x){let h="";const d=parseInt(x[0],10),m=parseInt(x[1],10);return d!==0&&(h+=t[d]+n[0],m===0&&(h+="整")),m!==0&&(d===0&&s!==0&&(h+="零"),h+=t[m]+n[1]),h}const y=w(r),k=b(g);return k?`${y}元${k}`:`${y}元整`},M=(l,t)=>{const a=Object.prototype.toString.call(l).replace(/^\[object (\S+)\]$/,"$1"),n=Object.prototype.toString.call(t).replace(/^\[object (\S+)\]$/,"$1");if(a!=n)return!1;if(["String","Number","Null","Undefined","Boolean"].includes(a))return l===t;if(a==="File"){let o=["name","size","type","lastModified"];for(let r of o)if(!M(l[r],t[r]))return!1}if(a=="Object"){for(let[o,r]of Object.entries(l))if(!M(r,t[o]))return!1}if(a=="Array"){if(l.length!=t.length)return!1;for(let o=0;o<l.length;o++)if(!M(l[o],t[o]))return!1}return!0},H={check:S,reset:E,capital:O,equal:M,load:F};class G{element;observer;constructor(t){this.element=t,this.observer=void 0}bind(t){!this.element||this.observer||(this.observer=new ResizeObserver(a=>{const n=a[0];if(!n?.contentRect)return;const{width:i,height:o}=n.contentRect,r=window.getComputedStyle(this.element);t?.(i+parseInt(r.marginLeft)+parseInt(r.marginRight),o+parseInt(r.marginTop)+parseInt(r.marginBottom))}),this.observer.observe(this.element,{box:"border-box"}))}unbind(){this.observer&&this.element&&this.observer.unobserve(this.element),this.observer=void 0}destroy(){this.observer?.disconnect(),this.observer=void 0,this.element=null}}class Z{domList;#e=e.reactive({value:0});#t=e.reactive({value:0});constructor(t){this.domList=t.map(a=>({...a,height:0,width:0,exa:void 0})),this.#o()}get height(){return this.#t}get width(){return this.#e}#o(){for(let t of this.domList)t.exa=new G(document.querySelector(t.name)),t.exa.bind((a,n)=>{t.height=n,t.width=a,this.#t.value=0,this.#e.value=0;for(let i of this.domList)switch(i.type){case"+":this.#t.value+=i?.height,this.#e.value+=i?.width;break;case"-":this.#t.value-=i?.height,this.#e.value-=i?.width;break}})}close(){for(let t of this.domList)t.exa&&t.exa.destroy()}}const Q={domHeight:Z},Y={class:"mic-search-item-right"},W=e.defineComponent({name:"MicDate",__name:"index",props:e.mergeModels({label:{type:String,required:!0},format:{type:String,required:!0},border:{type:String,required:!1,default:()=>"1px solid #ccc"},width:{type:String,required:!1,default:()=>"100px"},span:{type:Number,required:!1,default:()=>1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(l,{emit:t}){const a=e.useModel(l,"modelValue"),n=l,{label:i,format:o,border:r,width:p,span:s}=e.toRefs(n),g=t,w=b=>{g("change",b)};return(b,y)=>{const k=e.resolveComponent("el-date-picker");return e.openBlock(),e.createElementBlock("div",{class:"mic-search-item",style:e.normalizeStyle({border:e.unref(r),"grid-column":`span ${e.unref(s)}`})},[e.createElementVNode("div",{class:"mic-search-item-left",style:e.normalizeStyle({width:e.unref(p)})},e.toDisplayString(e.unref(i)),5),e.createElementVNode("div",Y,[e.createVNode(k,e.mergeProps({modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=x=>a.value=x),format:e.unref(o),"value-format":e.unref(o),"range-separator":"-"},b.$attrs,{onChange:w}),null,16,["modelValue","format","value-format"])])],4)}}}),J={class:"mic-search-item-right"},X=e.defineComponent({name:"MicInput",__name:"index",props:e.mergeModels({label:{label:String,required:!0},border:{type:String,required:!1,default:()=>"1px solid #ccc"},width:{type:String,required:!1,default:()=>"100px"},span:{type:Number,required:!1,default:()=>1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","keydown"],["update:modelValue"]),setup(l,{emit:t}){const a=e.useModel(l,"modelValue"),n=l,{label:i,border:o,width:r,span:p}=e.toRefs(n),s=t,g=b=>{s("change",b)},w=()=>{s("keydown")};return(b,y)=>{const k=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",{class:"mic-search-item",style:e.normalizeStyle({border:e.unref(o),"grid-column":`span ${e.unref(p)}`})},[e.createElementVNode("div",{class:"mic-search-item-left",style:e.normalizeStyle({width:e.unref(r)})},e.toDisplayString(e.unref(i)),5),e.createElementVNode("div",J,[e.createVNode(k,e.mergeProps({modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=x=>a.value=x),onInput:g,onKeydown:e.withKeys(w,["enter"])},b.$attrs),null,16,["modelValue"])])],4)}}}),v=e.defineComponent({name:"MicSearch",__name:"index",props:{span:{type:Number,required:!1,default:()=>4}},setup(l){const t=l,{span:a}=e.toRefs(t);return(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mic-search-box",style:e.normalizeStyle({"grid-template-columns":`repeat(${e.unref(a)}, calc( 100% / ${e.unref(a)} - 12px * ${e.unref(a)-1} / ${e.unref(a)} ))`})},[e.renderSlot(n.$slots,"default")],4))}}),ee={class:"mic-search-item-right"},te=e.defineComponent({name:"MicSelect",__name:"index",props:e.mergeModels({label:{type:String,required:!0},options:{type:Array,required:!0},border:{type:String,required:!1,default:()=>"1px solid #ccc"},width:{type:String,required:!1,default:()=>"100px"},span:{type:Number,required:!1,default:()=>1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(l,{emit:t}){const a=e.useModel(l,"modelValue"),n=l,{label:i,options:o,border:r,width:p,span:s}=e.toRefs(n),g=t,w=b=>{g("change",b)};return(b,y)=>{const k=e.resolveComponent("el-option"),x=e.resolveComponent("el-select");return e.openBlock(),e.createElementBlock("div",{class:"mic-search-item",style:e.normalizeStyle({border:e.unref(r),"grid-column":`span ${e.unref(s)}`})},[e.createElementVNode("div",{class:"mic-search-item-left",style:e.normalizeStyle({width:e.unref(p)})},e.toDisplayString(e.unref(i)),5),e.createElementVNode("div",ee,[e.createVNode(x,e.mergeProps({modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=h=>a.value=h),onChange:w},b.$attrs),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),h=>(e.openBlock(),e.createBlock(k,{key:h.value,label:h.label,value:h.value},null,8,["label","value"]))),128))]),_:1},16,["modelValue"])])],4)}}}),oe=e.defineComponent({name:"MicVac",__name:"index",props:{span:{type:Number,default:()=>1}},setup(l){const t=l,{span:a}=e.toRefs(t);return(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mic-search-vac",style:e.normalizeStyle({"grid-column":`span ${e.unref(a)}`})},[e.renderSlot(n.$slots,"default")],4))}}),ne={class:"mic-table"},le={class:"mic-table-button"},ae={class:"mic-table-button-left"},re={class:"mic-table-button-right"},ie={class:"mic-table-cont"},se={class:"mic-table-page"},ce={class:"mic-table-page-left"},de=e.defineComponent({name:"MicTable",__name:"index",props:{tableAttr:{type:Object,required:!1,default:()=>({})},tableData:{type:Array,required:!0},columns:{type:Array,required:!0},selectSingle:{type:Boolean,required:!1,default:!1},selectKey:{type:String,required:!1},disabledCondition:{type:Function,default:null},page:{type:Object,required:!1,default:{pageSize:100,currentPage:1,total:0}}},emits:["selection-change","page-change"],setup(l,{expose:t,emit:a}){const n=l,{tableData:i,columns:o,page:r}=e.toRefs(n),p=a,s=e.reactive({isCurrentAll:!1,isIndeterminate:!1,selectData:[],processedTableData:[]}),g=()=>{s.processedTableData=i.value.map(d=>{const m={...d};return m.checked=!1,n?.disabledCondition?m.disabled=n.disabledCondition(m):m.disabled=!1,m})};e.watch(i,()=>{g()},{immediate:!0,deep:!0});const w=d=>{n.selectSingle||(s.isIndeterminate=!1,s.processedTableData.forEach(m=>{m.disabled||(m.checked=d)}),s.selectData=s.processedTableData.filter(m=>!m.disabled&&m.checked),p("selection-change",s.selectData))},b=(d,m)=>{if(n.selectSingle)s.processedTableData.forEach(f=>{f?.[n.selectKey]!=d?.[n.selectKey]&&(f.checked=!1)});else{const f=s.processedTableData.filter(V=>!V.disabled),A=f.filter(V=>V.checked);A.length===0?(s.isCurrentAll=!1,s.isIndeterminate=!1):A.length===f.length?(s.isCurrentAll=!0,s.isIndeterminate=!1):(s.isCurrentAll=!1,s.isIndeterminate=!0)}s.selectData=s.processedTableData.filter(f=>f.checked),p("selection-change",s.selectData)},y=d=>{let m=d.map(f=>f?.[n?.selectKey]);s.processedTableData.forEach(f=>{f.checked=m.includes(f?.[n?.selectKey])}),s.selectData=s.processedTableData.filter(f=>f.checked),p("selection-change",s.selectData)},k=()=>{s.processedTableData.forEach(d=>{d.checked=!1}),s.isCurrentAll=!1,s.isIndeterminate=!1,s.selectData=[],p("selection-change",[])},x=d=>{p("page-change",{total:r.value.total,currentPage:r.value.currentPage,pageSize:d})},h=d=>{p("page-change",{total:r.value.total,currentPage:d,pageSize:r.value.pageSize})};return t({clearSelection:k,setSelection:y}),(d,m)=>{const f=e.resolveComponent("el-checkbox"),A=e.resolveComponent("el-table-column"),V=e.resolveComponent("el-table"),_=e.resolveComponent("el-pagination");return e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",le,[e.createElementVNode("div",ae,[e.renderSlot(d.$slots,"buttonLeft")]),e.createElementVNode("div",re,[e.renderSlot(d.$slots,"buttonRight")])]),e.createElementVNode("div",ie,[e.createVNode(V,e.mergeProps({data:s.processedTableData,"header-cell-style":{background:"#F6F8FC",fontWeight:400,color:"#333"},stripe:""},n.tableAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),c=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c?.type=="select"&&!c?.hidden?(e.openBlock(),e.createBlock(A,e.mergeProps({key:0,ref_for:!0},c.attr),{header:e.withCtx(()=>[e.createVNode(f,{style:{height:"20px"},disabled:n.selectSingle,indeterminate:s.isIndeterminate,modelValue:s.isCurrentAll,"onUpdate:modelValue":m[0]||(m[0]=u=>s.isCurrentAll=u),onChange:m[1]||(m[1]=(u=>w(u)))},null,8,["disabled","indeterminate","modelValue"])]),default:e.withCtx(u=>[e.createVNode(f,{style:{height:"20px"},modelValue:u.row.checked,"onUpdate:modelValue":N=>u.row.checked=N,disabled:u.row.disabled,onChange:N=>b(u.row)},null,8,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:1},16)):c?.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(A,e.mergeProps({key:1,type:c?.type},{ref_for:!0},c.attr),e.createSlots({_:2},[d.$slots?.[c.attr?.prop]?{name:"default",fn:e.withCtx(u=>[e.renderSlot(d.$slots,c.attr?.prop,{scope:u})]),key:"0"}:void 0]),1040,["type"]))],64))),256))]),_:3},16,["data"])]),e.createElementVNode("div",se,[e.createElementVNode("div",ce,[e.createVNode(_,{size:"small",onSizeChange:x,"page-sizes":[10,20,50,100],"page-size":e.unref(r).pageSize,layout:"total,sizes",total:e.unref(r).total},null,8,["page-size","total"])]),e.createVNode(_,{onCurrentChange:h,size:"small","current-page":e.unref(r).currentPage,"page-sizes":[10,20,50,100],"page-size":e.unref(r).pageSize,layout:"prev, pager, next",total:e.unref(r).total},null,8,["current-page","page-size","total"])])])}}}),me={key:0,class:"mic-dialog-module"},pe={class:"dialog-footer"},D={MicDate:W,MicInput:X,MicSearch:v,MicSelect:te,MicVac:oe,MicTable:de,MicDialog:e.defineComponent({name:"MicDialog",__name:"index",props:e.mergeModels({labelWidth:{type:String,default:"120px"},formList:{type:Array,required:!0},optionList:{type:Object,default:()=>({})},rules:{type:Object,default:()=>({})},cancelText:{type:String,default:"取消"},confirmText:{type:String,default:"确认"}},{show:{},showModifiers:{},form:{},formModifiers:{}}),emits:e.mergeModels(["confirm"],["update:show","update:form"]),setup(l,{emit:t}){const a=e.useModel(l,"show"),n=e.useModel(l,"form"),i=l,o=t,r=e.ref(),p=()=>{a.value=!1},s=()=>{r.value.validate(async g=>{g&&o("confirm",n)})};return(g,w)=>{const b=e.resolveComponent("el-input"),y=e.resolveComponent("el-date-picker"),k=e.resolveComponent("el-option"),x=e.resolveComponent("el-select"),h=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-col"),m=e.resolveComponent("el-row"),f=e.resolveComponent("el-form"),A=e.resolveComponent("el-button"),V=e.resolveComponent("el-dialog");return a.value?(e.openBlock(),e.createBlock(V,e.mergeProps({key:0,modelValue:a.value,"onUpdate:modelValue":w[0]||(w[0]=_=>a.value=_)},g.$attrs),{footer:e.withCtx(()=>[e.createElementVNode("div",pe,[e.createVNode(A,{class:"mic-dialog-close",onClick:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.cancelText),1)]),_:1}),e.createVNode(A,{type:"primary",class:"mic-dialog-confirm",onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.confirmText),1)]),_:1})])]),default:e.withCtx(()=>[e.createVNode(f,{model:n.value,ref_key:"formRef",ref:r,rules:i?.rules,"label-width":i.labelWidth},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.formList,_=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[_.module?(e.openBlock(),e.createElementBlock("p",me,e.toDisplayString(_.module),1)):e.createCommentVNode("",!0),e.createVNode(m,{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.children,c=>(e.openBlock(),e.createBlock(d,{span:c.span},{default:e.withCtx(()=>[e.createVNode(h,{label:c.label,prop:c.prop},{default:e.withCtx(()=>[c.type=="input"?(e.openBlock(),e.createBlock(b,e.mergeProps({key:0,modelValue:n.value[c.prop],"onUpdate:modelValue":u=>n.value[c.prop]=u},{ref_for:!0},c.attr,e.toHandlers(c.event)),null,16,["modelValue","onUpdate:modelValue"])):c.type=="time"?(e.openBlock(),e.createBlock(y,e.mergeProps({key:1,modelValue:n.value[c.prop],"onUpdate:modelValue":u=>n.value[c.prop]=u},{ref_for:!0},c.attr,e.toHandlers(c.event)),null,16,["modelValue","onUpdate:modelValue"])):c.type=="select"?(e.openBlock(),e.createBlock(x,e.mergeProps({key:2,modelValue:n.value[c.prop],"onUpdate:modelValue":u=>n.value[c.prop]=u},{ref_for:!0},c.attr,e.toHandlers(c.event)),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.optionList?.[c.prop],u=>(e.openBlock(),e.createBlock(k,{key:u.value,label:u.label,value:u.value},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue"])):e.renderSlot(g.$slots,c?.prop,{key:3,form:n.value,attr:c?.attr})]),_:2},1032,["label","prop"])]),_:2},1032,["span"]))),256))]),_:2},1024)],64))),256))]),_:3},8,["model","rules","label-width"])]),_:3},16,["modelValue"])):e.createCommentVNode("",!0)}}})},fe={install(l){Object.keys(D).forEach(t=>{const a=D[t];l.component(t,a)})}};C.Mic=Q,C.default=fe,C.mic=H,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ (function(C,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(C=typeof globalThis<"u"?globalThis:C||self,e(C["mic-org"]={},C.Vue))})(this,(function(C,e){"use strict";var S=document.createElement("style");S.textContent=`@charset "UTF-8";:root{--mic-theme-color:#005eba;--mic-search-color:#333;--mic-search-background:#fff;--mic-search-interval:1px solid #ddd}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.mic-loader{animation:spin 2s linear infinite}@keyframes loading-rotate{to{transform:rotate(360deg)}}@keyframes custom-spin-move{to{opacity:1}}.circular{display:inline;height:30px;width:30px;animation:loading-rotate 2s linear infinite}.loading-path .dot1{transform:translate(3.75px,3.75px);fill:var(--mic-theme-color);animation:custom-spin-move 1s infinite linear alternate;opacity:.3}.loading-path .dot2{transform:translate(calc(100% - 3.75px),3.75px);fill:var(--mic-theme-color);animation:custom-spin-move 1s infinite linear alternate;opacity:.3;animation-delay:.4s}.loading-path .dot3{transform:translate(3.75px,calc(100% - 3.75px));fill:var(--mic-theme-color);animation:custom-spin-move 1s infinite linear alternate;opacity:.3;animation-delay:1.2s}.loading-path .dot4{transform:translate(calc(100% - 3.75px),calc(100% - 3.75px));fill:var(--mic-theme-color);animation:custom-spin-move 1s infinite linear alternate;opacity:.3;animation-delay:.8s}.mic-search-box{width:100%;display:grid;grid-gap:14px 12px;grid-auto-rows:34px;grid-auto-flow:row dense}.mic-search-vac{display:flex;flex-direction:row;align-items:center;justify-content:flex-end}.mic-search-item{width:100%;height:100%;border-radius:4px;overflow:hidden;background-color:var(--mic-search-background);display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.mic-search-item-left{height:70%;border-right:var(--mic-search-interval);color:var(--mic-search-color);padding:0 6px;line-height:1;display:flex;flex-direction:row;align-items:center;justify-content:center}.mic-search-item-right{flex:1}.mic-search-item .el-date-editor,.mic-search-item .el-input,.mic-search-item .el-select{width:100%!important;height:100%!important}.mic-search-item .el-input__wrapper,.mic-search-item .el-select__wrapper{box-shadow:none;padding:1px 6px}.mic-search-item .el-input-group__append{border:none;background:none;box-shadow:none}.mic-search-item .el-input.is-disabled .el-input__wrapper{background:none}.mic-search-item .el-range__icon,.mic-search-item .el-input__prefix{display:none}.mic-search-item .is-focus,.mic-search-item .is-hovering{box-shadow:none!important}.mic-table{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;background-color:#fff}.mic-table-button{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between}.mic-table-button-left,.mic-table-button-right{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:12px}.mic-table-button-left .el-button+.el-button,.mic-table-button-right .el-button+.el-button{margin:0!important}.mic-table-cont{margin-top:10px;width:100%}.mic-table-page{width:100%;margin-top:10px;display:flex;flex-direction:row;align-items:center;justify-content:space-between}.mic-table-page .el-pager .number{border:1px solid #fff;margin-left:10px}.mic-table-page .el-pager .number:last-child{margin-right:10px}.mic-table-page .el-pager .active{border:1px solid #005eba!important;color:#005eba!important}.mic-dialog-module{position:relative;padding-left:12px;font-size:16px;font-weight:700;margin-bottom:10px}.mic-dialog-module:before{content:"";width:4px;height:18px;border-radius:2px;background-color:#1a6bf3;position:absolute;left:0;top:2px}@keyframes rotate-f3f41b24{0%{transform:rotate(360deg)}to{transform:rotate(0)}}@keyframes grow-f3f41b24{0%{width:18px;margin-left:0}50%{width:0px;margin-left:18px}51%{width:0px;margin-left:0}to{width:18px;margin-left:0}}.msg[data-v-f3f41b24]{width:100%;height:100%;display:flex;flex-direction:row;align-items:center;justify-content:center}.msg-box[data-v-f3f41b24]{display:flex;flex-direction:column;align-items:center}.msg-box .anim[data-v-f3f41b24]{width:18px;height:3px;margin-top:-16px}.msg-box .anim span[data-v-f3f41b24]{display:inline-block;background-color:#fff;height:3px;animation:grow-f3f41b24 infinite linear 1.5s}.msg-box .text[data-v-f3f41b24]{margin-top:20px;color:#fff9;font-size:12px;letter-spacing:1px}
2
+ /*$vite$:1*/`,document.head.appendChild(S);const z=new Map([["String",""],["Number",0],["Null",""],["Undefined",""],["Boolean",!1],["Array",[]]]),I=()=>{const l=Array.prototype;l?.equal||(l.equal=function(t){if(this.length===0||!t)return{result:!1,data:[]};const a=Array.isArray(t)?t:new Array(t),n=this[0];return a.every(o=>this.every(r=>r[o]===n[o]))?{result:!0,data:a.map(o=>n[o])}:{result:!1,data:[]}})},$=()=>{const l=Array.prototype;l?.deepIncludes||(l.deepIncludes=function(t){if(this.length===0||!t)return!1;for(let a of this)if(Object.entries(t).every(([i,o])=>a[i]==o))return!0;return!1})},L=()=>{"exact"in Math||Object.defineProperty(Math,"exact",{value:function(l,t,a){let n=new Array(2).fill(0),i=[],o=[];`${l}`.includes(".")&&(i=`${l}`.split("."),n[0]=i?.[1]?.length??0,l=Number(i.join(""))),`${t}`.includes(".")&&(o=`${t}`.split("."),n[1]=o?.[1]?.length,t=Number(o.join("")));let r=Math.max(...n);switch(a){case"*":return l*t/Math.pow(10,n.reduce((p,s)=>p+s,0));case"/":return l*Math.pow(10,r-n[0])/(t*Math.pow(10,r-n[1]));case"+":return(l*Math.pow(10,r-n[0])+t*Math.pow(10,r-n[1]))/Math.pow(10,r);case"-":return(l*Math.pow(10,r-n[0])-t*Math.pow(10,r-n[1]))/Math.pow(10,r)}},writable:!0,configurable:!0,enumerable:!1})};I(),$(),L();const E=l=>Object.prototype.toString.call(l).replace(/^\[object (\S+)\]$/,"$1"),D=(l,t)=>{const a=E(l);if(["String","Number","Null","Undefined","Boolean","Array"].includes(a))return t??z.get(a);{const i=l,o=t,r={};return Object.keys(i).forEach(p=>{r[p]=D(i[p],o?.[p])}),r}};var j=e.defineComponent({name:"Loading",__name:"loading",setup(l){return(t,a)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),q=j;const T=(l,t)=>{const a=l.__vccOpts||l;for(const[n,i]of t)a[n]=i;return a},P={},U={class:"msg"};function R(l,t){return e.openBlock(),e.createElementBlock("div",U,[...t[0]||(t[0]=[e.createElementVNode("div",{class:"msg-box"},[e.createElementVNode("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAbCAMAAAAXixzOAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAapQTFRF////////////////////AAAA////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////HTy8uAAAAI50Uk5TrqyPajIAB1en2fPy2KZWQFr/silZ4N9ehegbBZj64eKUBJ53epPXwKJMCE3Cnfh4PkkBhiBsZvtoCUIR71xh7Q8L/DV8q3HOKCzJjV+7/g3W2vdKryexI8d2NKClL8bxXRy6vheaAkflAwb18EgkHxLjZ8S8efnRNznT7iXp9ljD9EPnMzDso+YxOISDaSuSWmEAAAIySURBVHicY2SAAkYQYEACjDDw4z9MiOsjsgIGAUZBFPWf4Gx+xj9QFuvHf1CW0C8Uzewomhk4GF9DGGKMX4EkDyPjvy9gg57g1CzICHElUKPYPYi48ksgm4nxNoMqI+NTBgaZGzDNskheYwRpVrgCZusyAnUqXwQxDe4w8Eieh6r5Z3KLQf0sVPMvZMuRNDOYPPnCoHkayDBjvMqgcwKuxvIygx7jUQKabRjPMxgdAjLszzL8+YGkyOEMg9w1ApodTzP8+g2KF6dTDOZ7kRS5nGCw3I1DsxUoEF6902Q8zKByAcj0OsRgvxUlXH0O2L4+A9bsiNDMvgk1qpw3gsiAPQwfWFA0B+5mcFuHHlXua1E1qymtAZKh2xm8VqFoDt/K4LMCu2Z7PiDz1znLTUDKfykDQ8wGhsDFKJrj1jEELwRrNpRBOHsBUoAlMjKuZGAJmcMg85L9V/xsJL2qjsuif83HH9oMGUsYGGKng6MG5AI4AEb0978MBDRnLQKmp29Arz9j4JU9BVeTzbiAIWYGIc25QKdZ7AEy8uYxJJ89AhX1uvEKmubxaBaNZpzNEH7qMpDprLKUIY2xFyxcwjidIYuxE5dmbUcQa+NjIGF79xZYOEl8MgODNHMAwzfuiQwMBYzNDFDNtqZomhHA8O01KKt+1me4KGt+AwNMMwpA1lzK+LUTzjGxEYZwwnez32bAodkAxorcfhRVSjeisgNYQuy6DBeJP4OmmZWBfDCqmUQAAGtNvMC8einoAAAAAElFTkSuQmCC"}),e.createElementVNode("div",{class:"anim"},[e.createElementVNode("span")]),e.createElementVNode("div",{class:"text"},[e.createElementVNode("span",null,"Loading...")])],-1)])])}const K=T(P,[["render",R],["__scopeId","data-v-f3f41b24"]]),F=(l,{className:t,loadStyle:a})=>{let n={color:"#409EFF",bgColor:"rgba(255,255,255,.8)"},i,o,r;return async p=>{i=document.getElementsByClassName(t)?.[0],o=document.createElement("div"),o.style.display="flex",o.style.flexDirection="row",o.style.alignItems="center",o.style.justifyContent="center",o.style.cursor="not-allowed",o.style.backgroundColor=a?.bgColor??n.bgColor;const s=g=>{g.stopPropagation(),g.preventDefault()};o.addEventListener("click",s);try{if(i){i.style.position="relative",o.style.position="absolute",o.style.left="-1px",o.style.top="-1px",o.style.zIndex="10",o.style.width="calc(100% + 2px)",o.style.height="calc(100% + 2px)";const g=e.h(q,{class:"mic-loader",style:{color:a?.color??n.color,width:"14px",height:"14px"}});e.render(g,o),i.appendChild(o)}else{r=document.body.style.overflow,document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",o.style.position="fixed",o.style.zIndex="99999",o.style.left="0",o.style.top="0",o.style.width="100vw",o.style.height="100vh";const g=e.h(K);e.render(g,o),document.body.appendChild(o)}await l(p)}catch(g){console.error("~~ ==== 💥💥💥💥 ==== ~ Load ~~",g)}finally{o.removeEventListener("click",s),i?i.removeChild(o):(document.body.style.overflow=r,document.documentElement.style.overflow=r,document.body.removeChild(o)),o=null,i=null}}},O=l=>{const t=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],a=["","拾","佰","仟","万","拾","佰","仟","亿","拾","佰","仟"],n=["角","分"],i=/^(\d{1,12})(\.(\d{1,2}))?$/;if(l==null)return"零元整";const o=String(l).trim().replace(/,/g,"");if(!i.test(o))throw new Error("金额格式错误!仅支持12位整数+2位小数");const[r="",p=""]=o.split("."),s=parseInt(r,10),g=p.padEnd(2,"0");function w(x){let h="",d=!1;const m=x.length;for(let f=0;f<m;f++){const A=parseInt(x[f],10),V=m-1-f,_=a[V];A===0?(d=!0,(_==="万"||_==="亿")&&(h+=_,d=!1)):(d&&(h+="零"),h+=t[A]+_,d=!1)}return h=h.replace(/亿万/,"亿"),h||"零"}function b(x){let h="";const d=parseInt(x[0],10),m=parseInt(x[1],10);return d!==0&&(h+=t[d]+n[0],m===0&&(h+="整")),m!==0&&(d===0&&s!==0&&(h+="零"),h+=t[m]+n[1]),h}const y=w(r),k=b(g);return k?`${y}元${k}`:`${y}元整`},M=(l,t)=>{const a=Object.prototype.toString.call(l).replace(/^\[object (\S+)\]$/,"$1"),n=Object.prototype.toString.call(t).replace(/^\[object (\S+)\]$/,"$1");if(a!=n)return!1;if(["String","Number","Null","Undefined","Boolean"].includes(a))return l===t;if(a==="File"){let o=["name","size","type","lastModified"];for(let r of o)if(!M(l[r],t[r]))return!1}if(a=="Object"){for(let[o,r]of Object.entries(l))if(!M(r,t[o]))return!1}if(a=="Array"){if(l.length!=t.length)return!1;for(let o=0;o<l.length;o++)if(!M(l[o],t[o]))return!1}return!0},H={check:E,reset:D,capital:O,equal:M,load:F};class G{element;observer;constructor(t){this.element=t,this.observer=void 0}bind(t){!this.element||this.observer||(this.observer=new ResizeObserver(a=>{const n=a[0];if(!n?.contentRect)return;const{width:i,height:o}=n.contentRect,r=window.getComputedStyle(this.element);t?.(i+parseInt(r.marginLeft)+parseInt(r.marginRight),o+parseInt(r.marginTop)+parseInt(r.marginBottom))}),this.observer.observe(this.element,{box:"border-box"}))}unbind(){this.observer&&this.element&&this.observer.unobserve(this.element),this.observer=void 0}destroy(){this.observer?.disconnect(),this.observer=void 0,this.element=null}}class Z{domList;#e=e.reactive({value:0});#t=e.reactive({value:0});constructor(t){this.domList=t.map(a=>({...a,height:0,width:0,exa:void 0}))}get height(){return this.#t}get width(){return this.#e}init(){for(let t of this.domList)t.exa=new G(document.querySelector(t.name)),t.exa.bind((a,n)=>{t.height=n,t.width=a,this.#t.value=0,this.#e.value=0;for(let i of this.domList)switch(i.type){case"+":this.#t.value+=i?.height,this.#e.value+=i?.width;break;case"-":this.#t.value-=i?.height,this.#e.value-=i?.width;break}})}close(){for(let t of this.domList)t.exa&&t.exa.destroy()}}const Q={domHeight:Z},Y={class:"mic-search-item-right"},W=e.defineComponent({name:"MicDate",__name:"index",props:e.mergeModels({label:{type:String,required:!0},format:{type:String,required:!0},border:{type:String,required:!1,default:()=>"1px solid #ccc"},width:{type:String,required:!1,default:()=>"100px"},span:{type:Number,required:!1,default:()=>1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(l,{emit:t}){const a=e.useModel(l,"modelValue"),n=l,{label:i,format:o,border:r,width:p,span:s}=e.toRefs(n),g=t,w=b=>{g("change",b)};return(b,y)=>{const k=e.resolveComponent("el-date-picker");return e.openBlock(),e.createElementBlock("div",{class:"mic-search-item",style:e.normalizeStyle({border:e.unref(r),"grid-column":`span ${e.unref(s)}`})},[e.createElementVNode("div",{class:"mic-search-item-left",style:e.normalizeStyle({width:e.unref(p)})},e.toDisplayString(e.unref(i)),5),e.createElementVNode("div",Y,[e.createVNode(k,e.mergeProps({modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=x=>a.value=x),format:e.unref(o),"value-format":e.unref(o),"range-separator":"-"},b.$attrs,{onChange:w}),null,16,["modelValue","format","value-format"])])],4)}}}),J={class:"mic-search-item-right"},X=e.defineComponent({name:"MicInput",__name:"index",props:e.mergeModels({label:{label:String,required:!0},border:{type:String,required:!1,default:()=>"1px solid #ccc"},width:{type:String,required:!1,default:()=>"100px"},span:{type:Number,required:!1,default:()=>1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change","keydown"],["update:modelValue"]),setup(l,{emit:t}){const a=e.useModel(l,"modelValue"),n=l,{label:i,border:o,width:r,span:p}=e.toRefs(n),s=t,g=b=>{s("change",b)},w=()=>{s("keydown")};return(b,y)=>{const k=e.resolveComponent("el-input");return e.openBlock(),e.createElementBlock("div",{class:"mic-search-item",style:e.normalizeStyle({border:e.unref(o),"grid-column":`span ${e.unref(p)}`})},[e.createElementVNode("div",{class:"mic-search-item-left",style:e.normalizeStyle({width:e.unref(r)})},e.toDisplayString(e.unref(i)),5),e.createElementVNode("div",J,[e.createVNode(k,e.mergeProps({modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=x=>a.value=x),onInput:g,onKeydown:e.withKeys(w,["enter"])},b.$attrs),null,16,["modelValue"])])],4)}}}),v=e.defineComponent({name:"MicSearch",__name:"index",props:{span:{type:Number,required:!1,default:()=>4}},setup(l){const t=l,{span:a}=e.toRefs(t);return(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mic-search-box",style:e.normalizeStyle({"grid-template-columns":`repeat(${e.unref(a)}, calc( 100% / ${e.unref(a)} - 12px * ${e.unref(a)-1} / ${e.unref(a)} ))`})},[e.renderSlot(n.$slots,"default")],4))}}),ee={class:"mic-search-item-right"},te=e.defineComponent({name:"MicSelect",__name:"index",props:e.mergeModels({label:{type:String,required:!0},options:{type:Array,required:!0},border:{type:String,required:!1,default:()=>"1px solid #ccc"},width:{type:String,required:!1,default:()=>"100px"},span:{type:Number,required:!1,default:()=>1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["change"],["update:modelValue"]),setup(l,{emit:t}){const a=e.useModel(l,"modelValue"),n=l,{label:i,options:o,border:r,width:p,span:s}=e.toRefs(n),g=t,w=b=>{g("change",b)};return(b,y)=>{const k=e.resolveComponent("el-option"),x=e.resolveComponent("el-select");return e.openBlock(),e.createElementBlock("div",{class:"mic-search-item",style:e.normalizeStyle({border:e.unref(r),"grid-column":`span ${e.unref(s)}`})},[e.createElementVNode("div",{class:"mic-search-item-left",style:e.normalizeStyle({width:e.unref(p)})},e.toDisplayString(e.unref(i)),5),e.createElementVNode("div",ee,[e.createVNode(x,e.mergeProps({modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=h=>a.value=h),onChange:w},b.$attrs),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),h=>(e.openBlock(),e.createBlock(k,{key:h.value,label:h.label,value:h.value},null,8,["label","value"]))),128))]),_:1},16,["modelValue"])])],4)}}}),oe=e.defineComponent({name:"MicVac",__name:"index",props:{span:{type:Number,default:()=>1}},setup(l){const t=l,{span:a}=e.toRefs(t);return(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:"mic-search-vac",style:e.normalizeStyle({"grid-column":`span ${e.unref(a)}`})},[e.renderSlot(n.$slots,"default")],4))}}),ne={class:"mic-table"},le={class:"mic-table-button"},ae={class:"mic-table-button-left"},re={class:"mic-table-button-right"},ie={class:"mic-table-cont"},se={class:"mic-table-page"},ce={class:"mic-table-page-left"},de=e.defineComponent({name:"MicTable",__name:"index",props:{tableAttr:{type:Object,required:!1,default:()=>({})},tableData:{type:Array,required:!0},columns:{type:Array,required:!0},selectSingle:{type:Boolean,required:!1,default:!1},selectKey:{type:String,required:!1},disabledCondition:{type:Function,default:null},page:{type:Object,required:!1,default:{pageSize:100,currentPage:1,total:0}}},emits:["selection-change","page-change"],setup(l,{expose:t,emit:a}){const n=l,{tableData:i,columns:o,page:r}=e.toRefs(n),p=a,s=e.reactive({isCurrentAll:!1,isIndeterminate:!1,selectData:[],processedTableData:[]}),g=()=>{s.processedTableData=i.value.map(d=>{const m={...d};return m.checked=!1,n?.disabledCondition?m.disabled=n.disabledCondition(m):m.disabled=!1,m})};e.watch(i,()=>{g()},{immediate:!0,deep:!0});const w=d=>{n.selectSingle||(s.isIndeterminate=!1,s.processedTableData.forEach(m=>{m.disabled||(m.checked=d)}),s.selectData=s.processedTableData.filter(m=>!m.disabled&&m.checked),p("selection-change",s.selectData))},b=(d,m)=>{if(n.selectSingle)s.processedTableData.forEach(f=>{f?.[n.selectKey]!=d?.[n.selectKey]&&(f.checked=!1)});else{const f=s.processedTableData.filter(V=>!V.disabled),A=f.filter(V=>V.checked);A.length===0?(s.isCurrentAll=!1,s.isIndeterminate=!1):A.length===f.length?(s.isCurrentAll=!0,s.isIndeterminate=!1):(s.isCurrentAll=!1,s.isIndeterminate=!0)}s.selectData=s.processedTableData.filter(f=>f.checked),p("selection-change",s.selectData)},y=d=>{let m=d.map(f=>f?.[n?.selectKey]);s.processedTableData.forEach(f=>{f.checked=m.includes(f?.[n?.selectKey])}),s.selectData=s.processedTableData.filter(f=>f.checked),p("selection-change",s.selectData)},k=()=>{s.processedTableData.forEach(d=>{d.checked=!1}),s.isCurrentAll=!1,s.isIndeterminate=!1,s.selectData=[],p("selection-change",[])},x=d=>{p("page-change",{total:r.value.total,currentPage:r.value.currentPage,pageSize:d})},h=d=>{p("page-change",{total:r.value.total,currentPage:d,pageSize:r.value.pageSize})};return t({clearSelection:k,setSelection:y}),(d,m)=>{const f=e.resolveComponent("el-checkbox"),A=e.resolveComponent("el-table-column"),V=e.resolveComponent("el-table"),_=e.resolveComponent("el-pagination");return e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",le,[e.createElementVNode("div",ae,[e.renderSlot(d.$slots,"buttonLeft")]),e.createElementVNode("div",re,[e.renderSlot(d.$slots,"buttonRight")])]),e.createElementVNode("div",ie,[e.createVNode(V,e.mergeProps({data:s.processedTableData,"header-cell-style":{background:"#F6F8FC",fontWeight:400,color:"#333"},stripe:""},n.tableAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),c=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[c?.type=="select"&&!c?.hidden?(e.openBlock(),e.createBlock(A,e.mergeProps({key:0,ref_for:!0},c.attr),{header:e.withCtx(()=>[e.createVNode(f,{style:{height:"20px"},disabled:n.selectSingle,indeterminate:s.isIndeterminate,modelValue:s.isCurrentAll,"onUpdate:modelValue":m[0]||(m[0]=u=>s.isCurrentAll=u),onChange:m[1]||(m[1]=(u=>w(u)))},null,8,["disabled","indeterminate","modelValue"])]),default:e.withCtx(u=>[e.createVNode(f,{style:{height:"20px"},modelValue:u.row.checked,"onUpdate:modelValue":B=>u.row.checked=B,disabled:u.row.disabled,onChange:B=>b(u.row)},null,8,["modelValue","onUpdate:modelValue","disabled","onChange"])]),_:1},16)):c?.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(A,e.mergeProps({key:1,type:c?.type},{ref_for:!0},c.attr),e.createSlots({_:2},[d.$slots?.[c.attr?.prop]?{name:"default",fn:e.withCtx(({row:u,$index:B})=>[e.renderSlot(d.$slots,c.attr?.prop,{row:u,index:B})]),key:"0"}:void 0]),1040,["type"]))],64))),256))]),_:3},16,["data"])]),e.createElementVNode("div",se,[e.createElementVNode("div",ce,[e.createVNode(_,{size:"small",onSizeChange:x,"page-sizes":[10,20,50,100],"page-size":e.unref(r).pageSize,layout:"total,sizes",total:e.unref(r).total},null,8,["page-size","total"])]),e.createVNode(_,{onCurrentChange:h,size:"small","current-page":e.unref(r).currentPage,"page-sizes":[10,20,50,100],"page-size":e.unref(r).pageSize,layout:"prev, pager, next",total:e.unref(r).total},null,8,["current-page","page-size","total"])])])}}}),me={key:0,class:"mic-dialog-module"},pe={class:"dialog-footer"},N={MicDate:W,MicInput:X,MicSearch:v,MicSelect:te,MicVac:oe,MicTable:de,MicDialog:e.defineComponent({name:"MicDialog",__name:"index",props:e.mergeModels({labelWidth:{type:String,default:"120px"},formList:{type:Array,required:!0},optionList:{type:Object,default:()=>({})},rules:{type:Object,default:()=>({})},cancelText:{type:String,default:"取消"},confirmText:{type:String,default:"确认"}},{show:{},showModifiers:{},form:{},formModifiers:{}}),emits:e.mergeModels(["confirm"],["update:show","update:form"]),setup(l,{emit:t}){const a=e.useModel(l,"show"),n=e.useModel(l,"form"),i=l,o=t,r=e.ref(),p=()=>{a.value=!1},s=()=>{r.value.validate(async g=>{g&&o("confirm",n)})};return(g,w)=>{const b=e.resolveComponent("el-input"),y=e.resolveComponent("el-date-picker"),k=e.resolveComponent("el-option"),x=e.resolveComponent("el-select"),h=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-col"),m=e.resolveComponent("el-row"),f=e.resolveComponent("el-form"),A=e.resolveComponent("el-button"),V=e.resolveComponent("el-dialog");return a.value?(e.openBlock(),e.createBlock(V,e.mergeProps({key:0,modelValue:a.value,"onUpdate:modelValue":w[0]||(w[0]=_=>a.value=_)},g.$attrs),{footer:e.withCtx(()=>[e.createElementVNode("div",pe,[e.createVNode(A,{class:"mic-dialog-close",onClick:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.cancelText),1)]),_:1}),e.createVNode(A,{type:"primary",class:"mic-dialog-confirm",onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.confirmText),1)]),_:1})])]),default:e.withCtx(()=>[e.createVNode(f,{model:n.value,ref_key:"formRef",ref:r,rules:i?.rules,"label-width":i.labelWidth},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.formList,_=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[_.module?(e.openBlock(),e.createElementBlock("p",me,e.toDisplayString(_.module),1)):e.createCommentVNode("",!0),e.createVNode(m,{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.children,c=>(e.openBlock(),e.createBlock(d,{span:c.span},{default:e.withCtx(()=>[e.createVNode(h,{label:c.label,prop:c.prop},{default:e.withCtx(()=>[c.type=="input"?(e.openBlock(),e.createBlock(b,e.mergeProps({key:0,modelValue:n.value[c.prop],"onUpdate:modelValue":u=>n.value[c.prop]=u},{ref_for:!0},c.attr,e.toHandlers(c.event)),null,16,["modelValue","onUpdate:modelValue"])):c.type=="time"?(e.openBlock(),e.createBlock(y,e.mergeProps({key:1,modelValue:n.value[c.prop],"onUpdate:modelValue":u=>n.value[c.prop]=u},{ref_for:!0},c.attr,e.toHandlers(c.event)),null,16,["modelValue","onUpdate:modelValue"])):c.type=="select"?(e.openBlock(),e.createBlock(x,e.mergeProps({key:2,modelValue:n.value[c.prop],"onUpdate:modelValue":u=>n.value[c.prop]=u},{ref_for:!0},c.attr,e.toHandlers(c.event)),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.optionList?.[c.prop],u=>(e.openBlock(),e.createBlock(k,{key:u.value,label:u.label,value:u.value},null,8,["label","value"]))),128))]),_:2},1040,["modelValue","onUpdate:modelValue"])):e.renderSlot(g.$slots,c?.prop,{key:3,form:n.value,attr:c?.attr})]),_:2},1032,["label","prop"])]),_:2},1032,["span"]))),256))]),_:2},1024)],64))),256))]),_:3},8,["model","rules","label-width"])]),_:3},16,["modelValue"])):e.createCommentVNode("",!0)}}})},fe={install(l){Object.keys(N).forEach(t=>{const a=N[t];l.component(t,a)})}};C.Mic=Q,C.default=fe,C.mic=H,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mic-org",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "main": "./dist/mic.umd.js",
5
5
  "module": "./dist/mic.es.js",
6
6
  "exports": {