sinosoft-common-button 1.0.7 → 1.0.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,16 +1,16 @@
1
- import { openBlock as l, createElementBlock as d, createElementVNode as a, defineComponent as _, resolveComponent as n, createVNode as c, normalizeClass as m, normalizeStyle as s, withCtx as f, createCommentVNode as u, renderSlot as S, createBlock as $ } from "vue";
1
+ import { openBlock as l, createElementBlock as d, createElementVNode as a, defineComponent as _, getCurrentInstance as m, resolveComponent as n, createVNode as c, normalizeClass as S, normalizeStyle as s, withCtx as f, createCommentVNode as u, renderSlot as $, createBlock as F } from "vue";
2
2
  /*! Element Plus Icons Vue v2.1.0 */
3
- var F = (e, t) => {
4
- let o = e.__vccOpts || e;
5
- for (let [r, i] of t)
6
- o[r] = i;
7
- return o;
8
- }, v = {
3
+ var v = (e, o) => {
4
+ let t = e.__vccOpts || e;
5
+ for (let [i, r] of o)
6
+ t[i] = r;
7
+ return t;
8
+ }, k = {
9
9
  name: "Loading"
10
10
  }, w = {
11
11
  xmlns: "http://www.w3.org/2000/svg",
12
12
  viewBox: "0 0 1024 1024"
13
- }, z = /* @__PURE__ */ a(
13
+ }, x = /* @__PURE__ */ a(
14
14
  "path",
15
15
  {
16
16
  fill: "currentColor",
@@ -19,17 +19,16 @@ var F = (e, t) => {
19
19
  null,
20
20
  -1
21
21
  /* HOISTED */
22
- ), x = [
23
- z
22
+ ), z = [
23
+ x
24
24
  ];
25
- function D(e, t, o, r, i, g) {
26
- return l(), d("svg", w, x);
25
+ function D(e, o, t, i, r, g) {
26
+ return l(), d("svg", w, z);
27
27
  }
28
- var k = /* @__PURE__ */ F(v, [["render", D], ["__file", "loading.vue"]]);
28
+ var B = /* @__PURE__ */ v(k, [["render", D], ["__file", "loading.vue"]]);
29
29
  const E = _({
30
30
  components: {
31
- // sIcon,
32
- Loading: k
31
+ Loading: B
33
32
  },
34
33
  props: {
35
34
  plain: {
@@ -219,41 +218,50 @@ const E = _({
219
218
  height: typeof this.size == "string" ? this.size : this.size + "px"
220
219
  };
221
220
  }
221
+ },
222
+ emits: ["handleClick"],
223
+ setup(e, o) {
224
+ const { proxy: t } = m();
225
+ return {
226
+ handleClick: (r) => {
227
+ console.log("界面获取到事件对象", r), console.log("按钮界面获取到埋点数据了", t.$BuryPointFunc.getBuryPointData()), o.emit("handleClick", r);
228
+ }
229
+ };
222
230
  }
223
231
  });
224
- const B = (e, t) => {
225
- const o = e.__vccOpts || e;
226
- for (const [r, i] of t)
227
- o[r] = i;
228
- return o;
229
- }, W = {
232
+ const W = (e, o) => {
233
+ const t = e.__vccOpts || e;
234
+ for (const [i, r] of o)
235
+ t[i] = r;
236
+ return t;
237
+ }, L = {
230
238
  key: 0,
231
239
  class: "s-icon"
232
- }, L = ["src"];
233
- function O(e, t, o, r, i, g) {
240
+ }, O = ["src"];
241
+ function R(e, o, t, i, r, g) {
234
242
  const b = n("Loading"), y = n("el-icon"), C = n("el-button");
235
243
  return l(), d("div", null, [
236
244
  c(C, {
237
- class: m(["s-button", { plain: e.plain, btnhover: !e.plain, loading: e.loading }]),
245
+ class: S(["s-button", { plain: e.plain, btnhover: !e.plain, loading: e.loading }]),
238
246
  disabled: e.loading,
239
247
  style: s(e.styleOjb),
240
- onClick: t[0] || (t[0] = (R) => e.$emit("handleClick")),
248
+ onClick: e.handleClick,
241
249
  btnCode: e.btnCode
242
250
  }, {
243
251
  default: f(() => [
244
- e.icon ? (l(), d("i", W, [
252
+ e.icon ? (l(), d("i", L, [
245
253
  a("img", {
246
254
  src: e.geturl,
247
255
  alt: "",
248
256
  style: s(e.styleObject)
249
- }, null, 12, L)
257
+ }, null, 12, O)
250
258
  ])) : u("", !0),
251
259
  a("span", {
252
260
  style: s({ color: e.color })
253
261
  }, [
254
- S(e.$slots, "default", {}, void 0, !0)
262
+ $(e.$slots, "default", {}, void 0, !0)
255
263
  ], 4),
256
- e.loading ? (l(), $(y, {
264
+ e.loading ? (l(), F(y, {
257
265
  key: 1,
258
266
  class: "is-loading",
259
267
  color: e.loadingColor
@@ -265,11 +273,11 @@ function O(e, t, o, r, i, g) {
265
273
  }, 8, ["color"])) : u("", !0)
266
274
  ]),
267
275
  _: 3
268
- }, 8, ["class", "disabled", "style", "btnCode"])
276
+ }, 8, ["class", "disabled", "style", "onClick", "btnCode"])
269
277
  ]);
270
278
  }
271
- const p = /* @__PURE__ */ B(E, [["render", O], ["__scopeId", "data-v-d8e77edc"]]);
272
- function h(e, t = {}) {
279
+ const p = /* @__PURE__ */ W(E, [["render", R], ["__scopeId", "data-v-07eb7eba"]]);
280
+ function h(e, o = {}) {
273
281
  h.installed || (h.installed = !0, e.component("common-button", p));
274
282
  }
275
283
  p.install = h;
@@ -1 +1 @@
1
- (function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("vue")):typeof define=="function"&&define.amd?define(["vue"],i):(e=typeof globalThis<"u"?globalThis:e||self,e.button=i(e.Vue))})(this,function(e){"use strict";/*! Element Plus Icons Vue v2.1.0 */var i=(t,o)=>{let r=t.__vccOpts||t;for(let[l,n]of o)r[l]=n;return r},a={name:"Loading"},h={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},c=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),f=[c];function p(t,o,r,l,n,_){return e.openBlock(),e.createElementBlock("svg",h,f)}var u=i(a,[["render",p],["__file","loading.vue"]]);const b=e.defineComponent({components:{Loading:u},props:{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:""},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}:{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"}}}}),k="",g=(t,o)=>{const r=t.__vccOpts||t;for(const[l,n]of o)r[l]=n;return r},y={key:0,class:"s-icon"},C=["src"];function m(t,o,r,l,n,_){const S=e.resolveComponent("Loading"),$=e.resolveComponent("el-icon"),F=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(F,{class:e.normalizeClass(["s-button",{plain:t.plain,btnhover:!t.plain,loading:t.loading}]),disabled:t.loading,style:e.normalizeStyle(t.styleOjb),onClick:o[0]||(o[0]=w=>t.$emit("handleClick")),btnCode:t.btnCode},{default:e.withCtx(()=>[t.icon?(e.openBlock(),e.createElementBlock("i",y,[e.createElementVNode("img",{src:t.geturl,alt:"",style:e.normalizeStyle(t.styleObject)},null,12,C)])):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","btnCode"])])}const s=g(b,[["render",m],["__scopeId","data-v-d8e77edc"]]);function d(t,o={}){d.installed||(d.installed=!0,t.component("common-button",s))}return s.install=d,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=(t,r)=>{let o=t.__vccOpts||t;for(let[l,i]of r)o[l]=i;return o},a={name:"Loading"},h={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},c=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),f=[c];function p(t,r,o,l,i,_){return e.openBlock(),e.createElementBlock("svg",h,f)}var u=n(a,[["render",p],["__file","loading.vue"]]);const b=e.defineComponent({components:{Loading:u},props:{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:""},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}:{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,r){const{proxy:o}=e.getCurrentInstance();return{handleClick:i=>{console.log("界面获取到事件对象",i),console.log("按钮界面获取到埋点数据了",o.$BuryPointFunc.getBuryPointData()),r.emit("handleClick",i)}}}}),k="",g=(t,r)=>{const o=t.__vccOpts||t;for(const[l,i]of r)o[l]=i;return o},y={key:0,class:"s-icon"},C=["src"];function m(t,r,o,l,i,_){const S=e.resolveComponent("Loading"),$=e.resolveComponent("el-icon"),F=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(F,{class:e.normalizeClass(["s-button",{plain:t.plain,btnhover:!t.plain,loading:t.loading}]),disabled:t.loading,style:e.normalizeStyle(t.styleOjb),onClick:t.handleClick,btnCode:t.btnCode},{default:e.withCtx(()=>[t.icon?(e.openBlock(),e.createElementBlock("i",y,[e.createElementVNode("img",{src:t.geturl,alt:"",style:e.normalizeStyle(t.styleObject)},null,12,C)])):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 s=g(b,[["render",m],["__scopeId","data-v-07eb7eba"]]);function d(t,r={}){d.installed||(d.installed=!0,t.component("common-button",s))}return s.install=d,s});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinosoft-common-button",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "",
5
5
  "main": "common-button.es.js",
6
6
  "scripts": {
package/style.css CHANGED
@@ -1 +1 @@
1
- .btnhover[data-v-d8e77edc]:hover{box-shadow:0 0 15px #2461cc4d;opacity:.95}.s-button[data-v-d8e77edc]{display:inline-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-d8e77edc]{margin-left:15px}.s-button span[data-v-d8e77edc]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-d8e77edc]{vertical-align:middle}.plain[data-v-d8e77edc]{background:#fff}.plain-icon[data-v-d8e77edc]{margin-right:4px}.loading[data-v-d8e77edc]{opacity:.8}.s-icon[data-v-d8e77edc]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden}.s-icon img[data-v-d8e77edc]{float:left}
1
+ .btnhover[data-v-07eb7eba]:hover{box-shadow:0 0 15px #2461cc4d;opacity:.95}.s-button[data-v-07eb7eba]{display:inline-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-07eb7eba]{margin-left:15px}.s-button span[data-v-07eb7eba]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-07eb7eba]{vertical-align:middle}.plain[data-v-07eb7eba]{background:#fff}.plain-icon[data-v-07eb7eba]{margin-right:4px}.loading[data-v-07eb7eba]{opacity:.8}.s-icon[data-v-07eb7eba]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden}.s-icon img[data-v-07eb7eba]{float:left}