wtsk-comps 1.2.1 → 1.2.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/dist/wtsk-comps.cjs.js +1 -1
- package/dist/wtsk-comps.es.js +38 -24
- package/dist/wtsk-comps.umd.js +1 -1
- package/package.json +1 -1
package/dist/wtsk-comps.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const e=require("vue"),p=e.defineComponent({name:"WtskBtn",inheritAttrs:!1,__name:"WtskBtn",props:{onClick:{type:Function},size:{},disabled:{type:Boolean},type:{},icon:{},nativeType:{},loading:{type:Boolean},loadingIcon:{},plain:{type:Boolean},text:{type:Boolean},link:{type:Boolean},bg:{type:Boolean},autofocus:{type:Boolean},round:{type:Boolean},circle:{type:Boolean},color:{},dark:{type:Boolean},autoInsertSpace:{type:Boolean},tag:{}},setup(o){const t=o,n=e.useAttrs(),l=e.ref(!1),c=e.computed(()=>({...Object.fromEntries(Object.entries(t).filter(([s])=>s!=="onClick")),...n}));async function r(){l.value=!0;try{typeof t.onClick=="function"&&await t.onClick?.()}finally{l.value=!1}}return(a,s)=>{const i=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(i,e.mergeProps(c.value,{loading:l.value,onClick:r}),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16,["loading"])}}}),u=[{name:"WtskBtn",component:p}],f={install(o){u.forEach(({name:t,component:n})=>{o.component(t,n)})}};module.exports=f;
|
package/dist/wtsk-comps.es.js
CHANGED
|
@@ -1,49 +1,63 @@
|
|
|
1
|
-
import { defineComponent as i, ref as f, resolveComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as i, useAttrs as p, ref as u, computed as f, resolveComponent as d, openBlock as y, createBlock as B, mergeProps as m, withCtx as k, renderSlot as g } from "vue";
|
|
2
|
+
const C = /* @__PURE__ */ i({
|
|
3
3
|
name: "WtskBtn",
|
|
4
4
|
inheritAttrs: !1,
|
|
5
5
|
__name: "WtskBtn",
|
|
6
6
|
props: {
|
|
7
|
-
onClick: { type: Function }
|
|
7
|
+
onClick: { type: Function },
|
|
8
|
+
size: {},
|
|
9
|
+
disabled: { type: Boolean },
|
|
10
|
+
type: {},
|
|
11
|
+
icon: {},
|
|
12
|
+
nativeType: {},
|
|
13
|
+
loading: { type: Boolean },
|
|
14
|
+
loadingIcon: {},
|
|
15
|
+
plain: { type: Boolean },
|
|
16
|
+
text: { type: Boolean },
|
|
17
|
+
link: { type: Boolean },
|
|
18
|
+
bg: { type: Boolean },
|
|
19
|
+
autofocus: { type: Boolean },
|
|
20
|
+
round: { type: Boolean },
|
|
21
|
+
circle: { type: Boolean },
|
|
22
|
+
color: {},
|
|
23
|
+
dark: { type: Boolean },
|
|
24
|
+
autoInsertSpace: { type: Boolean },
|
|
25
|
+
tag: {}
|
|
8
26
|
},
|
|
9
|
-
setup(
|
|
10
|
-
const o =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
c !== l && (e[c] = t[c]);
|
|
15
|
-
return e;
|
|
16
|
-
}
|
|
17
|
-
async function a() {
|
|
27
|
+
setup(t) {
|
|
28
|
+
const e = t, o = p(), n = u(!1), s = f(() => ({ ...Object.fromEntries(
|
|
29
|
+
Object.entries(e).filter(([a]) => a !== "onClick")
|
|
30
|
+
), ...o }));
|
|
31
|
+
async function c() {
|
|
18
32
|
n.value = !0;
|
|
19
33
|
try {
|
|
20
|
-
typeof
|
|
34
|
+
typeof e.onClick == "function" && await e.onClick?.();
|
|
21
35
|
} finally {
|
|
22
36
|
n.value = !1;
|
|
23
37
|
}
|
|
24
38
|
}
|
|
25
|
-
return (
|
|
26
|
-
const
|
|
27
|
-
return
|
|
39
|
+
return (l, a) => {
|
|
40
|
+
const r = d("el-button");
|
|
41
|
+
return y(), B(r, m(s.value, {
|
|
28
42
|
loading: n.value,
|
|
29
|
-
onClick:
|
|
43
|
+
onClick: c
|
|
30
44
|
}), {
|
|
31
|
-
default:
|
|
32
|
-
|
|
45
|
+
default: k(() => [
|
|
46
|
+
g(l.$slots, "default")
|
|
33
47
|
]),
|
|
34
48
|
_: 3
|
|
35
49
|
}, 16, ["loading"]);
|
|
36
50
|
};
|
|
37
51
|
}
|
|
38
|
-
}),
|
|
39
|
-
{ name: "WtskBtn", component:
|
|
52
|
+
}), _ = [
|
|
53
|
+
{ name: "WtskBtn", component: C }
|
|
40
54
|
// { name: 'WtskTree', component: WtskTree },
|
|
41
55
|
// { name: 'WtskForm', component: WtskForm },
|
|
42
56
|
// { name: 'WtskTable', component: WtskTable }
|
|
43
57
|
], v = {
|
|
44
|
-
install(
|
|
45
|
-
|
|
46
|
-
|
|
58
|
+
install(t) {
|
|
59
|
+
_.forEach(({ name: e, component: o }) => {
|
|
60
|
+
t.component(e, o);
|
|
47
61
|
});
|
|
48
62
|
}
|
|
49
63
|
};
|
package/dist/wtsk-comps.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n
|
|
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.WtskComps=n(e.Vue))})(this,(function(e){"use strict";const c=[{name:"WtskBtn",component:e.defineComponent({name:"WtskBtn",inheritAttrs:!1,__name:"WtskBtn",props:{onClick:{type:Function},size:{},disabled:{type:Boolean},type:{},icon:{},nativeType:{},loading:{type:Boolean},loadingIcon:{},plain:{type:Boolean},text:{type:Boolean},link:{type:Boolean},bg:{type:Boolean},autofocus:{type:Boolean},round:{type:Boolean},circle:{type:Boolean},color:{},dark:{type:Boolean},autoInsertSpace:{type:Boolean},tag:{}},setup(o){const t=o,s=e.useAttrs(),i=e.ref(!1),r=e.computed(()=>({...Object.fromEntries(Object.entries(t).filter(([a])=>a!=="onClick")),...s}));async function p(){i.value=!0;try{typeof t.onClick=="function"&&await t.onClick?.()}finally{i.value=!1}}return(l,a)=>{const f=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(f,e.mergeProps(r.value,{loading:i.value,onClick:p}),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},16,["loading"])}}})}];return{install(o){c.forEach(({name:t,component:s})=>{o.component(t,s)})}}}));
|