sinosoft-common-button 1.2.2 → 1.2.4

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,16 +1,16 @@
1
- import { openBlock as a, createElementBlock as c, createElementVNode as u, defineComponent as S, resolveComponent as h, createVNode as y, normalizeClass as w, normalizeStyle as f, withCtx as C, createCommentVNode as m, renderSlot as $, createBlock as k } from "vue";
1
+ import { openBlock as a, createElementBlock as c, createElementVNode as u, defineComponent as S, resolveComponent as h, createVNode as y, normalizeClass as w, normalizeStyle as f, withCtx as C, createTextVNode as $, toDisplayString as k, createCommentVNode as m, renderSlot as z, createBlock as F } from "vue";
2
2
  /*! Element Plus Icons Vue v2.1.0 */
3
- var z = (e, t) => {
3
+ var x = (e, t) => {
4
4
  let i = e.__vccOpts || e;
5
5
  for (let [o, r] of t)
6
6
  i[o] = r;
7
7
  return i;
8
- }, F = {
8
+ }, A = {
9
9
  name: "Loading"
10
- }, x = {
10
+ }, B = {
11
11
  xmlns: "http://www.w3.org/2000/svg",
12
12
  viewBox: "0 0 1024 1024"
13
- }, A = /* @__PURE__ */ u(
13
+ }, W = /* @__PURE__ */ u(
14
14
  "path",
15
15
  {
16
16
  fill: "currentColor",
@@ -19,17 +19,17 @@ var z = (e, t) => {
19
19
  null,
20
20
  -1
21
21
  /* HOISTED */
22
- ), B = [
23
- A
22
+ ), L = [
23
+ W
24
24
  ];
25
- function W(e, t, i, o, r, s) {
26
- return a(), c("svg", x, B);
25
+ function D(e, t, i, o, r, n) {
26
+ return a(), c("svg", B, L);
27
27
  }
28
- var L = /* @__PURE__ */ z(F, [["render", W], ["__file", "loading.vue"]]);
28
+ var O = /* @__PURE__ */ x(A, [["render", D], ["__file", "loading.vue"]]);
29
29
  function g(e, t, i) {
30
- for (var o = [], r = Math.max(e.length, t.length), s = 0, l = 0; l < r || s; ) {
31
- var n = l < e.length ? e[l] : 0, d = l < t.length ? t[l] : 0, b = s + n + d;
32
- o.push(b % i), s = Math.floor(b / i), l++;
30
+ for (var o = [], r = Math.max(e.length, t.length), n = 0, l = 0; l < r || n; ) {
31
+ var s = l < e.length ? e[l] : 0, d = l < t.length ? t[l] : 0, b = n + s + d;
32
+ o.push(b % i), n = Math.floor(b / i), l++;
33
33
  }
34
34
  return o;
35
35
  }
@@ -42,33 +42,33 @@ function v(e, t, i) {
42
42
  r = g(r, r, i);
43
43
  return o;
44
44
  }
45
- function O(e, t) {
45
+ function q(e, t) {
46
46
  for (var i = e.split(""), o = [], r = i.length - 1; r >= 0; r--) {
47
- var s = parseInt(i[r], t);
48
- if (isNaN(s))
47
+ var n = parseInt(i[r], t);
48
+ if (isNaN(n))
49
49
  return null;
50
- o.push(s);
50
+ o.push(n);
51
51
  }
52
52
  return o;
53
53
  }
54
- function q(e, t, i) {
55
- var o = O(e, t);
54
+ function R(e, t, i) {
55
+ var o = q(e, t);
56
56
  if (o === null)
57
57
  return null;
58
- for (var r = [], s = [1], l = 0; l < o.length; l++)
58
+ for (var r = [], n = [1], l = 0; l < o.length; l++)
59
59
  o[l] && (r = g(
60
60
  r,
61
- v(o[l], s, i),
61
+ v(o[l], n, i),
62
62
  i
63
- )), s = v(t, s, i);
64
- for (var n = "", l = r.length - 1; l >= 0; l--)
65
- n += r[l].toString(i);
66
- return n;
63
+ )), n = v(t, n, i);
64
+ for (var s = "", l = r.length - 1; l >= 0; l--)
65
+ s += r[l].toString(i);
66
+ return s;
67
67
  }
68
- function D(e) {
69
- return e.substring(0, 2) === "0x" && (e = e.substring(2)), e = e.toLowerCase(), q(e, 16, 10);
68
+ function N(e) {
69
+ return e.substring(0, 2) === "0x" && (e = e.substring(2)), e = e.toLowerCase(), R(e, 16, 10);
70
70
  }
71
- class R {
71
+ class T {
72
72
  constructor(t) {
73
73
  t = t || {}, this.seq = 0, this.mid = (t.mid || 1) % 1023, this.offset = t.offset || 0, this.lastTime = 0;
74
74
  }
@@ -80,19 +80,19 @@ class R {
80
80
  o = "0" + o;
81
81
  for (; r.length < 10; )
82
82
  r = "0" + r;
83
- const s = i + r + o;
83
+ const n = i + r + o;
84
84
  let l = "";
85
- for (let n = s.length; n > 0; n -= 4)
86
- l = parseInt(s.substring(n - 4, n), 2).toString(16) + l;
87
- return D(l);
85
+ for (let s = n.length; s > 0; s -= 4)
86
+ l = parseInt(n.substring(s - 4, s), 2).toString(16) + l;
87
+ return N(l);
88
88
  }
89
89
  }
90
- const N = new R({
90
+ const M = new T({
91
91
  mid: 42,
92
92
  offset: (2019 - 1970) * 31536e3 * 1e3
93
- }), M = S({
93
+ }), V = S({
94
94
  components: {
95
- Loading: L
95
+ Loading: O
96
96
  },
97
97
  props: {
98
98
  disabled: {
@@ -279,10 +279,10 @@ const N = new R({
279
279
  if (this.icon.includes("/") || this.icon.includes("base64"))
280
280
  return this.icon;
281
281
  if (this.icon.includes("svg"))
282
- return `/src/assets/icons/svg/${this.icon}`;
282
+ return `${this.icon}`;
283
283
  } else
284
284
  return "";
285
- return `/src/assets/images/icons/png/${this.icon}.png`;
285
+ return `${this.icon}`;
286
286
  },
287
287
  styleObject: function() {
288
288
  return {
@@ -295,27 +295,27 @@ const N = new R({
295
295
  setup(e, t) {
296
296
  return {
297
297
  handleClick: (o) => {
298
- let r = N.generate(), s = `${e.btnCode}_${r}`;
298
+ let r = M.generate(), n = `${e.btnCode}_${r}`;
299
299
  console.log(
300
300
  "按钮组件点击事件获取到事件对象及事件唯一标识符",
301
301
  o,
302
- s
303
- ), e.btnCode ? t.emit("handleClick", s) : t.emit("handleClick", "");
302
+ n
303
+ ), e.btnCode ? t.emit("handleClick", n) : t.emit("handleClick", "");
304
304
  }
305
305
  };
306
306
  }
307
307
  });
308
- const T = (e, t) => {
308
+ const j = (e, t) => {
309
309
  const i = e.__vccOpts || e;
310
310
  for (const [o, r] of t)
311
311
  i[o] = r;
312
312
  return i;
313
- }, V = {
313
+ }, E = {
314
314
  key: 0,
315
315
  class: "s-icon"
316
- }, j = ["src"];
317
- function E(e, t, i, o, r, s) {
318
- const l = h("Loading"), n = h("el-icon"), d = h("el-button");
316
+ }, I = ["src"];
317
+ function H(e, t, i, o, r, n) {
318
+ const l = h("Loading"), s = h("el-icon"), d = h("el-button");
319
319
  return a(), c("div", null, [
320
320
  y(d, {
321
321
  class: w(["s-button", { plain: e.plain, btnhover: !e.plain, loading: e.loading }]),
@@ -326,19 +326,20 @@ function E(e, t, i, o, r, s) {
326
326
  btnCode: e.btnCode
327
327
  }, {
328
328
  default: C(() => [
329
- e.icon ? (a(), c("i", V, [
329
+ $(k(e.plain) + " ", 1),
330
+ e.icon ? (a(), c("i", E, [
330
331
  u("img", {
331
332
  src: e.geturl,
332
333
  alt: "",
333
334
  style: f(e.styleObject)
334
- }, null, 12, j)
335
+ }, null, 12, I)
335
336
  ])) : m("", !0),
336
337
  u("span", {
337
338
  style: f({ color: e.color })
338
339
  }, [
339
- $(e.$slots, "default", {}, void 0, !0)
340
+ z(e.$slots, "default", {}, void 0, !0)
340
341
  ], 4),
341
- e.loading ? (a(), k(n, {
342
+ e.loading ? (a(), F(s, {
342
343
  key: 1,
343
344
  class: "is-loading",
344
345
  color: e.loadingColor
@@ -353,7 +354,7 @@ function E(e, t, i, o, r, s) {
353
354
  }, 8, ["class", "disabled", "loading", "style", "onClick", "btnCode"])
354
355
  ]);
355
356
  }
356
- const _ = /* @__PURE__ */ T(M, [["render", E], ["__scopeId", "data-v-559bde5a"]]);
357
+ const _ = /* @__PURE__ */ j(V, [["render", H], ["__scopeId", "data-v-51d59256"]]);
357
358
  function p(e, t = {}) {
358
359
  p.installed || (p.installed = !0, e.component("common-button", _));
359
360
  }
@@ -1 +1 @@
1
- (function(t,d){typeof exports=="object"&&typeof module<"u"?module.exports=d(require("vue")):typeof define=="function"&&define.amd?define(["vue"],d):(t=typeof globalThis<"u"?globalThis:t||self,t.button=d(t.Vue))})(this,function(t){"use strict";/*! Element Plus Icons Vue v2.1.0 */var d=(e,o)=>{let l=e.__vccOpts||e;for(let[i,r]of o)l[i]=r;return l},b={name:"Loading"},y={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},C=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),m=[C];function _(e,o,l,i,r,s){return t.openBlock(),t.createElementBlock("svg",y,m)}var S=d(b,[["render",_],["__file","loading.vue"]]);function h(e,o,l){for(var i=[],r=Math.max(e.length,o.length),s=0,n=0;n<r||s;){var a=n<e.length?e[n]:0,u=n<o.length?o[n]:0,g=s+a+u;i.push(g%l),s=Math.floor(g/l),n++}return i}function p(e,o,l){if(e<0)return null;if(e==0)return[];for(var i=[],r=o;e&1&&(i=h(i,r,l)),e=e>>1,e!==0;)r=h(r,r,l);return i}function w(e,o){for(var l=e.split(""),i=[],r=l.length-1;r>=0;r--){var s=parseInt(l[r],o);if(isNaN(s))return null;i.push(s)}return i}function k(e,o,l){var i=w(e,o);if(i===null)return null;for(var r=[],s=[1],n=0;n<i.length;n++)i[n]&&(r=h(r,p(i[n],s,l),l)),s=p(o,s,l);for(var a="",n=r.length-1;n>=0;n--)a+=r[n].toString(l);return a}function $(e){return e.substring(0,2)==="0x"&&(e=e.substring(2)),e=e.toLowerCase(),k(e,16,10)}class v{constructor(o){o=o||{},this.seq=0,this.mid=(o.mid||1)%1023,this.offset=o.offset||0,this.lastTime=0}generate(){const o=Date.now(),l=(o-this.offset).toString(2);this.lastTime==o?(this.seq++,this.seq>4095&&(this.seq=0)):this.seq=0,this.lastTime=o;let i=this.seq.toString(2),r=this.mid.toString(2);for(;i.length<12;)i="0"+i;for(;r.length<10;)r="0"+r;const s=l+r+i;let n="";for(let a=s.length;a>0;a-=4)n=parseInt(s.substring(a-4,a),2).toString(16)+n;return $(n)}}const z=new v({mid:42,offset:(2019-1970)*31536e3*1e3}),F=t.defineComponent({components:{Loading:S},props:{disabled:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},primary:{type:Boolean,default:!1},default:{type:Boolean,default:!1},primaryDialog:{type:Boolean,default:!1},primaryOrdinary:{type:Boolean,default:!1},info:{type:Boolean,default:!1},infoDialog:{type:Boolean,default:!1},infoOrdinary:{type:Boolean,default:!1},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"}},computed:{styleOjb(){return this.plain?{background:"#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}:this.primary?{background:"#99004A",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#99004A"}`,color:this.color||"#ffffff",width:this.width,height:this.height,borderRadius:this.circle}:this.primaryOrdinary?{background:"#99004A",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#99004A"}`,color:this.color||"#ffffff",width:"190px",height:"52px",borderRadius:this.circle,fontSize:"16px",fontWeight:600}:this.primaryDialog?{width:"176px",height:"46px",background:"#99004A",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#99004A"}`,color:this.color||"#ffffff",borderRadius:"8px",fontSize:"16px",fontWeight:600}:this.default?{background:"#ffffff",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#DDE2E6"}`,color:this.color||"#99004A",width:this.width,height:this.height,borderRadius:this.circle}:this.info?{background:"#C4C4C4",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#C4C4C4"}`,color:this.color||"#FFFFFF",width:this.width,height:this.height,borderRadius:this.circle}:this.infoDialog?{width:"190px",height:"46px ",background:"#C4C4C4",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#C4C4C4"}`,color:this.color||"#FFFFFF",borderRadius:"8px",fontSize:"16px",fontWeight:600}:this.infoOrdinary?{width:"176px",height:"52px",background:"#C4C4C4",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#C4C4C4"}`,color:this.color||"#FFFFFF",borderRadius:"8px",fontSize:"16px",fontWeight:600}:{color:this.color||"#ffffff",background:this.bgColor||"#99004A",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#99004A"}`,width:this.width,height:this.height,borderRadius:this.circle}},geturl(){if(this.icon){if(this.icon.includes("/")||this.icon.includes("base64"))return this.icon;if(this.icon.includes("svg"))return`/src/assets/icons/svg/${this.icon}`}else return"";return`/src/assets/images/icons/png/${this.icon}.png`},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,o){return{handleClick:i=>{let r=z.generate(),s=`${e.btnCode}_${r}`;console.log("按钮组件点击事件获取到事件对象及事件唯一标识符",i,s),e.btnCode?o.emit("handleClick",s):o.emit("handleClick","")}}}}),L="",B=(e,o)=>{const l=e.__vccOpts||e;for(const[i,r]of o)l[i]=r;return l},x={key:0,class:"s-icon"},A=["src"];function W(e,o,l,i,r,s){const n=t.resolveComponent("Loading"),a=t.resolveComponent("el-icon"),u=t.resolveComponent("el-button");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(u,{class:t.normalizeClass(["s-button",{plain:e.plain,btnhover:!e.plain,loading:e.loading}]),disabled:e.disabled,loading:e.loading,style:t.normalizeStyle(e.styleOjb),onClick:e.handleClick,btnCode:e.btnCode},{default:t.withCtx(()=>[e.icon?(t.openBlock(),t.createElementBlock("i",x,[t.createElementVNode("img",{src:e.geturl,alt:"",style:t.normalizeStyle(e.styleObject)},null,12,A)])):t.createCommentVNode("",!0),t.createElementVNode("span",{style:t.normalizeStyle({color:e.color})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4),e.loading?(t.openBlock(),t.createBlock(a,{key:1,class:"is-loading",color:e.loadingColor},{default:t.withCtx(()=>[t.createVNode(n)]),_:1},8,["color"])):t.createCommentVNode("",!0)]),_:3},8,["class","disabled","loading","style","onClick","btnCode"])])}const f=B(F,[["render",W],["__scopeId","data-v-559bde5a"]]);function c(e,o={}){c.installed||(c.installed=!0,e.component("common-button",f))}return f.install=c,f});
1
+ (function(t,a){typeof exports=="object"&&typeof module<"u"?module.exports=a(require("vue")):typeof define=="function"&&define.amd?define(["vue"],a):(t=typeof globalThis<"u"?globalThis:t||self,t.button=a(t.Vue))})(this,function(t){"use strict";/*! Element Plus Icons Vue v2.1.0 */var a=(e,o)=>{let l=e.__vccOpts||e;for(let[i,r]of o)l[i]=r;return l},b={name:"Loading"},y={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},C=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),m=[C];function _(e,o,l,i,r,s){return t.openBlock(),t.createElementBlock("svg",y,m)}var S=a(b,[["render",_],["__file","loading.vue"]]);function h(e,o,l){for(var i=[],r=Math.max(e.length,o.length),s=0,n=0;n<r||s;){var d=n<e.length?e[n]:0,u=n<o.length?o[n]:0,g=s+d+u;i.push(g%l),s=Math.floor(g/l),n++}return i}function p(e,o,l){if(e<0)return null;if(e==0)return[];for(var i=[],r=o;e&1&&(i=h(i,r,l)),e=e>>1,e!==0;)r=h(r,r,l);return i}function w(e,o){for(var l=e.split(""),i=[],r=l.length-1;r>=0;r--){var s=parseInt(l[r],o);if(isNaN(s))return null;i.push(s)}return i}function k(e,o,l){var i=w(e,o);if(i===null)return null;for(var r=[],s=[1],n=0;n<i.length;n++)i[n]&&(r=h(r,p(i[n],s,l),l)),s=p(o,s,l);for(var d="",n=r.length-1;n>=0;n--)d+=r[n].toString(l);return d}function $(e){return e.substring(0,2)==="0x"&&(e=e.substring(2)),e=e.toLowerCase(),k(e,16,10)}class z{constructor(o){o=o||{},this.seq=0,this.mid=(o.mid||1)%1023,this.offset=o.offset||0,this.lastTime=0}generate(){const o=Date.now(),l=(o-this.offset).toString(2);this.lastTime==o?(this.seq++,this.seq>4095&&(this.seq=0)):this.seq=0,this.lastTime=o;let i=this.seq.toString(2),r=this.mid.toString(2);for(;i.length<12;)i="0"+i;for(;r.length<10;)r="0"+r;const s=l+r+i;let n="";for(let d=s.length;d>0;d-=4)n=parseInt(s.substring(d-4,d),2).toString(16)+n;return $(n)}}const v=new z({mid:42,offset:(2019-1970)*31536e3*1e3}),F=t.defineComponent({components:{Loading:S},props:{disabled:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},primary:{type:Boolean,default:!1},default:{type:Boolean,default:!1},primaryDialog:{type:Boolean,default:!1},primaryOrdinary:{type:Boolean,default:!1},info:{type:Boolean,default:!1},infoDialog:{type:Boolean,default:!1},infoOrdinary:{type:Boolean,default:!1},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"}},computed:{styleOjb(){return this.plain?{background:"#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}:this.primary?{background:"#99004A",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#99004A"}`,color:this.color||"#ffffff",width:this.width,height:this.height,borderRadius:this.circle}:this.primaryOrdinary?{background:"#99004A",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#99004A"}`,color:this.color||"#ffffff",width:"190px",height:"52px",borderRadius:this.circle,fontSize:"16px",fontWeight:600}:this.primaryDialog?{width:"176px",height:"46px",background:"#99004A",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#99004A"}`,color:this.color||"#ffffff",borderRadius:"8px",fontSize:"16px",fontWeight:600}:this.default?{background:"#ffffff",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#DDE2E6"}`,color:this.color||"#99004A",width:this.width,height:this.height,borderRadius:this.circle}:this.info?{background:"#C4C4C4",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#C4C4C4"}`,color:this.color||"#FFFFFF",width:this.width,height:this.height,borderRadius:this.circle}:this.infoDialog?{width:"190px",height:"46px ",background:"#C4C4C4",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#C4C4C4"}`,color:this.color||"#FFFFFF",borderRadius:"8px",fontSize:"16px",fontWeight:600}:this.infoOrdinary?{width:"176px",height:"52px",background:"#C4C4C4",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#C4C4C4"}`,color:this.color||"#FFFFFF",borderRadius:"8px",fontSize:"16px",fontWeight:600}:{color:this.color||"#ffffff",background:this.bgColor||"#99004A",borderStyle:`${this.borderStyle}`,borderColor:`${this.borderColor||this.color||"#99004A"}`,width:this.width,height:this.height,borderRadius:this.circle}},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,o){return{handleClick:i=>{let r=v.generate(),s=`${e.btnCode}_${r}`;console.log("按钮组件点击事件获取到事件对象及事件唯一标识符",i,s),e.btnCode?o.emit("handleClick",s):o.emit("handleClick","")}}}}),W="",B=(e,o)=>{const l=e.__vccOpts||e;for(const[i,r]of o)l[i]=r;return l},x={key:0,class:"s-icon"},A=["src"];function N(e,o,l,i,r,s){const n=t.resolveComponent("Loading"),d=t.resolveComponent("el-icon"),u=t.resolveComponent("el-button");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(u,{class:t.normalizeClass(["s-button",{plain:e.plain,btnhover:!e.plain,loading:e.loading}]),disabled:e.disabled,loading:e.loading,style:t.normalizeStyle(e.styleOjb),onClick:e.handleClick,btnCode:e.btnCode},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.plain)+" ",1),e.icon?(t.openBlock(),t.createElementBlock("i",x,[t.createElementVNode("img",{src:e.geturl,alt:"",style:t.normalizeStyle(e.styleObject)},null,12,A)])):t.createCommentVNode("",!0),t.createElementVNode("span",{style:t.normalizeStyle({color:e.color})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4),e.loading?(t.openBlock(),t.createBlock(d,{key:1,class:"is-loading",color:e.loadingColor},{default:t.withCtx(()=>[t.createVNode(n)]),_:1},8,["color"])):t.createCommentVNode("",!0)]),_:3},8,["class","disabled","loading","style","onClick","btnCode"])])}const f=B(F,[["render",N],["__scopeId","data-v-51d59256"]]);function c(e,o={}){c.installed||(c.installed=!0,e.component("common-button",f))}return f.install=c,f});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinosoft-common-button",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "",
5
5
  "main": "common-button.es.js",
6
6
  "scripts": {
package/style.css CHANGED
@@ -1 +1 @@
1
- .s-button[data-v-559bde5a]{display:inline-block;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[data-v-559bde5a] :hover{background-color:#641438}.s-button+.s-button[data-v-559bde5a]{margin-left:15px}.s-button span[data-v-559bde5a]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-559bde5a]{vertical-align:middle}.plain[data-v-559bde5a]{background:#fff}.plain-icon[data-v-559bde5a]{margin-right:4px}.loading[data-v-559bde5a]{opacity:.8}.s-icon[data-v-559bde5a]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden}.s-icon img[data-v-559bde5a]{float:left}
1
+ .btnhover[data-v-51d59256]:hover{box-shadow:0 0 15px #2461cc4d;opacity:.95;background-color:#641438}.s-button[data-v-51d59256]{display:inline-block;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-51d59256]{margin-left:15px}.s-button span[data-v-51d59256]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-51d59256]{vertical-align:middle}.plain[data-v-51d59256]{background:#fff}.plain-icon[data-v-51d59256]{margin-right:4px}.loading[data-v-51d59256]{opacity:.8}.s-icon[data-v-51d59256]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden}.s-icon img[data-v-51d59256]{float:left;width:25px;height:25px}