sinosoft-common-button 1.0.1 → 1.0.3
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 +178 -0
- package/common-button.umd.js +1 -0
- package/package.json +2 -2
- package/style.css +1 -0
- package/common-table.es.js +0 -7906
- package/common-table.umd.js +0 -24
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { openBlock as l, createElementBlock as r, createElementVNode as s, defineComponent as p, resolveComponent as d, normalizeClass as b, normalizeStyle as a, createCommentVNode as u, renderSlot as v, createBlock as z, withCtx as _, createVNode as f, createTextVNode as $ } from "vue";
|
|
2
|
+
/*! Element Plus Icons Vue v2.1.0 */
|
|
3
|
+
var S = (e, t) => {
|
|
4
|
+
let o = e.__vccOpts || e;
|
|
5
|
+
for (let [n, i] of t)
|
|
6
|
+
o[n] = i;
|
|
7
|
+
return o;
|
|
8
|
+
}, k = {
|
|
9
|
+
name: "Loading"
|
|
10
|
+
}, C = {
|
|
11
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
+
viewBox: "0 0 1024 1024"
|
|
13
|
+
}, L = /* @__PURE__ */ s(
|
|
14
|
+
"path",
|
|
15
|
+
{
|
|
16
|
+
fill: "currentColor",
|
|
17
|
+
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"
|
|
18
|
+
},
|
|
19
|
+
null,
|
|
20
|
+
-1
|
|
21
|
+
/* HOISTED */
|
|
22
|
+
), B = [
|
|
23
|
+
L
|
|
24
|
+
];
|
|
25
|
+
function w(e, t, o, n, i, h) {
|
|
26
|
+
return l(), r("svg", C, B);
|
|
27
|
+
}
|
|
28
|
+
var D = /* @__PURE__ */ S(k, [["render", w], ["__file", "loading.vue"]]);
|
|
29
|
+
const O = p({
|
|
30
|
+
components: {
|
|
31
|
+
// sIcon,
|
|
32
|
+
Loading: D
|
|
33
|
+
},
|
|
34
|
+
props: {
|
|
35
|
+
height: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: ""
|
|
38
|
+
},
|
|
39
|
+
background: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: ""
|
|
42
|
+
},
|
|
43
|
+
// icon: {
|
|
44
|
+
// type: String,
|
|
45
|
+
// default: ''
|
|
46
|
+
// },
|
|
47
|
+
plain: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !1
|
|
50
|
+
},
|
|
51
|
+
color: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: ""
|
|
54
|
+
},
|
|
55
|
+
bgColor: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: ""
|
|
58
|
+
},
|
|
59
|
+
loading: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: !1
|
|
62
|
+
},
|
|
63
|
+
borderStyle: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: "solid"
|
|
66
|
+
},
|
|
67
|
+
icon: {
|
|
68
|
+
type: String,
|
|
69
|
+
required: !0
|
|
70
|
+
},
|
|
71
|
+
size: {
|
|
72
|
+
type: [Number, String],
|
|
73
|
+
default: "auto"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
computed: {
|
|
77
|
+
styleOjb() {
|
|
78
|
+
return this.plain ? {
|
|
79
|
+
background: "#fff",
|
|
80
|
+
borderWidth: "1px",
|
|
81
|
+
borderStyle: `${this.borderStyle}`,
|
|
82
|
+
borderColor: `${this.color || "#4E6DFD"}`,
|
|
83
|
+
color: this.color || "#4E6DFD"
|
|
84
|
+
} : {
|
|
85
|
+
color: this.color || "#fff",
|
|
86
|
+
background: this.bgColor
|
|
87
|
+
};
|
|
88
|
+
},
|
|
89
|
+
geturl() {
|
|
90
|
+
if (this.icon) {
|
|
91
|
+
if (this.icon.includes("/") || this.icon.includes("base64"))
|
|
92
|
+
return this.icon;
|
|
93
|
+
if (this.icon.includes("svg"))
|
|
94
|
+
return `@icons/svg/${this.icon}`;
|
|
95
|
+
} else
|
|
96
|
+
return "";
|
|
97
|
+
return `@icons/png/${this.icon}.png`;
|
|
98
|
+
},
|
|
99
|
+
styleObject: function() {
|
|
100
|
+
return {
|
|
101
|
+
width: typeof this.size == "string" ? this.size : this.size + "px",
|
|
102
|
+
height: typeof this.size == "string" ? this.size : this.size + "px"
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
const V = (e, t) => {
|
|
108
|
+
const o = e.__vccOpts || e;
|
|
109
|
+
for (const [n, i] of t)
|
|
110
|
+
o[n] = i;
|
|
111
|
+
return o;
|
|
112
|
+
}, N = ["disabled"], j = {
|
|
113
|
+
key: 0,
|
|
114
|
+
class: "s-icon"
|
|
115
|
+
}, E = ["src"];
|
|
116
|
+
function x(e, t, o, n, i, h) {
|
|
117
|
+
const m = d("Loading"), y = d("el-icon");
|
|
118
|
+
return l(), r("div", null, [
|
|
119
|
+
s("button", {
|
|
120
|
+
class: b(["s-button", { plain: e.plain, btnhover: !e.plain, loading: e.loading }]),
|
|
121
|
+
disabled: e.loading,
|
|
122
|
+
style: a(e.styleOjb)
|
|
123
|
+
}, [
|
|
124
|
+
e.icon ? (l(), r("i", j, [
|
|
125
|
+
s("img", {
|
|
126
|
+
src: e.geturl,
|
|
127
|
+
alt: "",
|
|
128
|
+
style: a(e.styleObject)
|
|
129
|
+
}, null, 12, E)
|
|
130
|
+
])) : u("", !0),
|
|
131
|
+
s("span", {
|
|
132
|
+
style: a({ color: e.color })
|
|
133
|
+
}, [
|
|
134
|
+
v(e.$slots, "default", {}, void 0, !0)
|
|
135
|
+
], 4),
|
|
136
|
+
e.loading ? (l(), z(y, {
|
|
137
|
+
key: 1,
|
|
138
|
+
class: "is-loading",
|
|
139
|
+
color: e.color
|
|
140
|
+
}, {
|
|
141
|
+
default: _(() => [
|
|
142
|
+
f(m)
|
|
143
|
+
]),
|
|
144
|
+
_: 1
|
|
145
|
+
}, 8, ["color"])) : u("", !0)
|
|
146
|
+
], 14, N)
|
|
147
|
+
]);
|
|
148
|
+
}
|
|
149
|
+
const F = /* @__PURE__ */ V(O, [["render", x], ["__scopeId", "data-v-0b4354c8"]]), M = { class: "table-button" }, g = /* @__PURE__ */ p({
|
|
150
|
+
__name: "index",
|
|
151
|
+
setup(e) {
|
|
152
|
+
const t = () => {
|
|
153
|
+
console.log(11111);
|
|
154
|
+
};
|
|
155
|
+
return (o, n) => (l(), r("div", M, [
|
|
156
|
+
f(F, {
|
|
157
|
+
plain: "",
|
|
158
|
+
color: "#4D6AFD",
|
|
159
|
+
onClick: t,
|
|
160
|
+
icon: "icon-add",
|
|
161
|
+
size: 16,
|
|
162
|
+
loading: !1
|
|
163
|
+
}, {
|
|
164
|
+
default: _(() => [
|
|
165
|
+
$("提交")
|
|
166
|
+
]),
|
|
167
|
+
_: 1
|
|
168
|
+
})
|
|
169
|
+
]));
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
function c(e, t = {}) {
|
|
173
|
+
c.installed || (c.installed = !0, e.component("common-button", g));
|
|
174
|
+
}
|
|
175
|
+
g.install = c;
|
|
176
|
+
export {
|
|
177
|
+
g as default
|
|
178
|
+
};
|
|
@@ -0,0 +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 n=t.__vccOpts||t;for(let[i,r]of o)n[i]=r;return n},c={name:"Loading"},d={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),f=[p];function _(t,o,n,i,r,$){return e.openBlock(),e.createElementBlock("svg",d,f)}var u=l(c,[["render",_],["__file","loading.vue"]]);const h=e.defineComponent({components:{Loading:u},props:{height:{type:String,default:""},background:{type:String,default:""},plain:{type:Boolean,default:!1},color:{type:String,default:""},bgColor:{type:String,default:""},loading:{type:Boolean,default:!1},borderStyle:{type:String,default:"solid"},icon:{type:String,required:!0},size:{type:[Number,String],default:"auto"}},computed:{styleOjb(){return this.plain?{background:"#fff",borderWidth:"1px",borderStyle:`${this.borderStyle}`,borderColor:`${this.color||"#4E6DFD"}`,color:this.color||"#4E6DFD"}:{color:this.color||"#fff",background:this.bgColor}},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"}}}}),V="",g=(t,o)=>{const n=t.__vccOpts||t;for(const[i,r]of o)n[i]=r;return n},m=["disabled"],y={key:0,class:"s-icon"},b=["src"];function z(t,o,n,i,r,$){const C=e.resolveComponent("Loading"),S=e.resolveComponent("el-icon");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("button",{class:e.normalizeClass(["s-button",{plain:t.plain,btnhover:!t.plain,loading:t.loading}]),disabled:t.loading,style:e.normalizeStyle(t.styleOjb)},[t.icon?(e.openBlock(),e.createElementBlock("i",y,[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(S,{key:1,class:"is-loading",color:t.color},{default:e.withCtx(()=>[e.createVNode(C)]),_:1},8,["color"])):e.createCommentVNode("",!0)],14,m)])}const k=g(h,[["render",z],["__scopeId","data-v-0b4354c8"]]),B={class:"table-button"},s=e.defineComponent({__name:"index",setup(t){const o=()=>{console.log(11111)};return(n,i)=>(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(k,{plain:"",color:"#4D6AFD",onClick:o,icon:"icon-add",size:16,loading:!1},{default:e.withCtx(()=>[e.createTextVNode("提交")]),_:1})]))}});function a(t,o={}){a.installed||(a.installed=!0,t.component("common-button",s))}return s.install=a,s});
|
package/package.json
CHANGED
package/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.btnhover[data-v-0b4354c8]:hover{box-shadow:0 0 15px #2461cc4d;opacity:.95}.s-button[data-v-0b4354c8]{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-0b4354c8]{margin-left:15px}.s-button span[data-v-0b4354c8]{display:inline-block;margin:0 4px;text-justify:auto;line-height:1;font-size:14px;font-weight:500}.s-button>*[data-v-0b4354c8]{vertical-align:middle}.plain[data-v-0b4354c8]{background:#fff}.plain-icon[data-v-0b4354c8]{margin-right:4px}.loading[data-v-0b4354c8]{opacity:.8}.s-icon[data-v-0b4354c8]{display:inline-block;line-height:1;flex-shrink:0;overflow:hidden}.s-icon img[data-v-0b4354c8]{float:left}
|