sinosoft-common-button 1.2.3 → 1.2.5

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.
@@ -353,7 +353,7 @@ function E(e, t, i, o, r, n) {
353
353
  }, 8, ["class", "disabled", "loading", "style", "onClick", "btnCode"])
354
354
  ]);
355
355
  }
356
- const _ = /* @__PURE__ */ T(M, [["render", E], ["__scopeId", "data-v-920b1c09"]]);
356
+ const _ = /* @__PURE__ */ T(M, [["render", E], ["__scopeId", "data-v-06acef51"]]);
357
357
  function p(e, t = {}) {
358
358
  p.installed || (p.installed = !0, e.component("common-button", _));
359
359
  }
@@ -1 +1 @@
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 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 d=s.length;d>0;d-=4)n=parseInt(s.substring(d-4,d),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`${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=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"),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(()=>[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",W],["__scopeId","data-v-920b1c09"]]);function c(e,o={}){c.installed||(c.installed=!0,e.component("common-button",f))}return f.install=c,f});
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`${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=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-06acef51"]]);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.3",
3
+ "version": "1.2.5",
4
4
  "description": "",
5
5
  "main": "common-button.es.js",
6
6
  "scripts": {
package/style.css CHANGED
@@ -1 +1 @@
1
- .s-button[data-v-920b1c09]{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-920b1c09] :hover{background-color:#641438}.s-button+.s-button[data-v-920b1c09]{margin-left:15px}.s-button span[data-v-920b1c09]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-920b1c09]{vertical-align:middle}.plain[data-v-920b1c09]{background:#fff}.plain-icon[data-v-920b1c09]{margin-right:4px}.loading[data-v-920b1c09]{opacity:.8}.s-icon[data-v-920b1c09]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden}.s-icon img[data-v-920b1c09]{float:left}
1
+ .btnhover[data-v-06acef51]:hover{box-shadow:0 0 15px #2461cc4d;opacity:.95;background-color:#641438}.s-button[data-v-06acef51]{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-06acef51]{margin-left:15px}.s-button span[data-v-06acef51]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-06acef51]{vertical-align:middle}.plain[data-v-06acef51]{background:#fff}.plain-icon[data-v-06acef51]{margin-right:4px}.loading[data-v-06acef51]{opacity:.8}.s-icon[data-v-06acef51]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden}.s-icon img[data-v-06acef51]{float:left;width:25px;height:25px}