sinosoft-common-button 1.1.7 → 1.1.8
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.
- package/common-button.es.js +29 -29
- package/common-button.umd.js +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
package/common-button.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
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
|
|
3
|
+
var v = (e, o) => {
|
|
4
4
|
let t = e.__vccOpts || e;
|
|
5
5
|
for (let [r, i] of o)
|
|
6
6
|
t[r] = i;
|
|
7
7
|
return t;
|
|
8
|
-
}, v = {
|
|
9
|
-
name: "Loading"
|
|
10
8
|
}, k = {
|
|
9
|
+
name: "Loading"
|
|
10
|
+
}, w = {
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12
12
|
viewBox: "0 0 1024 1024"
|
|
13
|
-
},
|
|
13
|
+
}, z = /* @__PURE__ */ c(
|
|
14
14
|
"path",
|
|
15
15
|
{
|
|
16
16
|
fill: "currentColor",
|
|
@@ -19,16 +19,16 @@ var F = (e, o) => {
|
|
|
19
19
|
null,
|
|
20
20
|
-1
|
|
21
21
|
/* HOISTED */
|
|
22
|
-
),
|
|
23
|
-
|
|
22
|
+
), x = [
|
|
23
|
+
z
|
|
24
24
|
];
|
|
25
|
-
function
|
|
26
|
-
return s(), h("svg",
|
|
25
|
+
function F(e, o, t, r, i, n) {
|
|
26
|
+
return s(), h("svg", w, x);
|
|
27
27
|
}
|
|
28
|
-
var
|
|
29
|
-
const
|
|
28
|
+
var B = /* @__PURE__ */ v(k, [["render", F], ["__file", "loading.vue"]]);
|
|
29
|
+
const W = _({
|
|
30
30
|
components: {
|
|
31
|
-
Loading:
|
|
31
|
+
Loading: B
|
|
32
32
|
},
|
|
33
33
|
props: {
|
|
34
34
|
disabled: {
|
|
@@ -124,25 +124,25 @@ const E = _({
|
|
|
124
124
|
background: "#fff",
|
|
125
125
|
borderWidth: "1px",
|
|
126
126
|
borderStyle: `${this.borderStyle}`,
|
|
127
|
-
borderColor: `${this.borderColor || this.color || "#
|
|
128
|
-
color: this.color || "#
|
|
127
|
+
borderColor: `${this.borderColor || this.color || "#99004A"}`,
|
|
128
|
+
color: this.color || "#99004A",
|
|
129
129
|
width: this.width,
|
|
130
130
|
height: this.height,
|
|
131
131
|
borderRadius: this.circle
|
|
132
132
|
} : this.primary ? {
|
|
133
|
-
background: "#
|
|
133
|
+
background: "#99004A",
|
|
134
134
|
borderWidth: "1px",
|
|
135
135
|
borderStyle: `${this.borderStyle}`,
|
|
136
|
-
borderColor: `${this.borderColor || this.color || "#
|
|
136
|
+
borderColor: `${this.borderColor || this.color || "#99004A"}`,
|
|
137
137
|
color: this.color || "#ffffff",
|
|
138
138
|
width: this.width,
|
|
139
139
|
height: this.height,
|
|
140
140
|
borderRadius: this.circle
|
|
141
141
|
} : this.primaryOrdinary ? {
|
|
142
|
-
background: "#
|
|
142
|
+
background: "#99004A",
|
|
143
143
|
borderWidth: "1px",
|
|
144
144
|
borderStyle: `${this.borderStyle}`,
|
|
145
|
-
borderColor: `${this.borderColor || this.color || "#
|
|
145
|
+
borderColor: `${this.borderColor || this.color || "#99004A"}`,
|
|
146
146
|
color: this.color || "#ffffff",
|
|
147
147
|
width: "190px",
|
|
148
148
|
height: "52px",
|
|
@@ -152,10 +152,10 @@ const E = _({
|
|
|
152
152
|
} : this.primaryDialog ? {
|
|
153
153
|
width: "176px",
|
|
154
154
|
height: "46px",
|
|
155
|
-
background: "#
|
|
155
|
+
background: "#99004A",
|
|
156
156
|
borderWidth: "1px",
|
|
157
157
|
borderStyle: `${this.borderStyle}`,
|
|
158
|
-
borderColor: `${this.borderColor || this.color || "#
|
|
158
|
+
borderColor: `${this.borderColor || this.color || "#99004A"}`,
|
|
159
159
|
color: this.color || "#ffffff",
|
|
160
160
|
borderRadius: "8px",
|
|
161
161
|
fontSize: "16px",
|
|
@@ -165,7 +165,7 @@ const E = _({
|
|
|
165
165
|
borderWidth: "1px",
|
|
166
166
|
borderStyle: `${this.borderStyle}`,
|
|
167
167
|
borderColor: `${this.borderColor || this.color || "#DDE2E6"}`,
|
|
168
|
-
color: this.color || "#
|
|
168
|
+
color: this.color || "#99004A",
|
|
169
169
|
width: this.width,
|
|
170
170
|
height: this.height,
|
|
171
171
|
borderRadius: this.circle
|
|
@@ -202,9 +202,9 @@ const E = _({
|
|
|
202
202
|
fontWeight: 600
|
|
203
203
|
} : {
|
|
204
204
|
color: this.color || "#ffffff",
|
|
205
|
-
background: this.bgColor || "#
|
|
205
|
+
background: this.bgColor || "#99004A",
|
|
206
206
|
borderStyle: `${this.borderStyle}`,
|
|
207
|
-
borderColor: `${this.borderColor || this.color || "#
|
|
207
|
+
borderColor: `${this.borderColor || this.color || "#99004A"}`,
|
|
208
208
|
width: this.width,
|
|
209
209
|
height: this.height,
|
|
210
210
|
borderRadius: this.circle
|
|
@@ -242,16 +242,16 @@ const E = _({
|
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
244
|
});
|
|
245
|
-
const
|
|
245
|
+
const A = (e, o) => {
|
|
246
246
|
const t = e.__vccOpts || e;
|
|
247
247
|
for (const [r, i] of o)
|
|
248
248
|
t[r] = i;
|
|
249
249
|
return t;
|
|
250
|
-
},
|
|
250
|
+
}, L = {
|
|
251
251
|
key: 0,
|
|
252
252
|
class: "s-icon"
|
|
253
|
-
},
|
|
254
|
-
function
|
|
253
|
+
}, O = ["src"];
|
|
254
|
+
function R(e, o, t, r, i, n) {
|
|
255
255
|
const l = d("Loading"), y = d("el-icon"), C = d("el-button");
|
|
256
256
|
return s(), h("div", null, [
|
|
257
257
|
u(C, {
|
|
@@ -263,12 +263,12 @@ function O(e, o, t, r, i, n) {
|
|
|
263
263
|
btnCode: e.btnCode
|
|
264
264
|
}, {
|
|
265
265
|
default: p(() => [
|
|
266
|
-
e.icon ? (s(), h("i",
|
|
266
|
+
e.icon ? (s(), h("i", L, [
|
|
267
267
|
c("img", {
|
|
268
268
|
src: e.geturl,
|
|
269
269
|
alt: "",
|
|
270
270
|
style: a(e.styleObject)
|
|
271
|
-
}, null, 12,
|
|
271
|
+
}, null, 12, O)
|
|
272
272
|
])) : b("", !0),
|
|
273
273
|
c("span", {
|
|
274
274
|
style: a({ color: e.color })
|
|
@@ -290,7 +290,7 @@ function O(e, o, t, r, i, n) {
|
|
|
290
290
|
}, 8, ["class", "disabled", "loading", "style", "onClick", "btnCode"])
|
|
291
291
|
]);
|
|
292
292
|
}
|
|
293
|
-
const g = /* @__PURE__ */
|
|
293
|
+
const g = /* @__PURE__ */ A(W, [["render", R], ["__scopeId", "data-v-77253219"]]);
|
|
294
294
|
function f(e, o = {}) {
|
|
295
295
|
f.installed || (f.installed = !0, e.component("common-button", g));
|
|
296
296
|
}
|
package/common-button.umd.js
CHANGED
|
@@ -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||"#
|
|
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});
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.btnhover[data-v-
|
|
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}
|