sinosoft-common-button 1.1.5 → 1.1.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.
@@ -73,7 +73,7 @@ const E = _({
73
73
  type: Boolean,
74
74
  default: !1
75
75
  },
76
- code: {
76
+ btnCode: {
77
77
  type: String,
78
78
  default: ""
79
79
  },
@@ -243,7 +243,7 @@ const E = _({
243
243
  return {
244
244
  handleClick: (r) => {
245
245
  const i = r;
246
- let { timeStamp: s } = i, l = `${e.code}_${s}`;
246
+ let { timeStamp: s } = i, l = `${e.btnCode}_${s}`;
247
247
  console.log("按钮组件点击事件获取到事件对象及事件唯一标识符", r, l), t.emit("handleClick", l);
248
248
  }
249
249
  };
@@ -265,7 +265,7 @@ function L(e, t, o, r, i, s) {
265
265
  disabled: e.disabled,
266
266
  style: a(e.styleOjb),
267
267
  onClick: e.handleClick,
268
- btnCode: e.code
268
+ btnCode: e.btnCode
269
269
  }, {
270
270
  default: p(() => [
271
271
  e.icon ? (n(), b("i", W, [
@@ -294,7 +294,7 @@ function L(e, t, o, r, i, s) {
294
294
  _: 3
295
295
  }, 8, ["class", "disabled", "style", "onClick", "btnCode"]);
296
296
  }
297
- const g = /* @__PURE__ */ B(E, [["render", L], ["__scopeId", "data-v-4a9732c6"]]);
297
+ const g = /* @__PURE__ */ B(E, [["render", L], ["__scopeId", "data-v-9b9cfffd"]]);
298
298
  function c(e, t = {}) {
299
299
  c.installed || (c.installed = !0, e.component("common-button", g));
300
300
  }
@@ -1 +1 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("vue")):typeof define=="function"&&define.amd?define(["vue"],n):(e=typeof globalThis<"u"?globalThis:e||self,e.button=n(e.Vue))})(this,function(e){"use strict";/*! Element Plus Icons Vue v2.1.0 */var n=(t,o)=>{let r=t.__vccOpts||t;for(let[i,l]of o)r[i]=l;return r},c={name:"Loading"},f={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},p=e.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-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),u=[p];function b(t,o,r,i,l,h){return e.openBlock(),e.createElementBlock("svg",f,u)}var g=n(c,[["render",b],["__file","loading.vue"]]);const y=e.defineComponent({components:{Loading:g},props:{disabled:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},plainOrdinary:{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},code:{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:""},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.color||"#216FED"}`,color:this.color||"#216FED",width:this.width,height:this.height,borderRadius:this.circle}:this.primary?{background:"#216FED",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#4E6DFD"}`,color:this.color||"#ffffff",width:this.width,height:this.height,borderRadius:this.circle}:this.primaryOrdinary?{background:"#216FED",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#4E6DFD"}`,color:this.color||"#ffffff",width:"190px",height:"52px",borderRadius:this.circle,fontSize:"16px",fontWeight:600}:this.primaryDialog?{width:"176px",height:"46px",background:"#216FED",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#4E6DFD"}`,color:this.color||"#ffffff",borderRadius:"8px",fontSize:"16px",fontWeight:600}:this.default?{background:"#ffffff",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#DDE2E6"}`,color:this.color||"#2C3C4D",width:this.width,height:this.height,borderRadius:this.circle}:this.info?{background:"#C4C4C4",borderWidth:"1px",borderStyle:`${this.borderStyle}`,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.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.color||"#C4C4C4"}`,color:this.color||"#FFFFFF",borderRadius:"8px",fontSize:"16px",fontWeight:600}:this.plainOrdinary?{background:"#fff",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#216FED"}`,color:this.color||"#216FED",width:"190px",height:"52px",borderRadius:this.circle,fontSize:"16px",fontWeight:600}:{color:this.color||"#ffffff",background:this.bgColor||"#216FED",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#216FED"}`,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`@icons/svg/${this.icon}`}else return"";return`@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(t,o){return{handleClick:i=>{const l=i;let{timeStamp:h}=l,s=`${t.code}_${h}`;console.log("按钮组件点击事件获取到事件对象及事件唯一标识符",i,s),o.emit("handleClick",s)}}}}),k="",C=(t,o)=>{const r=t.__vccOpts||t;for(const[i,l]of o)r[i]=l;return r},m={key:0,class:"s-icon"},_=["src"];function S(t,o,r,i,l,h){const s=e.resolveComponent("Loading"),$=e.resolveComponent("el-icon"),F=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(F,{class:e.normalizeClass(["s-button",{plain:t.plain,btnhover:!t.plain,loading:t.loading}]),disabled:t.disabled,style:e.normalizeStyle(t.styleOjb),onClick:t.handleClick,btnCode:t.code},{default:e.withCtx(()=>[t.icon?(e.openBlock(),e.createElementBlock("i",m,[e.createElementVNode("img",{src:t.geturl,alt:"",style:e.normalizeStyle(t.styleObject)},null,12,_)])):e.createCommentVNode("",!0),e.createElementVNode("span",{style:e.normalizeStyle({color:t.color})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4),t.loading?(e.openBlock(),e.createBlock($,{key:1,class:"is-loading",color:t.loadingColor},{default:e.withCtx(()=>[e.createVNode(s)]),_:1},8,["color"])):e.createCommentVNode("",!0)]),_:3},8,["class","disabled","style","onClick","btnCode"])}const d=C(y,[["render",S],["__scopeId","data-v-4a9732c6"]]);function a(t,o={}){a.installed||(a.installed=!0,t.component("common-button",d))}return d.install=a,d});
1
+ (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("vue")):typeof define=="function"&&define.amd?define(["vue"],n):(e=typeof globalThis<"u"?globalThis:e||self,e.button=n(e.Vue))})(this,function(e){"use strict";/*! Element Plus Icons Vue v2.1.0 */var n=(t,o)=>{let r=t.__vccOpts||t;for(let[i,l]of o)r[i]=l;return r},c={name:"Loading"},f={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},p=e.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-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),u=[p];function b(t,o,r,i,l,h){return e.openBlock(),e.createElementBlock("svg",f,u)}var g=n(c,[["render",b],["__file","loading.vue"]]);const y=e.defineComponent({components:{Loading:g},props:{disabled:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},plainOrdinary:{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:""},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.color||"#216FED"}`,color:this.color||"#216FED",width:this.width,height:this.height,borderRadius:this.circle}:this.primary?{background:"#216FED",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#4E6DFD"}`,color:this.color||"#ffffff",width:this.width,height:this.height,borderRadius:this.circle}:this.primaryOrdinary?{background:"#216FED",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#4E6DFD"}`,color:this.color||"#ffffff",width:"190px",height:"52px",borderRadius:this.circle,fontSize:"16px",fontWeight:600}:this.primaryDialog?{width:"176px",height:"46px",background:"#216FED",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#4E6DFD"}`,color:this.color||"#ffffff",borderRadius:"8px",fontSize:"16px",fontWeight:600}:this.default?{background:"#ffffff",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#DDE2E6"}`,color:this.color||"#2C3C4D",width:this.width,height:this.height,borderRadius:this.circle}:this.info?{background:"#C4C4C4",borderWidth:"1px",borderStyle:`${this.borderStyle}`,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.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.color||"#C4C4C4"}`,color:this.color||"#FFFFFF",borderRadius:"8px",fontSize:"16px",fontWeight:600}:this.plainOrdinary?{background:"#fff",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#216FED"}`,color:this.color||"#216FED",width:"190px",height:"52px",borderRadius:this.circle,fontSize:"16px",fontWeight:600}:{color:this.color||"#ffffff",background:this.bgColor||"#216FED",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#216FED"}`,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`@icons/svg/${this.icon}`}else return"";return`@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(t,o){return{handleClick:i=>{const l=i;let{timeStamp:h}=l,s=`${t.btnCode}_${h}`;console.log("按钮组件点击事件获取到事件对象及事件唯一标识符",i,s),o.emit("handleClick",s)}}}}),k="",C=(t,o)=>{const r=t.__vccOpts||t;for(const[i,l]of o)r[i]=l;return r},m={key:0,class:"s-icon"},_=["src"];function S(t,o,r,i,l,h){const s=e.resolveComponent("Loading"),$=e.resolveComponent("el-icon"),F=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(F,{class:e.normalizeClass(["s-button",{plain:t.plain,btnhover:!t.plain,loading:t.loading}]),disabled:t.disabled,style:e.normalizeStyle(t.styleOjb),onClick:t.handleClick,btnCode:t.btnCode},{default:e.withCtx(()=>[t.icon?(e.openBlock(),e.createElementBlock("i",m,[e.createElementVNode("img",{src:t.geturl,alt:"",style:e.normalizeStyle(t.styleObject)},null,12,_)])):e.createCommentVNode("",!0),e.createElementVNode("span",{style:e.normalizeStyle({color:t.color})},[e.renderSlot(t.$slots,"default",{},void 0,!0)],4),t.loading?(e.openBlock(),e.createBlock($,{key:1,class:"is-loading",color:t.loadingColor},{default:e.withCtx(()=>[e.createVNode(s)]),_:1},8,["color"])):e.createCommentVNode("",!0)]),_:3},8,["class","disabled","style","onClick","btnCode"])}const d=C(y,[["render",S],["__scopeId","data-v-9b9cfffd"]]);function a(t,o={}){a.installed||(a.installed=!0,t.component("common-button",d))}return d.install=a,d});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinosoft-common-button",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "",
5
5
  "main": "common-button.es.js",
6
6
  "scripts": {
package/style.css CHANGED
@@ -1 +1 @@
1
- .btnhover[data-v-4a9732c6]:hover{box-shadow:0 0 15px #2461cc4d;opacity:.95}.s-button[data-v-4a9732c6]{display:block;height:36px;line-height:1;border:none;background:linear-gradient(350deg,#4A60FF 0%,#64B0F3 100%,#64B0F3 100%);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-4a9732c6]{margin-left:15px}.s-button span[data-v-4a9732c6]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-4a9732c6]{vertical-align:middle}.plain[data-v-4a9732c6]{background:#fff}.plain-icon[data-v-4a9732c6]{margin-right:4px}.loading[data-v-4a9732c6]{opacity:.8}.s-icon[data-v-4a9732c6]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden}.s-icon img[data-v-4a9732c6]{float:left}
1
+ .btnhover[data-v-9b9cfffd]:hover{box-shadow:0 0 15px #2461cc4d;opacity:.95}.s-button[data-v-9b9cfffd]{display:block;height:36px;line-height:1;border:none;background:linear-gradient(350deg,#4A60FF 0%,#64B0F3 100%,#64B0F3 100%);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-9b9cfffd]{margin-left:15px}.s-button span[data-v-9b9cfffd]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-9b9cfffd]{vertical-align:middle}.plain[data-v-9b9cfffd]{background:#fff}.plain-icon[data-v-9b9cfffd]{margin-right:4px}.loading[data-v-9b9cfffd]{opacity:.8}.s-icon[data-v-9b9cfffd]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden}.s-icon img[data-v-9b9cfffd]{float:left}