sinosoft-common-button 1.0.1 → 1.0.2
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 +130 -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,130 @@
|
|
|
1
|
+
import { defineComponent as u, openBlock as l, createElementBlock as i, normalizeClass as f, normalizeStyle as s, createElementVNode as y, createCommentVNode as d, renderSlot as g } from "vue";
|
|
2
|
+
const m = ["code"], h = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "s-icon"
|
|
5
|
+
}, k = ["src"], b = { key: 1 }, S = /* @__PURE__ */ u({
|
|
6
|
+
__name: "Button",
|
|
7
|
+
props: {
|
|
8
|
+
// size: {
|
|
9
|
+
// type: String as PropType<sizeType>,
|
|
10
|
+
// default: ''
|
|
11
|
+
// },
|
|
12
|
+
// type: {
|
|
13
|
+
// type: String as PropType<btnType>,
|
|
14
|
+
// default: ''
|
|
15
|
+
// },
|
|
16
|
+
size: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: ""
|
|
19
|
+
},
|
|
20
|
+
type: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: ""
|
|
23
|
+
},
|
|
24
|
+
disabled: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1
|
|
27
|
+
},
|
|
28
|
+
long: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !1
|
|
31
|
+
},
|
|
32
|
+
plain: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !1
|
|
35
|
+
},
|
|
36
|
+
round: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !1
|
|
39
|
+
},
|
|
40
|
+
icon: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: ""
|
|
43
|
+
},
|
|
44
|
+
circle: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: !1
|
|
47
|
+
},
|
|
48
|
+
link: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !1
|
|
51
|
+
},
|
|
52
|
+
width: {
|
|
53
|
+
type: [Number, String],
|
|
54
|
+
default: ""
|
|
55
|
+
},
|
|
56
|
+
backgroundcolor: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: ""
|
|
59
|
+
},
|
|
60
|
+
height: {
|
|
61
|
+
type: [Number, String],
|
|
62
|
+
default: ""
|
|
63
|
+
},
|
|
64
|
+
code: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: ""
|
|
67
|
+
},
|
|
68
|
+
iconwidth: {
|
|
69
|
+
type: [Number, String],
|
|
70
|
+
default: ""
|
|
71
|
+
},
|
|
72
|
+
iconheight: {
|
|
73
|
+
type: [Number, String],
|
|
74
|
+
default: ""
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
emits: ["handleClick"],
|
|
78
|
+
setup(e) {
|
|
79
|
+
return (t, n) => (l(), i("button", {
|
|
80
|
+
class: f([
|
|
81
|
+
"btn-style",
|
|
82
|
+
{
|
|
83
|
+
"is-small": e.size === "small",
|
|
84
|
+
"is-normal": e.size === "normal",
|
|
85
|
+
"is-large": e.size === "large",
|
|
86
|
+
"is-enlarge": e.size === "enlarge",
|
|
87
|
+
"is-maxlarge": e.size === "maxlarge",
|
|
88
|
+
"is-primary": e.type === "primary",
|
|
89
|
+
"is-success": e.type === "success",
|
|
90
|
+
"is-error": e.type === "error",
|
|
91
|
+
"is-warn": e.type === "warn",
|
|
92
|
+
"is-info": e.type === "info",
|
|
93
|
+
"is-disabled": e.disabled,
|
|
94
|
+
"is-long": e.long,
|
|
95
|
+
"is-plain": e.plain,
|
|
96
|
+
"is-round": e.round,
|
|
97
|
+
"is-circle": e.circle,
|
|
98
|
+
"is-link": e.link
|
|
99
|
+
}
|
|
100
|
+
]),
|
|
101
|
+
style: s({ backgroundColor: e.backgroundcolor, width: e.width, height: e.height }),
|
|
102
|
+
code: e.code,
|
|
103
|
+
onClick: n[0] || (n[0] = (o) => t.$emit("handleClick"))
|
|
104
|
+
}, [
|
|
105
|
+
e.icon ? (l(), i("i", h, [
|
|
106
|
+
y("img", {
|
|
107
|
+
src: e.icon,
|
|
108
|
+
alt: "",
|
|
109
|
+
style: s({ width: e.iconwidth, height: e.iconheight })
|
|
110
|
+
}, null, 12, k)
|
|
111
|
+
])) : d("", !0),
|
|
112
|
+
t.$slots.default ? (l(), i("span", b, [
|
|
113
|
+
g(t.$slots, "default", {}, void 0, !0)
|
|
114
|
+
])) : d("", !0)
|
|
115
|
+
], 14, m));
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
const B = (e, t) => {
|
|
119
|
+
const n = e.__vccOpts || e;
|
|
120
|
+
for (const [o, r] of t)
|
|
121
|
+
n[o] = r;
|
|
122
|
+
return n;
|
|
123
|
+
}, c = /* @__PURE__ */ B(S, [["__scopeId", "data-v-3041aec2"]]);
|
|
124
|
+
function a(e, t = {}) {
|
|
125
|
+
a.installed || (a.installed = !0, e.component("common-button", c));
|
|
126
|
+
}
|
|
127
|
+
c.install = a;
|
|
128
|
+
export {
|
|
129
|
+
c as default
|
|
130
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(t,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("vue")):typeof define=="function"&&define.amd?define(["vue"],i):(t=typeof globalThis<"u"?globalThis:t||self,t.button=i(t.Vue))})(this,function(t){"use strict";const i=["code"],d={key:0,class:"s-icon"},c=["src"],r={key:1},u=t.defineComponent({__name:"Button",props:{size:{type:String,default:""},type:{type:String,default:""},disabled:{type:Boolean,default:!1},long:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},round:{type:Boolean,default:!1},icon:{type:String,default:""},circle:{type:Boolean,default:!1},link:{type:Boolean,default:!1},width:{type:[Number,String],default:""},backgroundcolor:{type:String,default:""},height:{type:[Number,String],default:""},code:{type:String,default:""},iconwidth:{type:[Number,String],default:""},iconheight:{type:[Number,String],default:""}},emits:["handleClick"],setup(e){return(n,l)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["btn-style",{"is-small":e.size==="small","is-normal":e.size==="normal","is-large":e.size==="large","is-enlarge":e.size==="enlarge","is-maxlarge":e.size==="maxlarge","is-primary":e.type==="primary","is-success":e.type==="success","is-error":e.type==="error","is-warn":e.type==="warn","is-info":e.type==="info","is-disabled":e.disabled,"is-long":e.long,"is-plain":e.plain,"is-round":e.round,"is-circle":e.circle,"is-link":e.link}]),style:t.normalizeStyle({backgroundColor:e.backgroundcolor,width:e.width,height:e.height}),code:e.code,onClick:l[0]||(l[0]=s=>n.$emit("handleClick"))},[e.icon?(t.openBlock(),t.createElementBlock("i",d,[t.createElementVNode("img",{src:e.icon,alt:"",style:t.normalizeStyle({width:e.iconwidth,height:e.iconheight})},null,12,c)])):t.createCommentVNode("",!0),n.$slots.default?(t.openBlock(),t.createElementBlock("span",r,[t.renderSlot(n.$slots,"default",{},void 0,!0)])):t.createCommentVNode("",!0)],14,i))}}),m="",o=((e,n)=>{const l=e.__vccOpts||e;for(const[s,f]of n)l[s]=f;return l})(u,[["__scopeId","data-v-3041aec2"]]);function a(e,n={}){a.installed||(a.installed=!0,e.component("common-button",o))}return o.install=a,o});
|
package/package.json
CHANGED
package/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";.btn-style[data-v-3041aec2]{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#ffffff;border:1px solid #dcdfe6;color:#606266;-webkit-appearance:none;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;padding:12px 20px;font-size:14px;border-radius:4px;margin:0 3px}.btn-style[data-v-3041aec2]:hover,.btn-style[data-v-3041aec2]:focus{color:#409eff;border-color:#c6e2ff;background-color:#ecf5ff}.btn-style.is-small[data-v-3041aec2]{padding:6px 14px}.btn-style.is-normal[data-v-3041aec2]{padding:8px 18px}.btn-style.is-large[data-v-3041aec2]{padding:10px 32px}.btn-style.is-enlarge[data-v-3041aec2]{padding:10px 50px}.btn-style.is-maxlarge[data-v-3041aec2]{padding:10px 82px}.btn-style.is-primary[data-v-3041aec2]{color:#fff;background-color:#409eff;border-color:#409eff}.btn-style.is-primary[data-v-3041aec2]:hover,.btn-style.is-primary[data-v-3041aec2]:focus{background:#66b1ff;background-color:#66b1ff;color:#fff}.btn-style.is-success[data-v-3041aec2]{color:#fff;background-color:#67c23a;border-color:#67c23a}.btn-style.is-success[data-v-3041aec2]:hover,.btn-style.is-success[data-v-3041aec2]:focus{background:#85ce61;background-color:#85ce61;color:#fff}.btn-style.is-error[data-v-3041aec2]{color:#fff;background-color:#f56c6c;border-color:#f56c6c}.btn-style.is-error[data-v-3041aec2]:hover,.btn-style.is-error[data-v-3041aec2]:focus{background:#f78989;background-color:#f78989;color:#fff}.btn-style.is-warn[data-v-3041aec2]{color:#fff;background-color:#e6a23c;border-color:#e6a23c}.btn-style.is-warn[data-v-3041aec2]:hover,.btn-style.is-warn[data-v-3041aec2]:focus{background:#ebb563;background-color:#ebb563;color:#fff}.btn-style.is-info[data-v-3041aec2]{color:#fff;background-color:#909399;border-color:#909399}.btn-style.is-info[data-v-3041aec2]:hover,.btn-style.is-info[data-v-3041aec2]:focus{background:#a6a9ad;background-color:#a6a9ad;color:#fff}.btn-style.is-link[data-v-3041aec2]{border:none!important}.btn-style.is-link[data-v-3041aec2]:hover,.btn-style.is-link[data-v-3041aec2]:focus{background:none}.is-disabled[data-v-3041aec2]{opacity:.5;cursor:not-allowed}.btn-style.is-plain[data-v-3041aec2]:hover,.btn-style.is-plain[data-v-3041aec2]:focus{background:#fff;border-color:#489eff;color:#409eff}.btn-style.is-primary.is-plain[data-v-3041aec2]{color:#409eff;background:#ecf5ff}.btn-style.is-primary.is-plain[data-v-3041aec2]:hover,.btn-style.is-primary.is-plain[data-v-3041aec2]:focus{background:#409eff;border-color:#409eff;color:#fff}.btn-style.is-success.is-plain[data-v-3041aec2]{color:#67c23a;background:#c2e7b0}.btn-style.is-success.is-plain[data-v-3041aec2]:hover,.btn-style.is-success.is-plain[data-v-3041aec2]:focus{background:#67c23a;border-color:#67c23a;color:#fff}.btn-style.is-info.is-plain[data-v-3041aec2]{color:#909399;background:#d3d4d6}.btn-style.is-info.is-plain[data-v-3041aec2]:hover,.btn-style.is-info.is-plain[data-v-3041aec2]:focus{background:#909399;border-color:#909399;color:#fff}.btn-style.is-warn.is-plain[data-v-3041aec2]{color:#e6a23c;background:#f5dab1}.btn-style.is-warn.is-plain[data-v-3041aec2]:hover,.btn-style.is-warn.is-plain[data-v-3041aec2]:focus{background:#e6a23c;border-color:#e6a23c;color:#fff}.btn-style.is-error.is-plain[data-v-3041aec2]{color:#f56c6c;background:#fbc4c4}.btn-style.is-error.is-plain[data-v-3041aec2]:hover,.btn-style.is-error.is-plain[data-v-3041aec2]:focus{background:#f56c6c;border-color:#f56c6c;color:#fff}.btn-style.is-round[data-v-3041aec2]{border-radius:20px;padding:12px 23px}.btn-style.is-circle[data-v-3041aec2]{box-sizing:border-box;border-radius:50%;padding:12px 14px 12px 12px}.btn-style .s-icon[data-v-3041aec2]{box-sizing:border-box}
|