sinosoft-common-button 1.0.3 → 1.0.4
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 +145 -74
- 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
|
-
import { openBlock as
|
|
1
|
+
import { openBlock as d, createElementBlock as c, createElementVNode as p, defineComponent as g, resolveComponent as u, createVNode as r, normalizeClass as $, normalizeStyle as f, withCtx as l, createCommentVNode as _, renderSlot as S, createBlock as z, createTextVNode as a } from "vue";
|
|
2
2
|
/*! Element Plus Icons Vue v2.1.0 */
|
|
3
|
-
var
|
|
3
|
+
var k = (e, t) => {
|
|
4
4
|
let o = e.__vccOpts || e;
|
|
5
|
-
for (let [
|
|
6
|
-
o[
|
|
5
|
+
for (let [i, n] of t)
|
|
6
|
+
o[i] = n;
|
|
7
7
|
return o;
|
|
8
|
-
},
|
|
8
|
+
}, F = {
|
|
9
9
|
name: "Loading"
|
|
10
|
-
},
|
|
10
|
+
}, B = {
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12
12
|
viewBox: "0 0 1024 1024"
|
|
13
|
-
},
|
|
13
|
+
}, w = /* @__PURE__ */ p(
|
|
14
14
|
"path",
|
|
15
15
|
{
|
|
16
16
|
fill: "currentColor",
|
|
@@ -19,39 +19,55 @@ var S = (e, t) => {
|
|
|
19
19
|
null,
|
|
20
20
|
-1
|
|
21
21
|
/* HOISTED */
|
|
22
|
-
),
|
|
23
|
-
|
|
22
|
+
), D = [
|
|
23
|
+
w
|
|
24
24
|
];
|
|
25
|
-
function
|
|
26
|
-
return
|
|
25
|
+
function E(e, t, o, i, n, y) {
|
|
26
|
+
return d(), c("svg", B, D);
|
|
27
27
|
}
|
|
28
|
-
var
|
|
29
|
-
const
|
|
28
|
+
var L = /* @__PURE__ */ k(F, [["render", E], ["__file", "loading.vue"]]);
|
|
29
|
+
const x = g({
|
|
30
30
|
components: {
|
|
31
31
|
// sIcon,
|
|
32
|
-
Loading:
|
|
32
|
+
Loading: L
|
|
33
33
|
},
|
|
34
34
|
props: {
|
|
35
|
-
|
|
35
|
+
plain: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !1
|
|
38
|
+
},
|
|
39
|
+
primary: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: !1
|
|
42
|
+
},
|
|
43
|
+
default: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
},
|
|
47
|
+
info: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
50
|
+
},
|
|
51
|
+
circle: {
|
|
36
52
|
type: String,
|
|
37
53
|
default: ""
|
|
38
54
|
},
|
|
39
|
-
|
|
55
|
+
height: {
|
|
40
56
|
type: String,
|
|
41
57
|
default: ""
|
|
42
58
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// },
|
|
47
|
-
plain: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
default: !1
|
|
59
|
+
width: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: ""
|
|
50
62
|
},
|
|
51
63
|
color: {
|
|
52
64
|
type: String,
|
|
53
65
|
default: ""
|
|
54
66
|
},
|
|
67
|
+
loadingColor: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: "#333333"
|
|
70
|
+
},
|
|
55
71
|
bgColor: {
|
|
56
72
|
type: String,
|
|
57
73
|
default: ""
|
|
@@ -66,7 +82,7 @@ const O = p({
|
|
|
66
82
|
},
|
|
67
83
|
icon: {
|
|
68
84
|
type: String,
|
|
69
|
-
required: !
|
|
85
|
+
required: !1
|
|
70
86
|
},
|
|
71
87
|
size: {
|
|
72
88
|
type: [Number, String],
|
|
@@ -79,11 +95,34 @@ const O = p({
|
|
|
79
95
|
background: "#fff",
|
|
80
96
|
borderWidth: "1px",
|
|
81
97
|
borderStyle: `${this.borderStyle}`,
|
|
98
|
+
borderColor: `${this.color || "#216FED"}`,
|
|
99
|
+
color: this.color || "#216FED"
|
|
100
|
+
} : this.primary ? {
|
|
101
|
+
background: "#216FED",
|
|
102
|
+
borderWidth: "1px",
|
|
103
|
+
borderStyle: `${this.borderStyle}`,
|
|
82
104
|
borderColor: `${this.color || "#4E6DFD"}`,
|
|
83
|
-
color: this.color || "#
|
|
105
|
+
color: this.color || "#ffffff"
|
|
106
|
+
} : this.default ? {
|
|
107
|
+
background: "#ffffff",
|
|
108
|
+
borderWidth: "1px",
|
|
109
|
+
borderStyle: `${this.borderStyle}`,
|
|
110
|
+
borderColor: `${this.color || "#DDE2E6"}`,
|
|
111
|
+
color: this.color || "#2C3C4D"
|
|
112
|
+
} : this.info ? {
|
|
113
|
+
background: "#C4C4C4",
|
|
114
|
+
borderWidth: "1px",
|
|
115
|
+
borderStyle: `${this.borderStyle}`,
|
|
116
|
+
borderColor: `${this.color || "#C4C4C4"}`,
|
|
117
|
+
color: this.color || "#FFFFFF"
|
|
84
118
|
} : {
|
|
85
|
-
color: this.color || "#
|
|
86
|
-
background: this.bgColor
|
|
119
|
+
color: this.color || "#ffffff",
|
|
120
|
+
background: this.bgColor || "#216FED",
|
|
121
|
+
borderStyle: `${this.borderStyle}`,
|
|
122
|
+
borderColor: `${this.color || "#216FED"}`,
|
|
123
|
+
height: this.height,
|
|
124
|
+
width: this.width,
|
|
125
|
+
borderRadius: this.circle
|
|
87
126
|
};
|
|
88
127
|
},
|
|
89
128
|
geturl() {
|
|
@@ -104,75 +143,107 @@ const O = p({
|
|
|
104
143
|
}
|
|
105
144
|
}
|
|
106
145
|
});
|
|
107
|
-
const
|
|
146
|
+
const O = (e, t) => {
|
|
108
147
|
const o = e.__vccOpts || e;
|
|
109
|
-
for (const [
|
|
110
|
-
o[
|
|
148
|
+
for (const [i, n] of t)
|
|
149
|
+
o[i] = n;
|
|
111
150
|
return o;
|
|
112
|
-
},
|
|
151
|
+
}, V = {
|
|
113
152
|
key: 0,
|
|
114
153
|
class: "s-icon"
|
|
115
|
-
},
|
|
116
|
-
function
|
|
117
|
-
const m =
|
|
118
|
-
return
|
|
119
|
-
|
|
120
|
-
class:
|
|
154
|
+
}, N = ["src"];
|
|
155
|
+
function j(e, t, o, i, n, y) {
|
|
156
|
+
const m = u("Loading"), v = u("el-icon"), C = u("el-button");
|
|
157
|
+
return d(), c("div", null, [
|
|
158
|
+
r(C, {
|
|
159
|
+
class: $(["s-button", { plain: e.plain, btnhover: !e.plain, loading: e.loading }]),
|
|
121
160
|
disabled: e.loading,
|
|
122
|
-
style:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
161
|
+
style: f(e.styleOjb),
|
|
162
|
+
onClick: t[0] || (t[0] = (H) => e.$emit("handleClick"))
|
|
163
|
+
}, {
|
|
164
|
+
default: l(() => [
|
|
165
|
+
e.icon ? (d(), c("i", V, [
|
|
166
|
+
p("img", {
|
|
167
|
+
src: e.geturl,
|
|
168
|
+
alt: "",
|
|
169
|
+
style: f(e.styleObject)
|
|
170
|
+
}, null, 12, N)
|
|
171
|
+
])) : _("", !0),
|
|
172
|
+
p("span", {
|
|
173
|
+
style: f({ color: e.color })
|
|
174
|
+
}, [
|
|
175
|
+
S(e.$slots, "default", {}, void 0, !0)
|
|
176
|
+
], 4),
|
|
177
|
+
e.loading ? (d(), z(v, {
|
|
178
|
+
key: 1,
|
|
179
|
+
class: "is-loading",
|
|
180
|
+
color: e.loadingColor
|
|
181
|
+
}, {
|
|
182
|
+
default: l(() => [
|
|
183
|
+
r(m)
|
|
184
|
+
]),
|
|
185
|
+
_: 1
|
|
186
|
+
}, 8, ["color"])) : _("", !0)
|
|
187
|
+
]),
|
|
188
|
+
_: 3
|
|
189
|
+
}, 8, ["class", "disabled", "style"])
|
|
147
190
|
]);
|
|
148
191
|
}
|
|
149
|
-
const
|
|
192
|
+
const s = /* @__PURE__ */ O(x, [["render", j], ["__scopeId", "data-v-22aae99b"]]), W = { class: "table-button" }, b = /* @__PURE__ */ g({
|
|
150
193
|
__name: "index",
|
|
151
194
|
setup(e) {
|
|
152
195
|
const t = () => {
|
|
153
196
|
console.log(11111);
|
|
154
197
|
};
|
|
155
|
-
return (o,
|
|
156
|
-
|
|
198
|
+
return (o, i) => (d(), c("div", W, [
|
|
199
|
+
r(s, {
|
|
157
200
|
plain: "",
|
|
158
|
-
|
|
159
|
-
onClick: t,
|
|
201
|
+
onHandleClick: t,
|
|
160
202
|
icon: "icon-add",
|
|
161
203
|
size: 16,
|
|
162
|
-
loading: !
|
|
204
|
+
loading: !0
|
|
163
205
|
}, {
|
|
164
|
-
default:
|
|
165
|
-
|
|
206
|
+
default: l(() => [
|
|
207
|
+
a("提交")
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
}),
|
|
211
|
+
r(s, {
|
|
212
|
+
bgColor: "#f00",
|
|
213
|
+
height: "80px",
|
|
214
|
+
circle: "60px",
|
|
215
|
+
color: "#000"
|
|
216
|
+
}, {
|
|
217
|
+
default: l(() => [
|
|
218
|
+
a("提交提交提交提交提交提交提交提交提交提交提交提交提交")
|
|
219
|
+
]),
|
|
220
|
+
_: 1
|
|
221
|
+
}),
|
|
222
|
+
r(s, { primary: "" }, {
|
|
223
|
+
default: l(() => [
|
|
224
|
+
a("提交提交提交提交提交提交提交提交提交提交提交提交提交")
|
|
225
|
+
]),
|
|
226
|
+
_: 1
|
|
227
|
+
}),
|
|
228
|
+
r(s, { default: "" }, {
|
|
229
|
+
default: l(() => [
|
|
230
|
+
a("提交提交提交提交提交提交提交提交提交提交提交提交提交")
|
|
231
|
+
]),
|
|
232
|
+
_: 1
|
|
233
|
+
}),
|
|
234
|
+
r(s, { info: "" }, {
|
|
235
|
+
default: l(() => [
|
|
236
|
+
a("提交提交提交提交提交提交提交提交提交提交提交提交提交")
|
|
166
237
|
]),
|
|
167
238
|
_: 1
|
|
168
239
|
})
|
|
169
240
|
]));
|
|
170
241
|
}
|
|
171
242
|
});
|
|
172
|
-
function
|
|
173
|
-
|
|
243
|
+
function h(e, t = {}) {
|
|
244
|
+
h.installed || (h.installed = !0, e.component("common-button", b));
|
|
174
245
|
}
|
|
175
|
-
|
|
246
|
+
b.install = h;
|
|
176
247
|
export {
|
|
177
|
-
|
|
248
|
+
b as default
|
|
178
249
|
};
|
package/common-button.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("vue")):typeof define=="function"&&define.amd?define(["vue"],l):(e=typeof globalThis<"u"?globalThis:e||self,e.button=l(e.Vue))})(this,function(e){"use strict";/*! Element Plus Icons Vue v2.1.0 */var l=(t,o)=>{let
|
|
1
|
+
(function(e,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("vue")):typeof define=="function"&&define.amd?define(["vue"],l):(e=typeof globalThis<"u"?globalThis:e||self,e.button=l(e.Vue))})(this,function(e){"use strict";/*! Element Plus Icons Vue v2.1.0 */var l=(t,o)=>{let r=t.__vccOpts||t;for(let[n,a]of o)r[n]=a;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),h=[p];function u(t,o,r,n,a,S){return e.openBlock(),e.createElementBlock("svg",f,h)}var _=l(c,[["render",u],["__file","loading.vue"]]);const g=e.defineComponent({components:{Loading:_},props:{plain:{type:Boolean,default:!1},primary:{type:Boolean,default:!1},default:{type:Boolean,default:!1},info:{type:Boolean,default:!1},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"}:this.primary?{background:"#216FED",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#4E6DFD"}`,color:this.color||"#ffffff"}:this.default?{background:"#ffffff",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#DDE2E6"}`,color:this.color||"#2C3C4D"}:this.info?{background:"#C4C4C4",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#C4C4C4"}`,color:this.color||"#FFFFFF"}:{color:this.color||"#ffffff",background:this.bgColor||"#216FED",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#216FED"}`,height:this.height,width:this.width,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"}}}}),x="",y=(t,o)=>{const r=t.__vccOpts||t;for(const[n,a]of o)r[n]=a;return r},m={key:0,class:"s-icon"},b=["src"];function C(t,o,r,n,a,S){const k=e.resolveComponent("Loading"),z=e.resolveComponent("el-icon"),V=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(V,{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]=B=>t.$emit("handleClick"))},{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,b)])):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(z,{key:1,class:"is-loading",color:t.loadingColor},{default:e.withCtx(()=>[e.createVNode(k)]),_:1},8,["color"])):e.createCommentVNode("",!0)]),_:3},8,["class","disabled","style"])])}const i=y(g,[["render",C],["__scopeId","data-v-22aae99b"]]),$={class:"table-button"},s=e.defineComponent({__name:"index",setup(t){const o=()=>{console.log(11111)};return(r,n)=>(e.openBlock(),e.createElementBlock("div",$,[e.createVNode(i,{plain:"",onHandleClick:o,icon:"icon-add",size:16,loading:!0},{default:e.withCtx(()=>[e.createTextVNode("提交")]),_:1}),e.createVNode(i,{bgColor:"#f00",height:"80px",circle:"60px",color:"#000"},{default:e.withCtx(()=>[e.createTextVNode("提交提交提交提交提交提交提交提交提交提交提交提交提交")]),_:1}),e.createVNode(i,{primary:""},{default:e.withCtx(()=>[e.createTextVNode("提交提交提交提交提交提交提交提交提交提交提交提交提交")]),_:1}),e.createVNode(i,{default:""},{default:e.withCtx(()=>[e.createTextVNode("提交提交提交提交提交提交提交提交提交提交提交提交提交")]),_:1}),e.createVNode(i,{info:""},{default:e.withCtx(()=>[e.createTextVNode("提交提交提交提交提交提交提交提交提交提交提交提交提交")]),_:1})]))}});function d(t,o={}){d.installed||(d.installed=!0,t.component("common-button",s))}return s.install=d,s});
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.btnhover[data-v-
|
|
1
|
+
.btnhover[data-v-22aae99b]:hover{box-shadow:0 0 15px #2461cc4d;opacity:.95}.s-button[data-v-22aae99b]{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-22aae99b]{margin-left:15px}.s-button span[data-v-22aae99b]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1;font-size:14px;font-weight:500}.s-button>*[data-v-22aae99b]{vertical-align:middle}.plain[data-v-22aae99b]{background:#fff}.plain-icon[data-v-22aae99b]{margin-right:4px}.loading[data-v-22aae99b]{opacity:.8}.s-icon[data-v-22aae99b]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden}.s-icon img[data-v-22aae99b]{float:left}
|