sinosoft-common-button 1.1.5 → 1.1.7

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 n, createElementBlock as b, createElementVNode as h, defineComponent as _, resolveComponent as d, createBlock as f, normalizeClass as m, normalizeStyle as a, withCtx as p, createCommentVNode as u, renderSlot as S, createVNode as $ } from "vue";
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";
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
- }, k = {
9
- name: "Loading"
3
+ var F = (e, o) => {
4
+ let t = e.__vccOpts || e;
5
+ for (let [r, i] of o)
6
+ t[r] = i;
7
+ return t;
10
8
  }, v = {
9
+ name: "Loading"
10
+ }, k = {
11
11
  xmlns: "http://www.w3.org/2000/svg",
12
12
  viewBox: "0 0 1024 1024"
13
- }, w = /* @__PURE__ */ h(
13
+ }, w = /* @__PURE__ */ c(
14
14
  "path",
15
15
  {
16
16
  fill: "currentColor",
@@ -19,16 +19,16 @@ var F = (e, t) => {
19
19
  null,
20
20
  -1
21
21
  /* HOISTED */
22
- ), x = [
22
+ ), z = [
23
23
  w
24
24
  ];
25
- function z(e, t, o, r, i, s) {
26
- return n(), b("svg", v, x);
25
+ function D(e, o, t, r, i, n) {
26
+ return s(), h("svg", k, z);
27
27
  }
28
- var D = /* @__PURE__ */ F(k, [["render", z], ["__file", "loading.vue"]]);
28
+ var x = /* @__PURE__ */ F(v, [["render", D], ["__file", "loading.vue"]]);
29
29
  const E = _({
30
30
  components: {
31
- Loading: D
31
+ Loading: x
32
32
  },
33
33
  props: {
34
34
  disabled: {
@@ -39,10 +39,6 @@ const E = _({
39
39
  type: Boolean,
40
40
  default: !1
41
41
  },
42
- plainOrdinary: {
43
- type: Boolean,
44
- default: !1
45
- },
46
42
  primary: {
47
43
  type: Boolean,
48
44
  default: !1
@@ -73,7 +69,7 @@ const E = _({
73
69
  type: Boolean,
74
70
  default: !1
75
71
  },
76
- code: {
72
+ btnCode: {
77
73
  type: String,
78
74
  default: ""
79
75
  },
@@ -101,6 +97,10 @@ const E = _({
101
97
  type: String,
102
98
  default: ""
103
99
  },
100
+ borderColor: {
101
+ type: String,
102
+ default: ""
103
+ },
104
104
  loading: {
105
105
  type: Boolean,
106
106
  default: !1
@@ -124,7 +124,7 @@ const E = _({
124
124
  background: "#fff",
125
125
  borderWidth: "1px",
126
126
  borderStyle: `${this.borderStyle}`,
127
- borderColor: `${this.color || "#216FED"}`,
127
+ borderColor: `${this.borderColor || this.color || "#216FED"}`,
128
128
  color: this.color || "#216FED",
129
129
  width: this.width,
130
130
  height: this.height,
@@ -133,7 +133,7 @@ const E = _({
133
133
  background: "#216FED",
134
134
  borderWidth: "1px",
135
135
  borderStyle: `${this.borderStyle}`,
136
- borderColor: `${this.color || "#4E6DFD"}`,
136
+ borderColor: `${this.borderColor || this.color || "#4E6DFD"}`,
137
137
  color: this.color || "#ffffff",
138
138
  width: this.width,
139
139
  height: this.height,
@@ -142,7 +142,7 @@ const E = _({
142
142
  background: "#216FED",
143
143
  borderWidth: "1px",
144
144
  borderStyle: `${this.borderStyle}`,
145
- borderColor: `${this.color || "#4E6DFD"}`,
145
+ borderColor: `${this.borderColor || this.color || "#4E6DFD"}`,
146
146
  color: this.color || "#ffffff",
147
147
  width: "190px",
148
148
  height: "52px",
@@ -155,7 +155,7 @@ const E = _({
155
155
  background: "#216FED",
156
156
  borderWidth: "1px",
157
157
  borderStyle: `${this.borderStyle}`,
158
- borderColor: `${this.color || "#4E6DFD"}`,
158
+ borderColor: `${this.borderColor || this.color || "#4E6DFD"}`,
159
159
  color: this.color || "#ffffff",
160
160
  borderRadius: "8px",
161
161
  fontSize: "16px",
@@ -164,7 +164,7 @@ const E = _({
164
164
  background: "#ffffff",
165
165
  borderWidth: "1px",
166
166
  borderStyle: `${this.borderStyle}`,
167
- borderColor: `${this.color || "#DDE2E6"}`,
167
+ borderColor: `${this.borderColor || this.color || "#DDE2E6"}`,
168
168
  color: this.color || "#2C3C4D",
169
169
  width: this.width,
170
170
  height: this.height,
@@ -173,7 +173,7 @@ const E = _({
173
173
  background: "#C4C4C4",
174
174
  borderWidth: "1px",
175
175
  borderStyle: `${this.borderStyle}`,
176
- borderColor: `${this.color || "#C4C4C4"}`,
176
+ borderColor: `${this.borderColor || this.color || "#C4C4C4"}`,
177
177
  color: this.color || "#FFFFFF",
178
178
  width: this.width,
179
179
  height: this.height,
@@ -184,7 +184,7 @@ const E = _({
184
184
  background: "#C4C4C4",
185
185
  borderWidth: "1px",
186
186
  borderStyle: `${this.borderStyle}`,
187
- borderColor: `${this.color || "#C4C4C4"}`,
187
+ borderColor: `${this.borderColor || this.color || "#C4C4C4"}`,
188
188
  color: this.color || "#FFFFFF",
189
189
  borderRadius: "8px",
190
190
  fontSize: "16px",
@@ -195,27 +195,16 @@ const E = _({
195
195
  background: "#C4C4C4",
196
196
  borderWidth: "1px",
197
197
  borderStyle: `${this.borderStyle}`,
198
- borderColor: `${this.color || "#C4C4C4"}`,
198
+ borderColor: `${this.borderColor || this.color || "#C4C4C4"}`,
199
199
  color: this.color || "#FFFFFF",
200
200
  borderRadius: "8px",
201
201
  fontSize: "16px",
202
202
  fontWeight: 600
203
- } : this.plainOrdinary ? {
204
- background: "#fff",
205
- borderWidth: "1px",
206
- borderStyle: `${this.borderStyle}`,
207
- borderColor: `${this.color || "#216FED"}`,
208
- color: this.color || "#216FED",
209
- width: "190px",
210
- height: "52px",
211
- borderRadius: this.circle,
212
- fontSize: "16px",
213
- fontWeight: 600
214
203
  } : {
215
204
  color: this.color || "#ffffff",
216
205
  background: this.bgColor || "#216FED",
217
206
  borderStyle: `${this.borderStyle}`,
218
- borderColor: `${this.color || "#216FED"}`,
207
+ borderColor: `${this.borderColor || this.color || "#216FED"}`,
219
208
  width: this.width,
220
209
  height: this.height,
221
210
  borderRadius: this.circle
@@ -239,66 +228,73 @@ const E = _({
239
228
  }
240
229
  },
241
230
  emits: ["handleClick"],
242
- setup(e, t) {
231
+ setup(e, o) {
243
232
  return {
244
233
  handleClick: (r) => {
245
234
  const i = r;
246
- let { timeStamp: s } = i, l = `${e.code}_${s}`;
247
- console.log("按钮组件点击事件获取到事件对象及事件唯一标识符", r, l), t.emit("handleClick", l);
235
+ let { timeStamp: n } = i, l = `${e.btnCode}_${n}`;
236
+ console.log(
237
+ "按钮组件点击事件获取到事件对象及事件唯一标识符",
238
+ r,
239
+ l
240
+ ), o.emit("handleClick", l);
248
241
  }
249
242
  };
250
243
  }
251
244
  });
252
- const B = (e, t) => {
253
- const o = e.__vccOpts || e;
254
- for (const [r, i] of t)
255
- o[r] = i;
256
- return o;
245
+ const B = (e, o) => {
246
+ const t = e.__vccOpts || e;
247
+ for (const [r, i] of o)
248
+ t[r] = i;
249
+ return t;
257
250
  }, W = {
258
251
  key: 0,
259
252
  class: "s-icon"
260
- }, O = ["src"];
261
- function L(e, t, o, r, i, s) {
253
+ }, L = ["src"];
254
+ function O(e, o, t, r, i, n) {
262
255
  const l = d("Loading"), y = d("el-icon"), C = d("el-button");
263
- return n(), f(C, {
264
- class: m(["s-button", { plain: e.plain, btnhover: !e.plain, loading: e.loading }]),
265
- disabled: e.disabled,
266
- style: a(e.styleOjb),
267
- onClick: e.handleClick,
268
- btnCode: e.code
269
- }, {
270
- default: p(() => [
271
- e.icon ? (n(), b("i", W, [
272
- h("img", {
273
- src: e.geturl,
274
- alt: "",
275
- style: a(e.styleObject)
276
- }, null, 12, O)
277
- ])) : u("", !0),
278
- h("span", {
279
- style: a({ color: e.color })
280
- }, [
281
- S(e.$slots, "default", {}, void 0, !0)
282
- ], 4),
283
- e.loading ? (n(), f(y, {
284
- key: 1,
285
- class: "is-loading",
286
- color: e.loadingColor
287
- }, {
288
- default: p(() => [
289
- $(l)
290
- ]),
291
- _: 1
292
- }, 8, ["color"])) : u("", !0)
293
- ]),
294
- _: 3
295
- }, 8, ["class", "disabled", "style", "onClick", "btnCode"]);
256
+ return s(), h("div", null, [
257
+ u(C, {
258
+ class: m(["s-button", { plain: e.plain, btnhover: !e.plain, loading: e.loading }]),
259
+ disabled: e.disabled,
260
+ loading: e.loading,
261
+ style: a(e.styleOjb),
262
+ onClick: e.handleClick,
263
+ btnCode: e.btnCode
264
+ }, {
265
+ default: p(() => [
266
+ e.icon ? (s(), h("i", W, [
267
+ c("img", {
268
+ src: e.geturl,
269
+ alt: "",
270
+ style: a(e.styleObject)
271
+ }, null, 12, L)
272
+ ])) : b("", !0),
273
+ c("span", {
274
+ style: a({ color: e.color })
275
+ }, [
276
+ S(e.$slots, "default", {}, void 0, !0)
277
+ ], 4),
278
+ e.loading ? (s(), $(y, {
279
+ key: 1,
280
+ class: "is-loading",
281
+ color: e.loadingColor
282
+ }, {
283
+ default: p(() => [
284
+ u(l)
285
+ ]),
286
+ _: 1
287
+ }, 8, ["color"])) : b("", !0)
288
+ ]),
289
+ _: 3
290
+ }, 8, ["class", "disabled", "loading", "style", "onClick", "btnCode"])
291
+ ]);
296
292
  }
297
- const g = /* @__PURE__ */ B(E, [["render", L], ["__scopeId", "data-v-4a9732c6"]]);
298
- function c(e, t = {}) {
299
- c.installed || (c.installed = !0, e.component("common-button", g));
293
+ const g = /* @__PURE__ */ B(E, [["render", O], ["__scopeId", "data-v-133352e4"]]);
294
+ function f(e, o = {}) {
295
+ f.installed || (f.installed = !0, e.component("common-button", g));
300
296
  }
301
- g.install = c;
297
+ g.install = f;
302
298
  export {
303
299
  g as default
304
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=(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||"#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.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.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.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.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.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||"#216FED",borderStyle:`${this.borderStyle}`,borderColor:`${this.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(o,t){return{handleClick:i=>{const l=i;let{timeStamp:h}=l,d=`${o.btnCode}_${h}`;console.log("按钮组件点击事件获取到事件对象及事件唯一标识符",i,d),t.emit("handleClick",d)}}}}),F="",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-133352e4"]]);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.5",
3
+ "version": "1.1.7",
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-133352e4]:hover{box-shadow:0 0 15px #2461cc4d;opacity:.95}.s-button[data-v-133352e4]{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-133352e4]{margin-left:15px}.s-button span[data-v-133352e4]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1}.s-button>*[data-v-133352e4]{vertical-align:middle}.plain[data-v-133352e4]{background:#fff}.plain-icon[data-v-133352e4]{margin-right:4px}.loading[data-v-133352e4]{opacity:.8}.s-icon[data-v-133352e4]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden}.s-icon img[data-v-133352e4]{float:left}