tutor-pro-ui-vue 1.0.27-beta → 1.0.29-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.
- package/dist/index.d.ts +6 -10
- package/dist/index.js +41 -149
- package/dist/index.umd.cjs +1 -5
- package/dist/src/components/CommonButton/index.d.ts +5 -0
- package/dist/src/components/CommonButton/src/index.d.ts +27 -0
- package/dist/src/components/CommonButton/src/types.d.ts +6 -0
- package/dist/src/components/CommonButtonGroup/index.d.ts +4 -0
- package/dist/src/components/CommonButtonGroup/src/index.d.ts +18 -0
- package/dist/src/components/index.d.ts +10 -0
- package/package.json +1 -1
- /package/dist/{components.d.ts → src/components/components.d.ts} +0 -0
- /package/dist/{types.d.ts → src/components/types.d.ts} +0 -0
- /package/dist/{typescript.d.ts → src/components/typescript.d.ts} +0 -0
- /package/dist/{withInstall.d.ts → src/components/withInstall.d.ts} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
install: any;
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
10
|
-
export * from './types';
|
|
1
|
+
export * from './src/components/index'
|
|
2
|
+
export {}
|
|
3
|
+
import TutorProUiVue from './src/components/index'
|
|
4
|
+
export default TutorProUiVue
|
|
5
|
+
export * from './src/components/index'
|
|
6
|
+
export {}
|
package/dist/index.js
CHANGED
|
@@ -1,148 +1,41 @@
|
|
|
1
|
-
import { unref as
|
|
2
|
-
function
|
|
3
|
-
return typeof e == "function" ? e() :
|
|
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
4
|
}
|
|
5
5
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
6
6
|
const f = () => {
|
|
7
7
|
};
|
|
8
|
-
function
|
|
9
|
-
function
|
|
10
|
-
return new Promise((
|
|
11
|
-
Promise.resolve(e(() => t.apply(this,
|
|
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
12
|
});
|
|
13
13
|
}
|
|
14
|
-
return
|
|
14
|
+
return n;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
let
|
|
18
|
-
const r = (
|
|
19
|
-
clearTimeout(
|
|
16
|
+
function x(e, t = {}) {
|
|
17
|
+
let n, o, c = f;
|
|
18
|
+
const r = (l) => {
|
|
19
|
+
clearTimeout(l), c(), c = f;
|
|
20
20
|
};
|
|
21
|
-
return (
|
|
22
|
-
const s =
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
21
|
+
return (l) => {
|
|
22
|
+
const s = a(e), u = a(t.maxWait);
|
|
23
|
+
return n && r(n), s <= 0 || u !== void 0 && u <= 0 ? (o && (r(o), o = null), Promise.resolve(l())) : new Promise((i, p) => {
|
|
24
|
+
c = t.rejectOnCancel ? p : i, u && !o && (o = setTimeout(() => {
|
|
25
|
+
n && r(n), o = null, i(l());
|
|
26
|
+
}, u)), n = setTimeout(() => {
|
|
27
|
+
o && r(o), o = null, i(l());
|
|
28
28
|
}, s);
|
|
29
29
|
});
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return
|
|
34
|
-
|
|
32
|
+
function y(e, t = 200, n = {}) {
|
|
33
|
+
return k(
|
|
34
|
+
x(t, n),
|
|
35
35
|
e
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
* @vue/shared v3.5.13
|
|
40
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
41
|
-
* @license MIT
|
|
42
|
-
**/
|
|
43
|
-
process.env.NODE_ENV !== "production" && Object.freeze({});
|
|
44
|
-
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
45
|
-
const E = Object.prototype.hasOwnProperty, m = (e, t) => E.call(e, t), v = (e) => e !== null && typeof e == "object";
|
|
46
|
-
function L(e) {
|
|
47
|
-
for (var t = -1, o = e == null ? 0 : e.length, n = {}; ++t < o; ) {
|
|
48
|
-
var a = e[t];
|
|
49
|
-
n[a[0]] = a[1];
|
|
50
|
-
}
|
|
51
|
-
return n;
|
|
52
|
-
}
|
|
53
|
-
const h = "__epPropKey", _ = (e) => e, F = (e) => v(e) && !!e[h], w = (e, t) => {
|
|
54
|
-
if (!v(e) || F(e))
|
|
55
|
-
return e;
|
|
56
|
-
const { values: o, required: n, default: a, type: r, validator: p } = e, s = {
|
|
57
|
-
type: r,
|
|
58
|
-
required: !!n,
|
|
59
|
-
validator: o || p ? (i) => {
|
|
60
|
-
let l = !1, u = [];
|
|
61
|
-
if (o && (u = Array.from(o), m(e, "default") && u.push(a), l || (l = u.includes(i))), p && (l || (l = p(i))), !l && u.length > 0) {
|
|
62
|
-
const B = [...new Set(u)].map((P) => JSON.stringify(P)).join(", ");
|
|
63
|
-
x(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${B}], got value ${JSON.stringify(i)}.`);
|
|
64
|
-
}
|
|
65
|
-
return l;
|
|
66
|
-
} : void 0,
|
|
67
|
-
[h]: !0
|
|
68
|
-
};
|
|
69
|
-
return m(e, "default") && (s.default = a), s;
|
|
70
|
-
}, $ = (e) => L(Object.entries(e).map(([t, o]) => [
|
|
71
|
-
t,
|
|
72
|
-
w(o, t)
|
|
73
|
-
])), D = ["", "default", "small", "large"], I = w({
|
|
74
|
-
type: String,
|
|
75
|
-
values: D,
|
|
76
|
-
required: !1
|
|
77
|
-
});
|
|
78
|
-
/*! Element Plus Icons Vue v2.3.1 */
|
|
79
|
-
var W = /* @__PURE__ */ g({
|
|
80
|
-
name: "Loading",
|
|
81
|
-
__name: "loading",
|
|
82
|
-
setup(e) {
|
|
83
|
-
return (t, o) => (S(), j("svg", {
|
|
84
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
85
|
-
viewBox: "0 0 1024 1024"
|
|
86
|
-
}, [
|
|
87
|
-
T("path", {
|
|
88
|
-
fill: "currentColor",
|
|
89
|
-
d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.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 0m-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"
|
|
90
|
-
})
|
|
91
|
-
]));
|
|
92
|
-
}
|
|
93
|
-
}), q = W;
|
|
94
|
-
const b = _([
|
|
95
|
-
String,
|
|
96
|
-
Object,
|
|
97
|
-
Function
|
|
98
|
-
]), M = [
|
|
99
|
-
"default",
|
|
100
|
-
"primary",
|
|
101
|
-
"success",
|
|
102
|
-
"warning",
|
|
103
|
-
"info",
|
|
104
|
-
"danger",
|
|
105
|
-
"text",
|
|
106
|
-
""
|
|
107
|
-
], A = ["button", "submit", "reset"], G = $({
|
|
108
|
-
size: I,
|
|
109
|
-
disabled: Boolean,
|
|
110
|
-
type: {
|
|
111
|
-
type: String,
|
|
112
|
-
values: M,
|
|
113
|
-
default: ""
|
|
114
|
-
},
|
|
115
|
-
icon: {
|
|
116
|
-
type: b
|
|
117
|
-
},
|
|
118
|
-
nativeType: {
|
|
119
|
-
type: String,
|
|
120
|
-
values: A,
|
|
121
|
-
default: "button"
|
|
122
|
-
},
|
|
123
|
-
loading: Boolean,
|
|
124
|
-
loadingIcon: {
|
|
125
|
-
type: b,
|
|
126
|
-
default: () => q
|
|
127
|
-
},
|
|
128
|
-
plain: Boolean,
|
|
129
|
-
text: Boolean,
|
|
130
|
-
link: Boolean,
|
|
131
|
-
bg: Boolean,
|
|
132
|
-
autofocus: Boolean,
|
|
133
|
-
round: Boolean,
|
|
134
|
-
circle: Boolean,
|
|
135
|
-
color: String,
|
|
136
|
-
dark: Boolean,
|
|
137
|
-
autoInsertSpace: {
|
|
138
|
-
type: Boolean,
|
|
139
|
-
default: void 0
|
|
140
|
-
},
|
|
141
|
-
tag: {
|
|
142
|
-
type: _([String, Object]),
|
|
143
|
-
default: "button"
|
|
144
|
-
}
|
|
145
|
-
}), H = /* @__PURE__ */ g({
|
|
38
|
+
const T = /* @__PURE__ */ b({
|
|
146
39
|
name: "CommonButton",
|
|
147
40
|
props: {
|
|
148
41
|
debounce: {
|
|
@@ -152,41 +45,40 @@ const b = _([
|
|
|
152
45
|
label: {
|
|
153
46
|
type: Function,
|
|
154
47
|
default: () => ""
|
|
155
|
-
}
|
|
156
|
-
...G
|
|
48
|
+
}
|
|
157
49
|
},
|
|
158
50
|
emits: ["click"],
|
|
159
51
|
setup(e, {
|
|
160
52
|
emit: t
|
|
161
53
|
}) {
|
|
162
54
|
return {
|
|
163
|
-
debounceClick:
|
|
55
|
+
debounceClick: y(() => {
|
|
164
56
|
t == null || t("click");
|
|
165
57
|
}, Number(e.debounce))
|
|
166
58
|
};
|
|
167
59
|
},
|
|
168
60
|
render() {
|
|
169
|
-
return C(
|
|
61
|
+
return h(C("el-button"), {
|
|
170
62
|
onClick: this.debounceClick
|
|
171
63
|
}, {
|
|
172
64
|
default: () => {
|
|
173
|
-
var e, t,
|
|
174
|
-
return ((e = this.label) == null ? void 0 : e.call(this)) || ((
|
|
65
|
+
var e, t, n;
|
|
66
|
+
return ((e = this.label) == null ? void 0 : e.call(this)) || ((n = (t = this.$slots).default) == null ? void 0 : n.call(t));
|
|
175
67
|
}
|
|
176
68
|
});
|
|
177
69
|
}
|
|
178
|
-
}),
|
|
179
|
-
for (const
|
|
180
|
-
|
|
181
|
-
}, e),
|
|
182
|
-
CommonButton:
|
|
183
|
-
},
|
|
184
|
-
for (const t in
|
|
185
|
-
e.component(t,
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
},
|
|
70
|
+
}), w = (e, t) => (e.install = (n) => {
|
|
71
|
+
for (const o of [e, ...Object.values({})])
|
|
72
|
+
n.component(o.name, o);
|
|
73
|
+
}, e), F = w(T), m = {
|
|
74
|
+
CommonButton: F
|
|
75
|
+
}, P = (e) => {
|
|
76
|
+
for (const t in m)
|
|
77
|
+
e.component(t, m[t]);
|
|
78
|
+
}, W = (e) => {
|
|
79
|
+
P(e);
|
|
80
|
+
}, N = { install: W };
|
|
189
81
|
export {
|
|
190
|
-
|
|
191
|
-
|
|
82
|
+
F as CommonButton,
|
|
83
|
+
N as default
|
|
192
84
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
(function(i
|
|
2
|
-
* @vue/shared v3.5.13
|
|
3
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
-
* @license MIT
|
|
5
|
-
**/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const j=Object.prototype.hasOwnProperty,y=(e,t)=>j.call(e,t),g=e=>e!==null&&typeof e=="object";function x(e){for(var t=-1,n=e==null?0:e.length,o={};++t<n;){var l=e[t];o[l[0]]=l[1]}return o}const h="__epPropKey",v=e=>e,C=e=>g(e)&&!!e[h],_=(e,t)=>{if(!g(e)||C(e))return e;const{values:n,required:o,default:l,type:u,validator:f}=e,p={type:u,required:!!o,validator:n||f?s=>{let r=!1,c=[];if(n&&(c=Array.from(n),y(e,"default")&&c.push(l),r||(r=c.includes(s))),f&&(r||(r=f(s))),!r&&c.length>0){const M=[...new Set(c)].map($=>JSON.stringify($)).join(", ");a.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${M}], got value ${JSON.stringify(s)}.`)}return r}:void 0,[h]:!0};return y(e,"default")&&(p.default=l),p},N=e=>x(Object.entries(e).map(([t,n])=>[t,_(n,t)])),V=_({type:String,values:["","default","small","large"],required:!1});/*! Element Plus Icons Vue v2.3.1 */var k=a.defineComponent({name:"Loading",__name:"loading",setup(e){return(t,n)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.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 0m-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"})]))}}),z=k;const w=v([String,Object,Function]),E=N({size:V,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:w},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:w,default:()=>z},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:v([String,Object]),default:"button"}}),L=a.defineComponent({name:"CommonButton",props:{debounce:{type:Number,default:300},label:{type:Function,default:()=>""},...E},emits:["click"],setup(e,{emit:t}){return{debounceClick:T(()=>{t==null||t("click")},Number(e.debounce))}},render(){return a.createVNode(a.resolveComponent("el-button"),{onClick:this.debounceClick},{default:()=>{var e,t,n;return((e=this.label)==null?void 0:e.call(this))||((n=(t=this.$slots).default)==null?void 0:n.call(t))}})}}),B=((e,t)=>(e.install=n=>{for(const o of[e,...Object.values({})])n.component(o.name,o)},e))(L),P={CommonButton:B},F=e=>{for(const t in P)e.component(t,P[t])},I={install:e=>{F(e)}};i.CommonButton=B,i.default=I,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
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((l,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(l).catch(r)})}return n}function C(e,t={}){let n,o,l=d;const r=c=>{clearTimeout(c),l(),l=d};return c=>{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(c())):new Promise((f,x)=>{l=t.rejectOnCancel?x:f,s&&!o&&(o=setTimeout(()=>{n&&r(n),o=null,f(c())},s)),n=setTimeout(()=>{o&&r(o),o=null,f(c())},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(){return i.createVNode(i.resolveComponent("el-button"),{onClick:this.debounceClick},{default:()=>{var e,t,n;return((e=this.label)==null?void 0:e.call(this))||((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"}})});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
debounce: {
|
|
3
|
+
type: NumberConstructor;
|
|
4
|
+
default: number;
|
|
5
|
+
};
|
|
6
|
+
label: {
|
|
7
|
+
type: FunctionConstructor;
|
|
8
|
+
default: () => string;
|
|
9
|
+
};
|
|
10
|
+
}>, {
|
|
11
|
+
debounceClick: import('@vueuse/core').PromisifyFn<() => void>;
|
|
12
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "click"[], "click", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
13
|
+
debounce: {
|
|
14
|
+
type: NumberConstructor;
|
|
15
|
+
default: number;
|
|
16
|
+
};
|
|
17
|
+
label: {
|
|
18
|
+
type: FunctionConstructor;
|
|
19
|
+
default: () => string;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{
|
|
22
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
debounce: number;
|
|
25
|
+
label: Function;
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
debounce: {
|
|
3
|
+
type: NumberConstructor;
|
|
4
|
+
default: number;
|
|
5
|
+
};
|
|
6
|
+
}>, {
|
|
7
|
+
debounceClick: import('@vueuse/core').PromisifyFn<() => void>;
|
|
8
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "click"[], "click", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
9
|
+
debounce: {
|
|
10
|
+
type: NumberConstructor;
|
|
11
|
+
default: number;
|
|
12
|
+
};
|
|
13
|
+
}>> & Readonly<{
|
|
14
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
debounce: number;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
export default _default;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|