wtsk-comps 1.2.1 → 1.2.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/dist/types/index.d.ts +1 -0
- package/dist/wtsk-comps.cjs.js +1 -1
- package/dist/wtsk-comps.es.js +41 -24
- package/dist/wtsk-comps.umd.js +1 -1
- package/package.json +6 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/dist/wtsk-comps.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=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),i=e.computed(()=>({...Object.fromEntries(Object.entries(t).filter(([r])=>r!=="onClick")),...n}));async function p(){l.value=!0;try{typeof t.onClick=="function"&&await t.onClick?.()}finally{l.value=!1}}return(a,r)=>{const u=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(u,e.mergeProps(i.value,{loading:l.value,onClick:p}),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16,["loading"])}}}),s=[{name:"WtskBtn",component:c}],d={install(o){s.forEach(({name:t,component:n})=>{o.component(t,n)})},...s.reduce((o,{name:t,component:n})=>(o[t]=n,o),{})};exports.WtskBtn=c;exports.default=d;
|
package/dist/wtsk-comps.es.js
CHANGED
|
@@ -1,52 +1,69 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const _ = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as p, useAttrs as u, ref as f, computed as d, resolveComponent as y, openBlock as B, createBlock as m, mergeProps as k, withCtx as g, renderSlot as C } from "vue";
|
|
2
|
+
const _ = /* @__PURE__ */ p({
|
|
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 = u(), n = f(!1), r = d(() => ({ ...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 i = y("el-button");
|
|
41
|
+
return B(), m(i, k(r.value, {
|
|
28
42
|
loading: n.value,
|
|
29
|
-
onClick:
|
|
43
|
+
onClick: c
|
|
30
44
|
}), {
|
|
31
|
-
default:
|
|
32
|
-
|
|
45
|
+
default: g(() => [
|
|
46
|
+
C(l.$slots, "default")
|
|
33
47
|
]),
|
|
34
48
|
_: 3
|
|
35
49
|
}, 16, ["loading"]);
|
|
36
50
|
};
|
|
37
51
|
}
|
|
38
|
-
}),
|
|
52
|
+
}), s = [
|
|
39
53
|
{ name: "WtskBtn", component: _ }
|
|
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
|
+
s.forEach(({ name: e, component: o }) => {
|
|
60
|
+
t.component(e, o);
|
|
47
61
|
});
|
|
48
|
-
}
|
|
62
|
+
},
|
|
63
|
+
// 也提供按需导入的方法
|
|
64
|
+
...s.reduce((t, { name: e, component: o }) => (t[e] = o, t), {})
|
|
49
65
|
};
|
|
50
66
|
export {
|
|
67
|
+
_ as WtskBtn,
|
|
51
68
|
v as default
|
|
52
69
|
};
|
package/dist/wtsk-comps.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WtskComps={},t.Vue))})(this,(function(t,e){"use strict";const i=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 n=o,l=e.useAttrs(),s=e.ref(!1),f=e.computed(()=>({...Object.fromEntries(Object.entries(n).filter(([c])=>c!=="onClick")),...l}));async function u(){s.value=!0;try{typeof n.onClick=="function"&&await n.onClick?.()}finally{s.value=!1}}return(r,c)=>{const d=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(d,e.mergeProps(f.value,{loading:s.value,onClick:u}),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3},16,["loading"])}}}),a=[{name:"WtskBtn",component:i}],p={install(o){a.forEach(({name:n,component:l})=>{o.component(n,l)})},...a.reduce((o,{name:n,component:l})=>(o[n]=l,o),{})};t.WtskBtn=i,t.default=p,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wtsk-comps",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Vue3+Element Plus基础组件库(wtsk-btn/form/table/tree)",
|
|
5
5
|
"author": "lujh",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,11 +36,13 @@
|
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"dev": "vite",
|
|
39
|
-
"build": "vue-tsc
|
|
39
|
+
"build:types": "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json",
|
|
40
|
+
"build:js": "vite build",
|
|
41
|
+
"build": "npm run build:types && npm run build:js",
|
|
40
42
|
"prepublishOnly": "npm run build"
|
|
41
43
|
},
|
|
42
44
|
"dependencies": {
|
|
43
|
-
"element-plus": "2.11.3",
|
|
45
|
+
"element-plus": "^2.11.3",
|
|
44
46
|
"vue": "^3.5.24"
|
|
45
47
|
},
|
|
46
48
|
"devDependencies": {
|
|
@@ -50,6 +52,7 @@
|
|
|
50
52
|
"sass": "^1.97.3",
|
|
51
53
|
"typescript": "~5.9.3",
|
|
52
54
|
"vite": "^7.2.4",
|
|
55
|
+
"vite-plugin-dts": "^4.5.4",
|
|
53
56
|
"vue-tsc": "^3.1.4"
|
|
54
57
|
}
|
|
55
58
|
}
|