sinosoft-common-button 1.1.8 → 1.1.9

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 s, createElementBlock as h, createElementVNode as c, defineComponent as _, resolveComponent as d, createVNode as u, normalizeClass as m, normalizeStyle as a, withCtx as p, createCommentVNode as b, renderSlot as S, createBlock as $ } from "vue";
1
+ import { openBlock as n, createElementBlock as h, createElementVNode as c, defineComponent as _, resolveComponent as d, createVNode as u, normalizeClass as m, normalizeStyle as a, withCtx as p, createCommentVNode as b, renderSlot as S, createBlock as $ } from "vue";
2
2
  /*! Element Plus Icons Vue v2.1.0 */
3
3
  var v = (e, o) => {
4
4
  let t = e.__vccOpts || e;
@@ -22,8 +22,8 @@ var v = (e, o) => {
22
22
  ), x = [
23
23
  z
24
24
  ];
25
- function F(e, o, t, r, i, n) {
26
- return s(), h("svg", w, x);
25
+ function F(e, o, t, r, i, s) {
26
+ return n(), h("svg", w, x);
27
27
  }
28
28
  var B = /* @__PURE__ */ v(k, [["render", F], ["__file", "loading.vue"]]);
29
29
  const W = _({
@@ -232,12 +232,12 @@ const W = _({
232
232
  return {
233
233
  handleClick: (r) => {
234
234
  const i = r;
235
- let { timeStamp: n } = i, l = `${e.btnCode}_${n}`;
235
+ let { timeStamp: s } = i, l = `${e.btnCode}_${s}`;
236
236
  console.log(
237
237
  "按钮组件点击事件获取到事件对象及事件唯一标识符",
238
238
  r,
239
239
  l
240
- ), o.emit("handleClick", l);
240
+ ), e.btnCode ? o.emit("handleClick", l) : o.emit("handleClick", "");
241
241
  }
242
242
  };
243
243
  }
@@ -251,9 +251,9 @@ const A = (e, o) => {
251
251
  key: 0,
252
252
  class: "s-icon"
253
253
  }, O = ["src"];
254
- function R(e, o, t, r, i, n) {
254
+ function R(e, o, t, r, i, s) {
255
255
  const l = d("Loading"), y = d("el-icon"), C = d("el-button");
256
- return s(), h("div", null, [
256
+ return n(), h("div", null, [
257
257
  u(C, {
258
258
  class: m(["s-button", { plain: e.plain, btnhover: !e.plain, loading: e.loading }]),
259
259
  disabled: e.disabled,
@@ -263,7 +263,7 @@ function R(e, o, t, r, i, n) {
263
263
  btnCode: e.btnCode
264
264
  }, {
265
265
  default: p(() => [
266
- e.icon ? (s(), h("i", L, [
266
+ e.icon ? (n(), h("i", L, [
267
267
  c("img", {
268
268
  src: e.geturl,
269
269
  alt: "",
@@ -275,7 +275,7 @@ function R(e, o, t, r, i, n) {
275
275
  }, [
276
276
  S(e.$slots, "default", {}, void 0, !0)
277
277
  ], 4),
278
- e.loading ? (s(), $(y, {
278
+ e.loading ? (n(), $(y, {
279
279
  key: 1,
280
280
  class: "is-loading",
281
281
  color: e.loadingColor
@@ -290,7 +290,7 @@ function R(e, o, t, r, i, n) {
290
290
  }, 8, ["class", "disabled", "loading", "style", "onClick", "btnCode"])
291
291
  ]);
292
292
  }
293
- const g = /* @__PURE__ */ A(W, [["render", R], ["__scopeId", "data-v-77253219"]]);
293
+ const g = /* @__PURE__ */ A(W, [["render", R], ["__scopeId", "data-v-19eaf23c"]]);
294
294
  function f(e, o = {}) {
295
295
  f.installed || (f.installed = !0, e.component("common-button", g));
296
296
  }
@@ -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=(o,t)=>{let r=o.__vccOpts||o;for(let[i,l]of t)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(o,t,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},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`@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(o,t){return{handleClick:i=>{const l=i;let{timeStamp:h}=l,d=`${o.btnCode}_${h}`;console.log("按钮组件点击事件获取到事件对象及事件唯一标识符",i,d),t.emit("handleClick",d)}}}}),w="",C=(o,t)=>{const r=o.__vccOpts||o;for(const[i,l]of t)r[i]=l;return r},m={key:0,class:"s-icon"},_=["src"];function S(o,t,r,i,l,h){const d=e.resolveComponent("Loading"),$=e.resolveComponent("el-icon"),k=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(k,{class:e.normalizeClass(["s-button",{plain:o.plain,btnhover:!o.plain,loading:o.loading}]),disabled:o.disabled,loading:o.loading,style:e.normalizeStyle(o.styleOjb),onClick:o.handleClick,btnCode:o.btnCode},{default:e.withCtx(()=>[o.icon?(e.openBlock(),e.createElementBlock("i",m,[e.createElementVNode("img",{src:o.geturl,alt:"",style:e.normalizeStyle(o.styleObject)},null,12,_)])):e.createCommentVNode("",!0),e.createElementVNode("span",{style:e.normalizeStyle({color:o.color})},[e.renderSlot(o.$slots,"default",{},void 0,!0)],4),o.loading?(e.openBlock(),e.createBlock($,{key:1,class:"is-loading",color:o.loadingColor},{default:e.withCtx(()=>[e.createVNode(d)]),_:1},8,["color"])):e.createCommentVNode("",!0)]),_:3},8,["class","disabled","loading","style","onClick","btnCode"])])}const s=C(y,[["render",S],["__scopeId","data-v-77253219"]]);function a(o,t={}){a.installed||(a.installed=!0,o.component("common-button",s))}return s.install=a,s});
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=(o,t)=>{let r=o.__vccOpts||o;for(let[i,l]of t)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),b=[p];function u(o,t,r,i,l,h){return e.openBlock(),e.createElementBlock("svg",f,b)}var g=n(c,[["render",u],["__file","loading.vue"]]);const y=e.defineComponent({components:{Loading:g},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`@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(o,t){return{handleClick:i=>{const l=i;let{timeStamp:h}=l,d=`${o.btnCode}_${h}`;console.log("按钮组件点击事件获取到事件对象及事件唯一标识符",i,d),o.btnCode?t.emit("handleClick",d):t.emit("handleClick","")}}}}),w="",C=(o,t)=>{const r=o.__vccOpts||o;for(const[i,l]of t)r[i]=l;return r},m={key:0,class:"s-icon"},_=["src"];function S(o,t,r,i,l,h){const d=e.resolveComponent("Loading"),$=e.resolveComponent("el-icon"),k=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(k,{class:e.normalizeClass(["s-button",{plain:o.plain,btnhover:!o.plain,loading:o.loading}]),disabled:o.disabled,loading:o.loading,style:e.normalizeStyle(o.styleOjb),onClick:o.handleClick,btnCode:o.btnCode},{default:e.withCtx(()=>[o.icon?(e.openBlock(),e.createElementBlock("i",m,[e.createElementVNode("img",{src:o.geturl,alt:"",style:e.normalizeStyle(o.styleObject)},null,12,_)])):e.createCommentVNode("",!0),e.createElementVNode("span",{style:e.normalizeStyle({color:o.color})},[e.renderSlot(o.$slots,"default",{},void 0,!0)],4),o.loading?(e.openBlock(),e.createBlock($,{key:1,class:"is-loading",color:o.loadingColor},{default:e.withCtx(()=>[e.createVNode(d)]),_:1},8,["color"])):e.createCommentVNode("",!0)]),_:3},8,["class","disabled","loading","style","onClick","btnCode"])])}const s=C(y,[["render",S],["__scopeId","data-v-19eaf23c"]]);function a(o,t={}){a.installed||(a.installed=!0,o.component("common-button",s))}return s.install=a,s});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinosoft-common-button",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "",
5
5
  "main": "common-button.es.js",
6
6
  "scripts": {
package/style.css CHANGED
@@ -1 +1 @@
1
- .btnhover[data-v-77253219]:hover{box-shadow:0 0 15px #2461cc4d;opacity:.95}.s-button[data-v-77253219]{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-77253219]{margin-left:15px}.s-button span[data-v-77253219]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-77253219]{vertical-align:middle}.plain[data-v-77253219]{background:#fff}.plain-icon[data-v-77253219]{margin-right:4px}.loading[data-v-77253219]{opacity:.8}.s-icon[data-v-77253219]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden}.s-icon img[data-v-77253219]{float:left}
1
+ .btnhover[data-v-19eaf23c]:hover{box-shadow:0 0 15px #2461cc4d;opacity:.95}.s-button[data-v-19eaf23c]{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-19eaf23c]{margin-left:15px}.s-button span[data-v-19eaf23c]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-19eaf23c]{vertical-align:middle}.plain[data-v-19eaf23c]{background:#fff}.plain-icon[data-v-19eaf23c]{margin-right:4px}.loading[data-v-19eaf23c]{opacity:.8}.s-icon[data-v-19eaf23c]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden}.s-icon img[data-v-19eaf23c]{float:left}