sinosoft-common-button 1.3.9 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { openBlock as c, createElementBlock as y, createElementVNode as m, defineComponent as ee, onUnmounted as te, resolveComponent as w, createBlock as T, normalizeClass as ie, normalizeStyle as u, withCtx as z, createCommentVNode as C, renderSlot as B, createVNode as R } from "vue";
1
+ import { openBlock as h, createElementBlock as p, createElementVNode as g, defineComponent as te, onUnmounted as ie, resolveComponent as w, createBlock as T, normalizeClass as A, normalizeStyle as u, withCtx as z, createCommentVNode as b, renderSlot as N, createVNode as F } from "vue";
2
2
  /*! Element Plus Icons Vue v2.1.0 */
3
3
  var re = (e, t) => {
4
4
  let i = e.__vccOpts || e;
@@ -10,7 +10,7 @@ var re = (e, t) => {
10
10
  }, ne = {
11
11
  xmlns: "http://www.w3.org/2000/svg",
12
12
  viewBox: "0 0 1024 1024"
13
- }, le = /* @__PURE__ */ m(
13
+ }, se = /* @__PURE__ */ g(
14
14
  "path",
15
15
  {
16
16
  fill: "currentColor",
@@ -19,35 +19,35 @@ var re = (e, t) => {
19
19
  null,
20
20
  -1
21
21
  /* HOISTED */
22
- ), se = [
23
- le
22
+ ), le = [
23
+ se
24
24
  ];
25
- function ae(e, t, i, r, o, l) {
26
- return c(), y("svg", ne, se);
25
+ function ae(e, t, i, r, o, s) {
26
+ return h(), p("svg", ne, le);
27
27
  }
28
28
  var de = /* @__PURE__ */ re(oe, [["render", ae], ["__file", "loading.vue"]]);
29
- function W(e, t, i) {
30
- for (var r = [], o = Math.max(e.length, t.length), l = 0, n = 0; n < o || l; ) {
31
- var s = n < e.length ? e[n] : 0, d = n < t.length ? t[n] : 0, f = l + s + d;
32
- r.push(f % i), l = Math.floor(f / i), n++;
29
+ function O(e, t, i) {
30
+ for (var r = [], o = Math.max(e.length, t.length), s = 0, n = 0; n < o || s; ) {
31
+ var l = n < e.length ? e[n] : 0, d = n < t.length ? t[n] : 0, f = s + l + d;
32
+ r.push(f % i), s = Math.floor(f / i), n++;
33
33
  }
34
34
  return r;
35
35
  }
36
- function F(e, t, i) {
36
+ function H(e, t, i) {
37
37
  if (e < 0)
38
38
  return null;
39
39
  if (e == 0)
40
40
  return [];
41
- for (var r = [], o = t; e & 1 && (r = W(r, o, i)), e = e >> 1, e !== 0; )
42
- o = W(o, o, i);
41
+ for (var r = [], o = t; e & 1 && (r = O(r, o, i)), e = e >> 1, e !== 0; )
42
+ o = O(o, o, i);
43
43
  return r;
44
44
  }
45
45
  function fe(e, t) {
46
46
  for (var i = e.split(""), r = [], o = i.length - 1; o >= 0; o--) {
47
- var l = parseInt(i[o], t);
48
- if (isNaN(l))
47
+ var s = parseInt(i[o], t);
48
+ if (isNaN(s))
49
49
  return null;
50
- r.push(l);
50
+ r.push(s);
51
51
  }
52
52
  return r;
53
53
  }
@@ -55,15 +55,15 @@ function he(e, t, i) {
55
55
  var r = fe(e, t);
56
56
  if (r === null)
57
57
  return null;
58
- for (var o = [], l = [1], n = 0; n < r.length; n++)
59
- r[n] && (o = W(
58
+ for (var o = [], s = [1], n = 0; n < r.length; n++)
59
+ r[n] && (o = O(
60
60
  o,
61
- F(r[n], l, i),
61
+ H(r[n], s, i),
62
62
  i
63
- )), l = F(t, l, i);
64
- for (var s = "", n = o.length - 1; n >= 0; n--)
65
- s += o[n].toString(i);
66
- return s;
63
+ )), s = H(t, s, i);
64
+ for (var l = "", n = o.length - 1; n >= 0; n--)
65
+ l += o[n].toString(i);
66
+ return l;
67
67
  }
68
68
  function ce(e) {
69
69
  return e.substring(0, 2) === "0x" && (e = e.substring(2)), e = e.toLowerCase(), he(e, 16, 10);
@@ -80,10 +80,10 @@ class ue {
80
80
  r = "0" + r;
81
81
  for (; o.length < 10; )
82
82
  o = "0" + o;
83
- const l = i + o + r;
83
+ const s = i + o + r;
84
84
  let n = "";
85
- for (let s = l.length; s > 0; s -= 4)
86
- n = parseInt(l.substring(s - 4, s), 2).toString(16) + n;
85
+ for (let l = s.length; l > 0; l -= 4)
86
+ n = parseInt(s.substring(l - 4, l), 2).toString(16) + n;
87
87
  return ce(n);
88
88
  }
89
89
  }
@@ -95,112 +95,112 @@ function be(e) {
95
95
  var t = typeof e;
96
96
  return e != null && (t == "object" || t == "function");
97
97
  }
98
- var P = be, pe = typeof S == "object" && S && S.Object === Object && S, ye = pe, me = ye, ve = typeof self == "object" && self && self.Object === Object && self, Ce = me || ve || Function("return this")(), V = Ce, Se = V, _e = function() {
98
+ var U = be, pe = typeof S == "object" && S && S.Object === Object && S, ye = pe, me = ye, ve = typeof self == "object" && self && self.Object === Object && self, Ce = me || ve || Function("return this")(), x = Ce, Se = x, $e = function() {
99
99
  return Se.Date.now();
100
- }, $e = _e, ke = /\s/;
100
+ }, _e = $e, ke = /\s/;
101
101
  function we(e) {
102
102
  for (var t = e.length; t-- && ke.test(e.charAt(t)); )
103
103
  ;
104
104
  return t;
105
105
  }
106
106
  var Te = we, ze = Te, je = /^\s+/;
107
- function We(e) {
107
+ function Oe(e) {
108
108
  return e && e.slice(0, ze(e) + 1).replace(je, "");
109
109
  }
110
- var Oe = We, Ie = V, Le = Ie.Symbol, U = Le, H = U, X = Object.prototype, Ee = X.hasOwnProperty, Ae = X.toString, p = H ? H.toStringTag : void 0;
111
- function Ne(e) {
112
- var t = Ee.call(e, p), i = e[p];
110
+ var We = Oe, Le = x, Ie = Le.Symbol, X = Ie, M = X, J = Object.prototype, Re = J.hasOwnProperty, Ee = J.toString, v = M ? M.toStringTag : void 0;
111
+ function Be(e) {
112
+ var t = Re.call(e, v), i = e[v];
113
113
  try {
114
- e[p] = void 0;
114
+ e[v] = void 0;
115
115
  var r = !0;
116
116
  } catch {
117
117
  }
118
- var o = Ae.call(e);
119
- return r && (t ? e[p] = i : delete e[p]), o;
118
+ var o = Ee.call(e);
119
+ return r && (t ? e[v] = i : delete e[v]), o;
120
120
  }
121
- var Be = Ne, Re = Object.prototype, Fe = Re.toString;
121
+ var Ae = Be, Ne = Object.prototype, Fe = Ne.toString;
122
122
  function He(e) {
123
123
  return Fe.call(e);
124
124
  }
125
- var Me = He, M = U, xe = Be, qe = Me, De = "[object Null]", Ge = "[object Undefined]", x = M ? M.toStringTag : void 0;
126
- function Pe(e) {
127
- return e == null ? e === void 0 ? Ge : De : x && x in Object(e) ? xe(e) : qe(e);
125
+ var Me = He, q = X, qe = Ae, De = Me, Ge = "[object Null]", Pe = "[object Undefined]", D = q ? q.toStringTag : void 0;
126
+ function Ve(e) {
127
+ return e == null ? e === void 0 ? Pe : Ge : D && D in Object(e) ? qe(e) : De(e);
128
128
  }
129
- var Ve = Pe;
130
- function Ue(e) {
129
+ var Ue = Ve;
130
+ function xe(e) {
131
131
  return e != null && typeof e == "object";
132
132
  }
133
- var Xe = Ue, Je = Ve, Ke = Xe, Qe = "[object Symbol]";
133
+ var Xe = xe, Je = Ue, Ke = Xe, Qe = "[object Symbol]";
134
134
  function Ye(e) {
135
135
  return typeof e == "symbol" || Ke(e) && Je(e) == Qe;
136
136
  }
137
- var Ze = Ye, et = Oe, q = P, tt = Ze, D = 0 / 0, it = /^[-+]0x[0-9a-f]+$/i, rt = /^0b[01]+$/i, ot = /^0o[0-7]+$/i, nt = parseInt;
138
- function lt(e) {
137
+ var Ze = Ye, et = We, G = U, tt = Ze, P = 0 / 0, it = /^[-+]0x[0-9a-f]+$/i, rt = /^0b[01]+$/i, ot = /^0o[0-7]+$/i, nt = parseInt;
138
+ function st(e) {
139
139
  if (typeof e == "number")
140
140
  return e;
141
141
  if (tt(e))
142
- return D;
143
- if (q(e)) {
142
+ return P;
143
+ if (G(e)) {
144
144
  var t = typeof e.valueOf == "function" ? e.valueOf() : e;
145
- e = q(t) ? t + "" : t;
145
+ e = G(t) ? t + "" : t;
146
146
  }
147
147
  if (typeof e != "string")
148
148
  return e === 0 ? e : +e;
149
149
  e = et(e);
150
150
  var i = rt.test(e);
151
- return i || ot.test(e) ? nt(e.slice(2), i ? 2 : 8) : it.test(e) ? D : +e;
151
+ return i || ot.test(e) ? nt(e.slice(2), i ? 2 : 8) : it.test(e) ? P : +e;
152
152
  }
153
- var st = lt, at = P, j = $e, G = st, dt = "Expected a function", ft = Math.max, ht = Math.min;
153
+ var lt = st, at = U, j = _e, V = lt, dt = "Expected a function", ft = Math.max, ht = Math.min;
154
154
  function ct(e, t, i) {
155
- var r, o, l, n, s, d, f = 0, L = !1, g = !1, _ = !0;
155
+ var r, o, s, n, l, d, f = 0, I = !1, y = !1, $ = !0;
156
156
  if (typeof e != "function")
157
157
  throw new TypeError(dt);
158
- t = G(t) || 0, at(i) && (L = !!i.leading, g = "maxWait" in i, l = g ? ft(G(i.maxWait) || 0, t) : l, _ = "trailing" in i ? !!i.trailing : _);
159
- function $(a) {
160
- var h = r, b = o;
161
- return r = o = void 0, f = a, n = e.apply(b, h), n;
162
- }
163
- function K(a) {
164
- return f = a, s = setTimeout(v, t), L ? $(a) : n;
158
+ t = V(t) || 0, at(i) && (I = !!i.leading, y = "maxWait" in i, s = y ? ft(V(i.maxWait) || 0, t) : s, $ = "trailing" in i ? !!i.trailing : $);
159
+ function _(a) {
160
+ var c = r, m = o;
161
+ return r = o = void 0, f = a, n = e.apply(m, c), n;
165
162
  }
166
163
  function Q(a) {
167
- var h = a - d, b = a - f, N = t - h;
168
- return g ? ht(N, l - b) : N;
164
+ return f = a, l = setTimeout(C, t), I ? _(a) : n;
169
165
  }
170
- function E(a) {
171
- var h = a - d, b = a - f;
172
- return d === void 0 || h >= t || h < 0 || g && b >= l;
166
+ function Y(a) {
167
+ var c = a - d, m = a - f, B = t - c;
168
+ return y ? ht(B, s - m) : B;
173
169
  }
174
- function v() {
175
- var a = j();
176
- if (E(a))
177
- return A(a);
178
- s = setTimeout(v, Q(a));
170
+ function R(a) {
171
+ var c = a - d, m = a - f;
172
+ return d === void 0 || c >= t || c < 0 || y && m >= s;
179
173
  }
180
- function A(a) {
181
- return s = void 0, _ && r ? $(a) : (r = o = void 0, n);
174
+ function C() {
175
+ var a = j();
176
+ if (R(a))
177
+ return E(a);
178
+ l = setTimeout(C, Y(a));
182
179
  }
183
- function Y() {
184
- s !== void 0 && clearTimeout(s), f = 0, r = d = o = s = void 0;
180
+ function E(a) {
181
+ return l = void 0, $ && r ? _(a) : (r = o = void 0, n);
185
182
  }
186
183
  function Z() {
187
- return s === void 0 ? n : A(j());
184
+ l !== void 0 && clearTimeout(l), f = 0, r = d = o = l = void 0;
185
+ }
186
+ function ee() {
187
+ return l === void 0 ? n : E(j());
188
188
  }
189
189
  function k() {
190
- var a = j(), h = E(a);
191
- if (r = arguments, o = this, d = a, h) {
192
- if (s === void 0)
193
- return K(d);
194
- if (g)
195
- return clearTimeout(s), s = setTimeout(v, t), $(d);
190
+ var a = j(), c = R(a);
191
+ if (r = arguments, o = this, d = a, c) {
192
+ if (l === void 0)
193
+ return Q(d);
194
+ if (y)
195
+ return clearTimeout(l), l = setTimeout(C, t), _(d);
196
196
  }
197
- return s === void 0 && (s = setTimeout(v, t)), n;
197
+ return l === void 0 && (l = setTimeout(C, t)), n;
198
198
  }
199
- return k.cancel = Y, k.flush = Z, k;
199
+ return k.cancel = Z, k.flush = ee, k;
200
200
  }
201
201
  var ut = ct;
202
202
  const gt = /* @__PURE__ */ ge(ut);
203
- var O;
203
+ var W;
204
204
  ((e) => {
205
205
  e.debouncedFun = (t, i) => gt(t, i, {
206
206
  leading: !0,
@@ -208,11 +208,12 @@ var O;
208
208
  trailing: !1
209
209
  // 延长结束前调用
210
210
  });
211
- })(O || (O = {}));
211
+ })(W || (W = {}));
212
212
  const bt = new ue({
213
213
  mid: 42,
214
214
  offset: (2019 - 1970) * 31536e3 * 1e3
215
- }), pt = ee({
215
+ }), pt = te({
216
+ // inheritAttrs: false, // 不在组件的根元素上添加非 prop 的 attribute
216
217
  components: {
217
218
  Loading: de
218
219
  },
@@ -249,6 +250,9 @@ const bt = new ue({
249
250
  type: Boolean,
250
251
  default: !1
251
252
  },
253
+ buttonClass: {
254
+ type: String
255
+ },
252
256
  fontSize: {
253
257
  type: String,
254
258
  default: ""
@@ -289,6 +293,10 @@ const bt = new ue({
289
293
  type: Boolean,
290
294
  default: !1
291
295
  },
296
+ loadingLeft: {
297
+ type: Boolean,
298
+ default: !1
299
+ },
292
300
  borderStyle: {
293
301
  type: String,
294
302
  default: "solid"
@@ -297,6 +305,10 @@ const bt = new ue({
297
305
  type: String,
298
306
  required: !1
299
307
  },
308
+ iconRight: {
309
+ type: Boolean,
310
+ default: !1
311
+ },
300
312
  size: {
301
313
  type: [Number, String],
302
314
  default: "auto"
@@ -313,6 +325,9 @@ const bt = new ue({
313
325
  type: String,
314
326
  default: ""
315
327
  }
328
+ // styleOjb: {
329
+ // type: [String, Object],
330
+ // }
316
331
  },
317
332
  computed: {
318
333
  styleOjb() {
@@ -419,19 +434,19 @@ const bt = new ue({
419
434
  },
420
435
  emits: ["handleClick"],
421
436
  setup(e, t) {
422
- const i = (l) => {
423
- let n = bt.generate(), s = `${e.btnCode}_${n}`;
437
+ const i = (s) => {
438
+ let n = bt.generate(), l = `${e.btnCode}_${n}`;
424
439
  console.log(
425
440
  "按钮组件点击事件获取到事件对象及事件唯一标识符",
426
- l,
427
- s
428
- ), e.btnCode ? t.emit("handleClick", s) : t.emit("handleClick", "");
429
- }, r = O.debouncedFun((l) => {
430
- i(l);
431
- }, 3e3), o = (l) => {
432
- e.debounced ? r(l) : i(l);
441
+ s,
442
+ l
443
+ ), e.btnCode ? t.emit("handleClick", l) : t.emit("handleClick", "");
444
+ }, r = W.debouncedFun((s) => {
445
+ i(s);
446
+ }, 3e3), o = (s) => {
447
+ e.debounced ? r(s) : i(s);
433
448
  };
434
- return te(() => {
449
+ return ie(() => {
435
450
  r.cancel();
436
451
  }), {
437
452
  getHandleClick: o,
@@ -444,87 +459,105 @@ const yt = (e, t) => {
444
459
  for (const [r, o] of t)
445
460
  i[r] = o;
446
461
  return i;
447
- }, mt = { class: "common-button" }, vt = {
462
+ }, mt = {
448
463
  key: 0,
449
464
  class: "s-icon"
450
- }, Ct = ["src"], St = ["btnCode"], _t = {
465
+ }, vt = ["src"], Ct = {
466
+ key: 1,
467
+ class: "s-icon"
468
+ }, St = ["src"], $t = ["btnCode"], _t = {
451
469
  key: 0,
452
470
  class: "s-icon padding-icon"
453
- }, $t = ["src"];
454
- function kt(e, t, i, r, o, l) {
455
- const n = w("Loading"), s = w("el-icon"), d = w("el-button");
456
- return c(), y("div", mt, [
457
- e.link ? (c(), y("span", {
458
- key: 1,
459
- class: "link",
460
- style: u(e.styleOjb),
461
- btnCode: e.btnCode,
462
- onClick: t[0] || (t[0] = (...f) => e.getHandleClick && e.getHandleClick(...f))
471
+ }, kt = ["src"], wt = {
472
+ key: 1,
473
+ class: "s-icon padding-icon-right"
474
+ }, Tt = ["src"];
475
+ function zt(e, t, i, r, o, s) {
476
+ const n = w("Loading"), l = w("el-icon"), d = w("el-button");
477
+ return e.link ? (h(), p("span", {
478
+ key: 1,
479
+ class: A(["link", e.$attrs.class]),
480
+ style: u(e.styleOjb),
481
+ btnCode: e.btnCode,
482
+ onClick: t[0] || (t[0] = (...f) => e.getHandleClick && e.getHandleClick(...f))
483
+ }, [
484
+ e.icon && !e.iconRight ? (h(), p("i", _t, [
485
+ g("img", {
486
+ src: e.geturl,
487
+ alt: "",
488
+ style: u(e.styleObject)
489
+ }, null, 12, kt)
490
+ ])) : b("", !0),
491
+ g("span", {
492
+ style: u({ color: e.color })
463
493
  }, [
464
- e.icon ? (c(), y("i", _t, [
465
- m("img", {
494
+ N(e.$slots, "default", {}, void 0, !0)
495
+ ], 4),
496
+ e.icon && e.iconRight ? (h(), p("i", wt, [
497
+ g("img", {
498
+ src: e.geturl,
499
+ alt: "",
500
+ style: u(e.styleObject)
501
+ }, null, 12, Tt)
502
+ ])) : b("", !0),
503
+ e.loading ? (h(), T(l, {
504
+ key: 2,
505
+ class: "is-loading",
506
+ color: e.loadingColor
507
+ }, {
508
+ default: z(() => [
509
+ F(n)
510
+ ]),
511
+ _: 1
512
+ }, 8, ["color"])) : b("", !0)
513
+ ], 14, $t)) : (h(), T(d, {
514
+ key: 0,
515
+ class: A(["s-button", e.$attrs.class]),
516
+ style: u(e.styleOjb),
517
+ disabled: e.disabled,
518
+ loading: e.loadingLeft,
519
+ onClick: e.getHandleClick,
520
+ btnCode: e.btnCode
521
+ }, {
522
+ default: z(() => [
523
+ e.icon && !e.iconRight ? (h(), p("i", mt, [
524
+ g("img", {
466
525
  src: e.geturl,
467
526
  alt: "",
468
527
  style: u(e.styleObject)
469
- }, null, 12, $t)
470
- ])) : C("", !0),
471
- m("span", {
528
+ }, null, 12, vt)
529
+ ])) : b("", !0),
530
+ g("span", {
472
531
  style: u({ color: e.color })
473
532
  }, [
474
- B(e.$slots, "default", {}, void 0, !0)
533
+ N(e.$slots, "default", {}, void 0, !0)
475
534
  ], 4),
476
- e.loading ? (c(), T(s, {
477
- key: 1,
535
+ e.icon && e.iconRight ? (h(), p("i", Ct, [
536
+ g("img", {
537
+ src: e.geturl,
538
+ alt: "",
539
+ style: u(e.styleObject)
540
+ }, null, 12, St)
541
+ ])) : b("", !0),
542
+ e.loading ? (h(), T(l, {
543
+ key: 2,
478
544
  class: "is-loading",
479
545
  color: e.loadingColor
480
546
  }, {
481
547
  default: z(() => [
482
- R(n)
548
+ F(n)
483
549
  ]),
484
550
  _: 1
485
- }, 8, ["color"])) : C("", !0)
486
- ], 12, St)) : (c(), T(d, {
487
- key: 0,
488
- class: ie(["s-button", { plain: e.plain, btnhover: !e.plain, loading: e.loading }]),
489
- disabled: e.disabled,
490
- loading: e.loading,
491
- style: u(e.styleOjb),
492
- onClick: e.getHandleClick,
493
- btnCode: e.btnCode
494
- }, {
495
- default: z(() => [
496
- e.icon ? (c(), y("i", vt, [
497
- m("img", {
498
- src: e.geturl,
499
- alt: "",
500
- style: u(e.styleObject)
501
- }, null, 12, Ct)
502
- ])) : C("", !0),
503
- m("span", {
504
- style: u({ color: e.color })
505
- }, [
506
- B(e.$slots, "default", {}, void 0, !0)
507
- ], 4),
508
- e.loading ? (c(), T(s, {
509
- key: 1,
510
- class: "is-loading",
511
- color: e.loadingColor
512
- }, {
513
- default: z(() => [
514
- R(n)
515
- ]),
516
- _: 1
517
- }, 8, ["color"])) : C("", !0)
518
- ]),
519
- _: 3
520
- }, 8, ["class", "disabled", "loading", "style", "onClick", "btnCode"]))
521
- ]);
551
+ }, 8, ["color"])) : b("", !0)
552
+ ]),
553
+ _: 3
554
+ }, 8, ["class", "style", "disabled", "loading", "onClick", "btnCode"]));
522
555
  }
523
- const J = /* @__PURE__ */ yt(pt, [["render", kt], ["__scopeId", "data-v-6cd7f7fe"]]);
524
- function I(e, t = {}) {
525
- I.installed || (I.installed = !0, e.component("common-button", J));
556
+ const K = /* @__PURE__ */ yt(pt, [["render", zt], ["__scopeId", "data-v-e26f913d"]]);
557
+ function L(e, t = {}) {
558
+ L.installed || (L.installed = !0, e.component("common-button", K));
526
559
  }
527
- J.install = I;
560
+ K.install = L;
528
561
  export {
529
- J as default
562
+ K as default
530
563
  };
@@ -1 +1 @@
1
- (function(i,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("vue")):typeof define=="function"&&define.amd?define(["vue"],u):(i=typeof globalThis<"u"?globalThis:i||self,i.button=u(i.Vue))})(this,function(i){"use strict";/*! Element Plus Icons Vue v2.1.0 */var u=(e,t)=>{let o=e.__vccOpts||e;for(let[r,n]of t)o[r]=n;return o},M={name:"Loading"},q={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},D=i.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.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.248zm452.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.248zM828.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 0zm-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 0z"},null,-1),G=[D];function P(e,t,o,r,n,s){return i.openBlock(),i.createElementBlock("svg",q,G)}var U=u(M,[["render",P],["__file","loading.vue"]]);function C(e,t,o){for(var r=[],n=Math.max(e.length,t.length),s=0,l=0;l<n||s;){var a=l<e.length?e[l]:0,f=l<t.length?t[l]:0,c=s+a+f;r.push(c%o),s=Math.floor(c/o),l++}return r}function z(e,t,o){if(e<0)return null;if(e==0)return[];for(var r=[],n=t;e&1&&(r=C(r,n,o)),e=e>>1,e!==0;)n=C(n,n,o);return r}function X(e,t){for(var o=e.split(""),r=[],n=o.length-1;n>=0;n--){var s=parseInt(o[n],t);if(isNaN(s))return null;r.push(s)}return r}function J(e,t,o){var r=X(e,t);if(r===null)return null;for(var n=[],s=[1],l=0;l<r.length;l++)r[l]&&(n=C(n,z(r[l],s,o),o)),s=z(t,s,o);for(var a="",l=n.length-1;l>=0;l--)a+=n[l].toString(o);return a}function K(e){return e.substring(0,2)==="0x"&&(e=e.substring(2)),e=e.toLowerCase(),J(e,16,10)}class Q{constructor(t){t=t||{},this.seq=0,this.mid=(t.mid||1)%1023,this.offset=t.offset||0,this.lastTime=0}generate(){const t=Date.now(),o=(t-this.offset).toString(2);this.lastTime==t?(this.seq++,this.seq>4095&&(this.seq=0)):this.seq=0,this.lastTime=t;let r=this.seq.toString(2),n=this.mid.toString(2);for(;r.length<12;)r="0"+r;for(;n.length<10;)n="0"+n;const s=o+n+r;let l="";for(let a=s.length;a>0;a-=4)l=parseInt(s.substring(a-4,a),2).toString(16)+l;return K(l)}}var m=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Z(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var j=Z,ee=typeof m=="object"&&m&&m.Object===Object&&m,te=ee,ie=te,oe=typeof self=="object"&&self&&self.Object===Object&&self,re=ie||oe||Function("return this")(),W=re,ne=W,le=function(){return ne.Date.now()},se=le,ae=/\s/;function de(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var fe=de,ce=fe,he=/^\s+/;function ue(e){return e&&e.slice(0,ce(e)+1).replace(he,"")}var ge=ue,be=W,pe=be.Symbol,O=pe,B=O,E=Object.prototype,me=E.hasOwnProperty,ye=E.toString,g=B?B.toStringTag:void 0;function Ce(e){var t=me.call(e,g),o=e[g];try{e[g]=void 0;var r=!0}catch{}var n=ye.call(e);return r&&(t?e[g]=o:delete e[g]),n}var Se=Ce,ke=Object.prototype,_e=ke.toString;function $e(e){return _e.call(e)}var ve=$e,N=O,we=Se,Te=ve,ze="[object Null]",je="[object Undefined]",I=N?N.toStringTag:void 0;function We(e){return e==null?e===void 0?je:ze:I&&I in Object(e)?we(e):Te(e)}var Oe=We;function Be(e){return e!=null&&typeof e=="object"}var Ee=Be,Ne=Oe,Ie=Ee,Le="[object Symbol]";function Ae(e){return typeof e=="symbol"||Ie(e)&&Ne(e)==Le}var Ve=Ae,xe=ge,L=j,Re=Ve,A=0/0,Fe=/^[-+]0x[0-9a-f]+$/i,He=/^0b[01]+$/i,Me=/^0o[0-7]+$/i,qe=parseInt;function De(e){if(typeof e=="number")return e;if(Re(e))return A;if(L(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=L(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=xe(e);var o=He.test(e);return o||Me.test(e)?qe(e.slice(2),o?2:8):Fe.test(e)?A:+e}var Ge=De,Pe=j,S=se,V=Ge,Ue="Expected a function",Xe=Math.max,Je=Math.min;function Ke(e,t,o){var r,n,s,l,a,f,c=0,x=!1,b=!1,v=!0;if(typeof e!="function")throw new TypeError(Ue);t=V(t)||0,Pe(o)&&(x=!!o.leading,b="maxWait"in o,s=b?Xe(V(o.maxWait)||0,t):s,v="trailing"in o?!!o.trailing:v);function w(d){var h=r,p=n;return r=n=void 0,c=d,l=e.apply(p,h),l}function dt(d){return c=d,a=setTimeout(y,t),x?w(d):l}function ft(d){var h=d-f,p=d-c,H=t-h;return b?Je(H,s-p):H}function R(d){var h=d-f,p=d-c;return f===void 0||h>=t||h<0||b&&p>=s}function y(){var d=S();if(R(d))return F(d);a=setTimeout(y,ft(d))}function F(d){return a=void 0,v&&r?w(d):(r=n=void 0,l)}function ct(){a!==void 0&&clearTimeout(a),c=0,r=f=n=a=void 0}function ht(){return a===void 0?l:F(S())}function T(){var d=S(),h=R(d);if(r=arguments,n=this,f=d,h){if(a===void 0)return dt(f);if(b)return clearTimeout(a),a=setTimeout(y,t),w(f)}return a===void 0&&(a=setTimeout(y,t)),l}return T.cancel=ct,T.flush=ht,T}var Qe=Ke;const Ye=Y(Qe);var k;(e=>{e.debouncedFun=(t,o)=>Ye(t,o,{leading:!0,trailing:!1})})(k||(k={}));const Ze=new Q({mid:42,offset:(2019-1970)*31536e3*1e3}),et=i.defineComponent({components:{Loading:U},props:{disabled:{type:Boolean,default:!1},debounced:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},primary:{type:Boolean,default:!1},default:{type:Boolean,default:!1},info:{type:Boolean,default:!1},text:{type:Boolean,default:!1},link:{type:Boolean,default:!1},fontSize:{type:String,default:""},btnCode:{type:String,default:""},circle:{type:String,default:""},height:{type:String,default:""},width:{type:String,default:""},color:{type:String,default:""},loadingColor:{type:String,default:"#333333"},bgColor:{type:String,default:""},borderColor:{type:String,default:""},loading:{type:Boolean,default:!1},borderStyle:{type:String,default:"solid"},icon:{type:String,required:!1},size:{type:[Number,String],default:"auto"},fontWeight:{type:[Number,String],default:500},lineHeight:{type:String,default:""},borderWidth:{type:String,default:""}},computed:{styleOjb(){return this.plain?{background:this.bgColor||"#fff",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#99004A"}`,color:this.color||"#99004A",width:this.width,height:this.height,borderRadius:this.circle,fontSize:this.fontSize||"16px",fontWeight:this.fontWeight||500,size:this.size}:this.primary?{background:this.bgColor||"#99004A",borderWidth:this.borderWidth||"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#99004A"}`,color:this.color||"#ffffff",width:this.width,height:this.height,borderRadius:this.circle,fontWeight:this.fontWeight||500,size:this.size}:this.default?{background:this.bgColor||"#ffffff",borderWidth:this.borderWidth||"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#DDE2E6"}`,color:this.color||"#99004A",width:this.width,height:this.height,borderRadius:this.circle,fontWeight:this.fontWeight||500,size:this.size}:this.info?{background:this.bgColor||"#C4C4C4",borderWidth:this.borderWidth||"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#C4C4C4"}`,color:this.color||"#FFFFFF",width:this.width,height:this.height,borderRadius:this.circle,fontWeight:this.fontWeight||500,size:this.size}:this.text?{width:`${this.width||"41px"}`,height:`${this.height||"24px"}`,background:this.bgColor||"#ffffff",borderWidth:this.borderWidth||"0px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#C4C4C4"}`,color:this.color||"#E2A650",borderRadius:this.circle||"8px",fontSize:this.fontSize||"14px",fontWeight:this.fontWeight||500,size:this.size,lineHeight:this.lineHeight||"24px"}:this.link?{width:this.width,height:this.height,borderWidth:this.borderWidth||"0px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#C4C4C4"}`,color:this.color||"#E2A650",borderRadius:this.circle||"8px",fontSize:this.fontSize||"14px",fontWeight:this.fontWeight||500,size:this.size,lineHeight:this.lineHeight||"24px"}:{width:this.width,height:this.height,color:this.color||"#ffffff",background:this.bgColor||"#99004A",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#99004A"}`,borderRadius:this.circle||"8px",fontSize:this.fontSize||"14px",fontWeight:this.fontWeight||500,size:this.size||"20",borderWidth:this.borderWidth||"0px"}},geturl(){if(this.icon){if(this.icon.includes("/")||this.icon.includes("base64"))return this.icon;if(this.icon.includes("svg"))return`${this.icon}`}else return"";return`${this.icon}`},styleObject:function(){return{width:typeof this.size=="string"?this.size:this.size+"px",height:typeof this.size=="string"?this.size:this.size+"px"}}},emits:["handleClick"],setup(e,t){const o=s=>{let l=Ze.generate(),a=`${e.btnCode}_${l}`;console.log("按钮组件点击事件获取到事件对象及事件唯一标识符",s,a),e.btnCode?t.emit("handleClick",a):t.emit("handleClick","")},r=k.debouncedFun(s=>{o(s)},3e3),n=s=>{e.debounced?r(s):o(s)};return i.onUnmounted(()=>{r.cancel()}),{getHandleClick:n,handleClick:o}}}),ut="",tt=(e,t)=>{const o=e.__vccOpts||e;for(const[r,n]of t)o[r]=n;return o},it={class:"common-button"},ot={key:0,class:"s-icon"},rt=["src"],nt=["btnCode"],lt={key:0,class:"s-icon padding-icon"},st=["src"];function at(e,t,o,r,n,s){const l=i.resolveComponent("Loading"),a=i.resolveComponent("el-icon"),f=i.resolveComponent("el-button");return i.openBlock(),i.createElementBlock("div",it,[e.link?(i.openBlock(),i.createElementBlock("span",{key:1,class:"link",style:i.normalizeStyle(e.styleOjb),btnCode:e.btnCode,onClick:t[0]||(t[0]=(...c)=>e.getHandleClick&&e.getHandleClick(...c))},[e.icon?(i.openBlock(),i.createElementBlock("i",lt,[i.createElementVNode("img",{src:e.geturl,alt:"",style:i.normalizeStyle(e.styleObject)},null,12,st)])):i.createCommentVNode("",!0),i.createElementVNode("span",{style:i.normalizeStyle({color:e.color})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4),e.loading?(i.openBlock(),i.createBlock(a,{key:1,class:"is-loading",color:e.loadingColor},{default:i.withCtx(()=>[i.createVNode(l)]),_:1},8,["color"])):i.createCommentVNode("",!0)],12,nt)):(i.openBlock(),i.createBlock(f,{key:0,class:i.normalizeClass(["s-button",{plain:e.plain,btnhover:!e.plain,loading:e.loading}]),disabled:e.disabled,loading:e.loading,style:i.normalizeStyle(e.styleOjb),onClick:e.getHandleClick,btnCode:e.btnCode},{default:i.withCtx(()=>[e.icon?(i.openBlock(),i.createElementBlock("i",ot,[i.createElementVNode("img",{src:e.geturl,alt:"",style:i.normalizeStyle(e.styleObject)},null,12,rt)])):i.createCommentVNode("",!0),i.createElementVNode("span",{style:i.normalizeStyle({color:e.color})},[i.renderSlot(e.$slots,"default",{},void 0,!0)],4),e.loading?(i.openBlock(),i.createBlock(a,{key:1,class:"is-loading",color:e.loadingColor},{default:i.withCtx(()=>[i.createVNode(l)]),_:1},8,["color"])):i.createCommentVNode("",!0)]),_:3},8,["class","disabled","loading","style","onClick","btnCode"]))])}const _=tt(et,[["render",at],["__scopeId","data-v-6cd7f7fe"]]);function $(e,t={}){$.installed||($.installed=!0,e.component("common-button",_))}return _.install=$,_});
1
+ (function(t,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("vue")):typeof define=="function"&&define.amd?define(["vue"],g):(t=typeof globalThis<"u"?globalThis:t||self,t.button=g(t.Vue))})(this,function(t){"use strict";/*! Element Plus Icons Vue v2.1.0 */var g=(e,i)=>{let o=e.__vccOpts||e;for(let[r,n]of i)o[r]=n;return o},q={name:"Loading"},D={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},G=t.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.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.248zm452.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.248zM828.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 0zm-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 0z"},null,-1),P=[G];function x(e,i,o,r,n,s){return t.openBlock(),t.createElementBlock("svg",D,P)}var U=g(q,[["render",x],["__file","loading.vue"]]);function C(e,i,o){for(var r=[],n=Math.max(e.length,i.length),s=0,l=0;l<n||s;){var a=l<e.length?e[l]:0,c=l<i.length?i[l]:0,f=s+a+c;r.push(f%o),s=Math.floor(f/o),l++}return r}function j(e,i,o){if(e<0)return null;if(e==0)return[];for(var r=[],n=i;e&1&&(r=C(r,n,o)),e=e>>1,e!==0;)n=C(n,n,o);return r}function X(e,i){for(var o=e.split(""),r=[],n=o.length-1;n>=0;n--){var s=parseInt(o[n],i);if(isNaN(s))return null;r.push(s)}return r}function J(e,i,o){var r=X(e,i);if(r===null)return null;for(var n=[],s=[1],l=0;l<r.length;l++)r[l]&&(n=C(n,j(r[l],s,o),o)),s=j(i,s,o);for(var a="",l=n.length-1;l>=0;l--)a+=n[l].toString(o);return a}function K(e){return e.substring(0,2)==="0x"&&(e=e.substring(2)),e=e.toLowerCase(),J(e,16,10)}class Q{constructor(i){i=i||{},this.seq=0,this.mid=(i.mid||1)%1023,this.offset=i.offset||0,this.lastTime=0}generate(){const i=Date.now(),o=(i-this.offset).toString(2);this.lastTime==i?(this.seq++,this.seq>4095&&(this.seq=0)):this.seq=0,this.lastTime=i;let r=this.seq.toString(2),n=this.mid.toString(2);for(;r.length<12;)r="0"+r;for(;n.length<10;)n="0"+n;const s=o+n+r;let l="";for(let a=s.length;a>0;a-=4)l=parseInt(s.substring(a-4,a),2).toString(16)+l;return K(l)}}var m=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Z(e){var i=typeof e;return e!=null&&(i=="object"||i=="function")}var v=Z,ee=typeof m=="object"&&m&&m.Object===Object&&m,te=ee,ie=te,oe=typeof self=="object"&&self&&self.Object===Object&&self,re=ie||oe||Function("return this")(),O=re,ne=O,le=function(){return ne.Date.now()},se=le,ae=/\s/;function de(e){for(var i=e.length;i--&&ae.test(e.charAt(i)););return i}var ce=de,fe=ce,he=/^\s+/;function ge(e){return e&&e.slice(0,fe(e)+1).replace(he,"")}var ue=ge,be=O,pe=be.Symbol,W=pe,B=W,E=Object.prototype,me=E.hasOwnProperty,ye=E.toString,u=B?B.toStringTag:void 0;function Ce(e){var i=me.call(e,u),o=e[u];try{e[u]=void 0;var r=!0}catch{}var n=ye.call(e);return r&&(i?e[u]=o:delete e[u]),n}var Se=Ce,ke=Object.prototype,$e=ke.toString;function _e(e){return $e.call(e)}var ze=_e,N=W,we=Se,Te=ze,je="[object Null]",ve="[object Undefined]",L=N?N.toStringTag:void 0;function Oe(e){return e==null?e===void 0?ve:je:L&&L in Object(e)?we(e):Te(e)}var We=Oe;function Be(e){return e!=null&&typeof e=="object"}var Ee=Be,Ne=We,Le=Ee,Ie="[object Symbol]";function Re(e){return typeof e=="symbol"||Le(e)&&Ne(e)==Ie}var Ve=Re,Ae=ue,I=v,Fe=Ve,R=0/0,He=/^[-+]0x[0-9a-f]+$/i,Me=/^0b[01]+$/i,qe=/^0o[0-7]+$/i,De=parseInt;function Ge(e){if(typeof e=="number")return e;if(Fe(e))return R;if(I(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=I(i)?i+"":i}if(typeof e!="string")return e===0?e:+e;e=Ae(e);var o=Me.test(e);return o||qe.test(e)?De(e.slice(2),o?2:8):He.test(e)?R:+e}var Pe=Ge,xe=v,S=se,V=Pe,Ue="Expected a function",Xe=Math.max,Je=Math.min;function Ke(e,i,o){var r,n,s,l,a,c,f=0,A=!1,b=!1,z=!0;if(typeof e!="function")throw new TypeError(Ue);i=V(i)||0,xe(o)&&(A=!!o.leading,b="maxWait"in o,s=b?Xe(V(o.maxWait)||0,i):s,z="trailing"in o?!!o.trailing:z);function w(d){var h=r,p=n;return r=n=void 0,f=d,l=e.apply(p,h),l}function ht(d){return f=d,a=setTimeout(y,i),A?w(d):l}function gt(d){var h=d-c,p=d-f,M=i-h;return b?Je(M,s-p):M}function F(d){var h=d-c,p=d-f;return c===void 0||h>=i||h<0||b&&p>=s}function y(){var d=S();if(F(d))return H(d);a=setTimeout(y,gt(d))}function H(d){return a=void 0,z&&r?w(d):(r=n=void 0,l)}function ut(){a!==void 0&&clearTimeout(a),f=0,r=c=n=a=void 0}function bt(){return a===void 0?l:H(S())}function T(){var d=S(),h=F(d);if(r=arguments,n=this,c=d,h){if(a===void 0)return ht(c);if(b)return clearTimeout(a),a=setTimeout(y,i),w(c)}return a===void 0&&(a=setTimeout(y,i)),l}return T.cancel=ut,T.flush=bt,T}var Qe=Ke;const Ye=Y(Qe);var k;(e=>{e.debouncedFun=(i,o)=>Ye(i,o,{leading:!0,trailing:!1})})(k||(k={}));const Ze=new Q({mid:42,offset:(2019-1970)*31536e3*1e3}),et=t.defineComponent({components:{Loading:U},props:{disabled:{type:Boolean,default:!1},debounced:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},primary:{type:Boolean,default:!1},default:{type:Boolean,default:!1},info:{type:Boolean,default:!1},text:{type:Boolean,default:!1},link:{type:Boolean,default:!1},buttonClass:{type:String},fontSize:{type:String,default:""},btnCode:{type:String,default:""},circle:{type:String,default:""},height:{type:String,default:""},width:{type:String,default:""},color:{type:String,default:""},loadingColor:{type:String,default:"#333333"},bgColor:{type:String,default:""},borderColor:{type:String,default:""},loading:{type:Boolean,default:!1},loadingLeft:{type:Boolean,default:!1},borderStyle:{type:String,default:"solid"},icon:{type:String,required:!1},iconRight:{type:Boolean,default:!1},size:{type:[Number,String],default:"auto"},fontWeight:{type:[Number,String],default:500},lineHeight:{type:String,default:""},borderWidth:{type:String,default:""}},computed:{styleOjb(){return this.plain?{background:this.bgColor||"#fff",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#99004A"}`,color:this.color||"#99004A",width:this.width,height:this.height,borderRadius:this.circle,fontSize:this.fontSize||"16px",fontWeight:this.fontWeight||500,size:this.size}:this.primary?{background:this.bgColor||"#99004A",borderWidth:this.borderWidth||"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#99004A"}`,color:this.color||"#ffffff",width:this.width,height:this.height,borderRadius:this.circle,fontWeight:this.fontWeight||500,size:this.size}:this.default?{background:this.bgColor||"#ffffff",borderWidth:this.borderWidth||"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#DDE2E6"}`,color:this.color||"#99004A",width:this.width,height:this.height,borderRadius:this.circle,fontWeight:this.fontWeight||500,size:this.size}:this.info?{background:this.bgColor||"#C4C4C4",borderWidth:this.borderWidth||"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#C4C4C4"}`,color:this.color||"#FFFFFF",width:this.width,height:this.height,borderRadius:this.circle,fontWeight:this.fontWeight||500,size:this.size}:this.text?{width:`${this.width||"41px"}`,height:`${this.height||"24px"}`,background:this.bgColor||"#ffffff",borderWidth:this.borderWidth||"0px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#C4C4C4"}`,color:this.color||"#E2A650",borderRadius:this.circle||"8px",fontSize:this.fontSize||"14px",fontWeight:this.fontWeight||500,size:this.size,lineHeight:this.lineHeight||"24px"}:this.link?{width:this.width,height:this.height,borderWidth:this.borderWidth||"0px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#C4C4C4"}`,color:this.color||"#E2A650",borderRadius:this.circle||"8px",fontSize:this.fontSize||"14px",fontWeight:this.fontWeight||500,size:this.size,lineHeight:this.lineHeight||"24px"}:{width:this.width,height:this.height,color:this.color||"#ffffff",background:this.bgColor||"#99004A",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#99004A"}`,borderRadius:this.circle||"8px",fontSize:this.fontSize||"14px",fontWeight:this.fontWeight||500,size:this.size||"20",borderWidth:this.borderWidth||"0px"}},geturl(){if(this.icon){if(this.icon.includes("/")||this.icon.includes("base64"))return this.icon;if(this.icon.includes("svg"))return`${this.icon}`}else return"";return`${this.icon}`},styleObject:function(){return{width:typeof this.size=="string"?this.size:this.size+"px",height:typeof this.size=="string"?this.size:this.size+"px"}}},emits:["handleClick"],setup(e,i){const o=s=>{let l=Ze.generate(),a=`${e.btnCode}_${l}`;console.log("按钮组件点击事件获取到事件对象及事件唯一标识符",s,a),e.btnCode?i.emit("handleClick",a):i.emit("handleClick","")},r=k.debouncedFun(s=>{o(s)},3e3),n=s=>{e.debounced?r(s):o(s)};return t.onUnmounted(()=>{r.cancel()}),{getHandleClick:n,handleClick:o}}}),pt="",tt=(e,i)=>{const o=e.__vccOpts||e;for(const[r,n]of i)o[r]=n;return o},it={key:0,class:"s-icon"},ot=["src"],rt={key:1,class:"s-icon"},nt=["src"],lt=["btnCode"],st={key:0,class:"s-icon padding-icon"},at=["src"],dt={key:1,class:"s-icon padding-icon-right"},ct=["src"];function ft(e,i,o,r,n,s){const l=t.resolveComponent("Loading"),a=t.resolveComponent("el-icon"),c=t.resolveComponent("el-button");return e.link?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(["link",e.$attrs.class]),style:t.normalizeStyle(e.styleOjb),btnCode:e.btnCode,onClick:i[0]||(i[0]=(...f)=>e.getHandleClick&&e.getHandleClick(...f))},[e.icon&&!e.iconRight?(t.openBlock(),t.createElementBlock("i",st,[t.createElementVNode("img",{src:e.geturl,alt:"",style:t.normalizeStyle(e.styleObject)},null,12,at)])):t.createCommentVNode("",!0),t.createElementVNode("span",{style:t.normalizeStyle({color:e.color})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4),e.icon&&e.iconRight?(t.openBlock(),t.createElementBlock("i",dt,[t.createElementVNode("img",{src:e.geturl,alt:"",style:t.normalizeStyle(e.styleObject)},null,12,ct)])):t.createCommentVNode("",!0),e.loading?(t.openBlock(),t.createBlock(a,{key:2,class:"is-loading",color:e.loadingColor},{default:t.withCtx(()=>[t.createVNode(l)]),_:1},8,["color"])):t.createCommentVNode("",!0)],14,lt)):(t.openBlock(),t.createBlock(c,{key:0,class:t.normalizeClass(["s-button",e.$attrs.class]),style:t.normalizeStyle(e.styleOjb),disabled:e.disabled,loading:e.loadingLeft,onClick:e.getHandleClick,btnCode:e.btnCode},{default:t.withCtx(()=>[e.icon&&!e.iconRight?(t.openBlock(),t.createElementBlock("i",it,[t.createElementVNode("img",{src:e.geturl,alt:"",style:t.normalizeStyle(e.styleObject)},null,12,ot)])):t.createCommentVNode("",!0),t.createElementVNode("span",{style:t.normalizeStyle({color:e.color})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4),e.icon&&e.iconRight?(t.openBlock(),t.createElementBlock("i",rt,[t.createElementVNode("img",{src:e.geturl,alt:"",style:t.normalizeStyle(e.styleObject)},null,12,nt)])):t.createCommentVNode("",!0),e.loading?(t.openBlock(),t.createBlock(a,{key:2,class:"is-loading",color:e.loadingColor},{default:t.withCtx(()=>[t.createVNode(l)]),_:1},8,["color"])):t.createCommentVNode("",!0)]),_:3},8,["class","style","disabled","loading","onClick","btnCode"]))}const $=tt(et,[["render",ft],["__scopeId","data-v-e26f913d"]]);function _(e,i={}){_.installed||(_.installed=!0,e.component("common-button",$))}return $.install=_,$});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinosoft-common-button",
3
- "version": "1.3.9",
3
+ "version": "1.4.0",
4
4
  "description": "",
5
5
  "main": "common-button.es.js",
6
6
  "scripts": {
package/style.css CHANGED
@@ -1 +1 @@
1
- .s-button[data-v-6cd7f7fe]{height:36px;line-height:1;border:none;background:#99004A;padding:0 19px;border-radius:7px;cursor:pointer;white-space:nowrap;text-align:center;transition:all .5s ease-in-out;user-select:none}.s-button+.s-button[data-v-6cd7f7fe]{margin-left:15px}.s-button span[data-v-6cd7f7fe]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-6cd7f7fe]{vertical-align:middle}.link[data-v-6cd7f7fe]{align-items:center;display:inline-flex}.link[data-v-6cd7f7fe]:hover{cursor:pointer;color:red}.plain[data-v-6cd7f7fe]{background:#fff}.plain-icon[data-v-6cd7f7fe]{margin-right:4px}.loading[data-v-6cd7f7fe]{opacity:.8}.s-icon[data-v-6cd7f7fe]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden;vertical-align:middle}.s-icon img[data-v-6cd7f7fe]{float:left;width:25px;height:25px}.padding-icon[data-v-6cd7f7fe]{padding-right:5px}
1
+ .s-button[data-v-e26f913d]{height:36px;line-height:1;border:none;background:#99004A;padding:0 19px;border-radius:7px;cursor:pointer;white-space:nowrap;text-align:center;transition:all .5s ease-in-out;user-select:none}.s-button+.s-button[data-v-e26f913d]{margin-left:15px}.s-button span[data-v-e26f913d]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-e26f913d]{vertical-align:middle}.link[data-v-e26f913d]{align-items:center;display:inline-flex}.link[data-v-e26f913d]:hover{cursor:pointer;color:red}.plain[data-v-e26f913d]{background:#fff}.plain-icon[data-v-e26f913d]{margin-right:4px}.loading[data-v-e26f913d]{opacity:.8}.s-icon[data-v-e26f913d]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden;vertical-align:middle}.s-icon img[data-v-e26f913d]{float:left;width:25px;height:25px}.padding-icon[data-v-e26f913d]{padding-right:5px}.padding-icon-right[data-v-e26f913d]{padding-left:3px}