sinosoft-common-button 1.3.5 → 1.3.6

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.
@@ -520,7 +520,7 @@ function kt(e, t, i, r, o, l) {
520
520
  }, 8, ["class", "disabled", "loading", "style", "onClick", "btnCode"]))
521
521
  ]);
522
522
  }
523
- const J = /* @__PURE__ */ yt(pt, [["render", kt], ["__scopeId", "data-v-129408fa"]]);
523
+ const J = /* @__PURE__ */ yt(pt, [["render", kt], ["__scopeId", "data-v-48a301cd"]]);
524
524
  function I(e, t = {}) {
525
525
  I.installed || (I.installed = !0, e.component("common-button", J));
526
526
  }
@@ -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,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-129408fa"]]);function $(e,t={}){$.installed||($.installed=!0,e.component("common-button",_))}return _.install=$,_});
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,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-48a301cd"]]);function $(e,t={}){$.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.5",
3
+ "version": "1.3.6",
4
4
  "description": "",
5
5
  "main": "common-button.es.js",
6
6
  "scripts": {
package/style.css CHANGED
@@ -1 +1 @@
1
- .s-button[data-v-129408fa]{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-129408fa]{margin-left:15px}.s-button span[data-v-129408fa]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-129408fa]{vertical-align:middle}.link[data-v-129408fa]{align-items:center;display:inline-flex}.link[data-v-129408fa]:hover{cursor:pointer;color:red}.plain[data-v-129408fa]{background:#fff}.plain-icon[data-v-129408fa]{margin-right:4px}.loading[data-v-129408fa]{opacity:.8}.s-icon[data-v-129408fa]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden;vertical-align:middle}.s-icon img[data-v-129408fa]{float:left;width:25px;height:25px}.padding-icon[data-v-129408fa]{padding-right:5px}
1
+ .s-button[data-v-48a301cd]{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-48a301cd]{margin-left:15px}.s-button span[data-v-48a301cd]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-48a301cd]{vertical-align:middle}.link[data-v-48a301cd]{align-items:center;display:inline-flex}.link[data-v-48a301cd]:hover{cursor:pointer;color:red}.plain[data-v-48a301cd]{background:#fff}.plain-icon[data-v-48a301cd]{margin-right:4px}.loading[data-v-48a301cd]{opacity:.8}.s-icon[data-v-48a301cd]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden;vertical-align:middle}.s-icon img[data-v-48a301cd]{float:left;width:25px;height:25px}.padding-icon[data-v-48a301cd]{padding-right:5px}