tutor-pro-ui-vue 1.0.16-beta → 1.0.18-beta
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.
|
@@ -1,25 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { unref as d, defineComponent as b, createVNode as h, resolveComponent as C } from "vue";
|
|
2
|
+
function a(e) {
|
|
3
|
+
return typeof e == "function" ? e() : d(e);
|
|
4
|
+
}
|
|
5
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
6
|
+
const f = () => {
|
|
7
|
+
};
|
|
8
|
+
function k(e, t) {
|
|
9
|
+
function n(...o) {
|
|
10
|
+
return new Promise((c, r) => {
|
|
11
|
+
Promise.resolve(e(() => t.apply(this, o), { fn: t, thisArg: this, args: o })).then(c).catch(r);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return n;
|
|
15
|
+
}
|
|
16
|
+
function x(e, t = {}) {
|
|
17
|
+
let n, o, c = f;
|
|
18
|
+
const r = (u) => {
|
|
19
|
+
clearTimeout(u), c(), c = f;
|
|
20
|
+
};
|
|
21
|
+
return (u) => {
|
|
22
|
+
const s = a(e), l = a(t.maxWait);
|
|
23
|
+
return n && r(n), s <= 0 || l !== void 0 && l <= 0 ? (o && (r(o), o = null), Promise.resolve(u())) : new Promise((i, m) => {
|
|
24
|
+
c = t.rejectOnCancel ? m : i, l && !o && (o = setTimeout(() => {
|
|
25
|
+
n && r(n), o = null, i(u());
|
|
26
|
+
}, l)), n = setTimeout(() => {
|
|
27
|
+
o && r(o), o = null, i(u());
|
|
28
|
+
}, s);
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function y(e, t = 200, n = {}) {
|
|
33
|
+
return k(
|
|
34
|
+
x(t, n),
|
|
35
|
+
e
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
const T = /* @__PURE__ */ b({
|
|
6
39
|
name: "CommonButton",
|
|
40
|
+
props: {
|
|
41
|
+
debounce: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 300
|
|
44
|
+
},
|
|
45
|
+
label: {
|
|
46
|
+
type: Function,
|
|
47
|
+
default: () => ""
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
emits: ["click"],
|
|
51
|
+
setup(e, {
|
|
52
|
+
emit: t
|
|
53
|
+
}) {
|
|
54
|
+
return {
|
|
55
|
+
debounceClick: y(() => {
|
|
56
|
+
t == null || t("click");
|
|
57
|
+
}, Number(e.debounce))
|
|
58
|
+
};
|
|
59
|
+
},
|
|
7
60
|
render() {
|
|
8
|
-
|
|
9
|
-
|
|
61
|
+
const {
|
|
62
|
+
label: e
|
|
63
|
+
} = this.$props;
|
|
64
|
+
return h(C("el-button"), {
|
|
65
|
+
onClick: this.debounceClick
|
|
10
66
|
}, {
|
|
11
|
-
default: () =>
|
|
67
|
+
default: () => {
|
|
68
|
+
var t, n;
|
|
69
|
+
return (e == null ? void 0 : e()) || ((n = (t = this.$slots).default) == null ? void 0 : n.call(t));
|
|
70
|
+
}
|
|
12
71
|
});
|
|
13
72
|
}
|
|
14
|
-
}),
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
73
|
+
}), w = (e, t) => (e.install = (n) => {
|
|
74
|
+
for (const o of [e, ...Object.values({})])
|
|
75
|
+
n.component(o.name, o);
|
|
76
|
+
}, e), F = w(T), p = {
|
|
77
|
+
CommonButton: F
|
|
78
|
+
}, P = (e) => {
|
|
79
|
+
for (const t in p)
|
|
80
|
+
e.component(t, p[t]);
|
|
81
|
+
}, W = (e) => {
|
|
82
|
+
P(e);
|
|
83
|
+
}, N = { install: W };
|
|
22
84
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
85
|
+
F as CommonButton,
|
|
86
|
+
N as default
|
|
25
87
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(u,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(u=typeof globalThis<"u"?globalThis:u||self,i(u["tutor-pro-ui-vue"]={},u.Vue))})(this,function(u,i){"use strict";function a(e){return typeof e=="function"?e():i.unref(e)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const d=()=>{};function h(e,t){function n(...o){return new Promise((c,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(c).catch(r)})}return n}function C(e,t={}){let n,o,c=d;const r=l=>{clearTimeout(l),c(),c=d};return l=>{const b=a(e),s=a(t.maxWait);return n&&r(n),b<=0||s!==void 0&&s<=0?(o&&(r(o),o=null),Promise.resolve(l())):new Promise((f,x)=>{c=t.rejectOnCancel?x:f,s&&!o&&(o=setTimeout(()=>{n&&r(n),o=null,f(l())},s)),n=setTimeout(()=>{o&&r(o),o=null,f(l())},b)})}}function y(e,t=200,n={}){return h(C(t,n),e)}const p=((e,t)=>(e.install=n=>{for(const o of[e,...Object.values({})])n.component(o.name,o)},e))(i.defineComponent({name:"CommonButton",props:{debounce:{type:Number,default:300},label:{type:Function,default:()=>""}},emits:["click"],setup(e,{emit:t}){return{debounceClick:y(()=>{t==null||t("click")},Number(e.debounce))}},render(){const{label:e}=this.$props;return i.createVNode(i.resolveComponent("el-button"),{onClick:this.debounceClick},{default:()=>{var t,n;return(e==null?void 0:e())||((n=(t=this.$slots).default)==null?void 0:n.call(t))}})}})),m={CommonButton:p},T=e=>{for(const t in m)e.component(t,m[t])},k={install:e=>{T(e)}};u.CommonButton=p,u.default=k,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,58 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "tutor-pro-ui-vue",
|
|
3
|
-
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "
|
|
7
|
-
"module": "
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"docs:
|
|
24
|
-
"docs:
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
31
|
-
"commitizen": "^4.3.1",
|
|
32
|
-
"element-plus": "^2.9.1",
|
|
33
|
-
"husky": "^9.1.7",
|
|
34
|
-
"path": "^0.12.7",
|
|
35
|
-
"
|
|
36
|
-
"vue-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "tutor-pro-ui-vue",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.0.18-beta",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/tutor-pro-ui-vue.es.js",
|
|
7
|
+
"module": "dist/tutor-pro-ui-vue.es.js",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/tutor-pro-ui-vue.es.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"dev": "vite",
|
|
18
|
+
"build": "vue-tsc -b && vite build",
|
|
19
|
+
"preview": "vite preview",
|
|
20
|
+
"eslint": "npx eslint src/**",
|
|
21
|
+
"commit": "git-cz",
|
|
22
|
+
"docs:dev": "vitepress dev docs",
|
|
23
|
+
"docs:build": "vitepress build docs",
|
|
24
|
+
"docs:preview": "vitepress preview docs",
|
|
25
|
+
"release": "npm publish"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@types/node": "^22.10.1",
|
|
29
|
+
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
|
30
|
+
"@vueuse/core": "^12.2.0",
|
|
31
|
+
"commitizen": "^4.3.1",
|
|
32
|
+
"element-plus": "^2.9.1",
|
|
33
|
+
"husky": "^9.1.7",
|
|
34
|
+
"path": "^0.12.7",
|
|
35
|
+
"vite-plugin-compression": "^0.5.1",
|
|
36
|
+
"vite-plugin-vue-setup-extend": "^0.4.0",
|
|
37
|
+
"vue": "^3.5.13",
|
|
38
|
+
"vue-router": "^4.5.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@eslint/js": "^9.16.0",
|
|
42
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
43
|
+
"cz-git": "^1.11.0",
|
|
44
|
+
"eslint": "^9.16.0",
|
|
45
|
+
"eslint-plugin-vue": "^9.32.0",
|
|
46
|
+
"globals": "^15.13.0",
|
|
47
|
+
"less": "^4.2.1",
|
|
48
|
+
"typescript": "~5.6.2",
|
|
49
|
+
"typescript-eslint": "^8.18.0",
|
|
50
|
+
"vite": "^6.0.1",
|
|
51
|
+
"vite-plugin-dts": "^4.3.0",
|
|
52
|
+
"vitepress": "^1.5.0",
|
|
53
|
+
"vue-tsc": "^2.1.10"
|
|
54
|
+
},
|
|
55
|
+
"config": {
|
|
56
|
+
"commitizen": {
|
|
57
|
+
"path": "node_modules/cz-git"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
package/dist/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),c=(t,e)=>(t.install=u=>{for(const n of[t,...Object.values({})])u.component(n.name,n)},t),l=o.defineComponent({name:"CommonButton",render(){return o.createVNode(o.resolveComponent("el-button"),{type:"primary"},{default:()=>[o.createTextVNode("CommonButton")]})}}),s=c(l),r={CommonButton:s},m=t=>{for(const e in r)t.component(e,r[e])},a=t=>{m(t)};exports.CommonButton=s;exports.default=a;
|