tutor-pro-ui-vue 1.0.32-beta → 1.0.35-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 +1 -0
- package/dist/index.js +1 -87
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/index.d.ts +8 -0
- package/package.json +3 -3
- package/dist/index.umd.cjs +0 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,87 +1 @@
|
|
|
1
|
-
|
|
2
|
-
function m(e) {
|
|
3
|
-
return typeof e == "function" ? e() : b(e);
|
|
4
|
-
}
|
|
5
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
6
|
-
const f = () => {
|
|
7
|
-
};
|
|
8
|
-
function P(e, n) {
|
|
9
|
-
function o(...t) {
|
|
10
|
-
return new Promise((l, c) => {
|
|
11
|
-
Promise.resolve(e(() => n.apply(this, t), { fn: n, thisArg: this, args: t })).then(l).catch(c);
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
return o;
|
|
15
|
-
}
|
|
16
|
-
function S(e, n = {}) {
|
|
17
|
-
let o, t, l = f;
|
|
18
|
-
const c = (r) => {
|
|
19
|
-
clearTimeout(r), l(), l = f;
|
|
20
|
-
};
|
|
21
|
-
return (r) => {
|
|
22
|
-
const u = m(e), i = m(n.maxWait);
|
|
23
|
-
return o && c(o), u <= 0 || i !== void 0 && i <= 0 ? (t && (c(t), t = null), Promise.resolve(r())) : new Promise((a, C) => {
|
|
24
|
-
l = n.rejectOnCancel ? C : a, i && !t && (t = setTimeout(() => {
|
|
25
|
-
o && c(o), t = null, a(r());
|
|
26
|
-
}, i)), o = setTimeout(() => {
|
|
27
|
-
t && c(t), t = null, a(r());
|
|
28
|
-
}, u);
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function W(e, n = 200, o = {}) {
|
|
33
|
-
return P(
|
|
34
|
-
S(n, o),
|
|
35
|
-
e
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
const j = k({
|
|
39
|
-
name: "CommonButton"
|
|
40
|
-
}), D = /* @__PURE__ */ k({
|
|
41
|
-
...j,
|
|
42
|
-
props: {
|
|
43
|
-
debounce: {
|
|
44
|
-
type: Number,
|
|
45
|
-
default: 300
|
|
46
|
-
},
|
|
47
|
-
label: {
|
|
48
|
-
type: Function,
|
|
49
|
-
default: () => ""
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
emits: ["click"],
|
|
53
|
-
setup(e, { emit: n }) {
|
|
54
|
-
const o = e, t = n, l = W(() => {
|
|
55
|
-
t == null || t("click");
|
|
56
|
-
}, Number(o.debounce));
|
|
57
|
-
return (c, p) => {
|
|
58
|
-
const r = h("el-button");
|
|
59
|
-
return s(), y(r, { onClick: b(l) }, {
|
|
60
|
-
default: x(() => {
|
|
61
|
-
var u, i;
|
|
62
|
-
return [
|
|
63
|
-
(u = e.label) != null && u.call(e) ? (s(), T(w, { key: 0 }, [
|
|
64
|
-
B(F((i = e.label) == null ? void 0 : i.call(e)), 1)
|
|
65
|
-
], 64)) : g(c.$slots, "default", { key: 1 })
|
|
66
|
-
];
|
|
67
|
-
}),
|
|
68
|
-
_: 3
|
|
69
|
-
}, 8, ["onClick"]);
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
}), N = (e, n) => (e.install = (o) => {
|
|
73
|
-
for (const t of [e, ...Object.values({})])
|
|
74
|
-
o.component(t.name, t);
|
|
75
|
-
}, e), O = N(D), A = (e) => e, d = {
|
|
76
|
-
CommonButton: O
|
|
77
|
-
}, G = (e) => {
|
|
78
|
-
for (const n in d)
|
|
79
|
-
e.component(n, d[n]);
|
|
80
|
-
}, V = (e) => {
|
|
81
|
-
G(e);
|
|
82
|
-
}, E = { install: V };
|
|
83
|
-
export {
|
|
84
|
-
O as CommonButton,
|
|
85
|
-
E as default,
|
|
86
|
-
A as getOptionsLabel
|
|
87
|
-
};
|
|
1
|
+
(function(l,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(l=typeof globalThis<"u"?globalThis:l||self,n(l["tutor-pro-ui-vue"]={},l.Vue))})(this,function(l,n){"use strict";function m(e){return typeof e=="function"?e():n.unref(e)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const d=()=>{};function h(e,o){function c(...t){return new Promise((r,i)=>{Promise.resolve(e(()=>o.apply(this,t),{fn:o,thisArg:this,args:t})).then(r).catch(i)})}return c}function y(e,o={}){let c,t,r=d;const i=u=>{clearTimeout(u),r(),r=d};return u=>{const a=m(e),s=m(o.maxWait);return c&&i(c),a<=0||s!==void 0&&s<=0?(t&&(i(t),t=null),Promise.resolve(u())):new Promise((f,S)=>{r=o.rejectOnCancel?S:f,s&&!t&&(t=setTimeout(()=>{c&&i(c),t=null,f(u())},s)),c=setTimeout(()=>{t&&i(t),t=null,f(u())},a)})}}function k(e,o=200,c={}){return h(y(o,c),e)}const C=n.defineComponent({name:"CommonButton"}),T=n.defineComponent({...C,props:{debounce:{type:Number,default:300},label:{type:Function,default:()=>""}},emits:["click"],setup(e,{emit:o}){const c=e,t=o,r=k(()=>{t==null||t("click")},Number(c.debounce));return(i,w)=>{const u=n.resolveComponent("el-button");return n.openBlock(),n.createBlock(u,{onClick:n.unref(r)},{default:n.withCtx(()=>{var a,s;return[(a=e.label)!=null&&a.call(e)?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString((s=e.label)==null?void 0:s.call(e)),1)],64)):n.renderSlot(i.$slots,"default",{key:1})]}),_:3},8,["onClick"])}}}),b=((e,o)=>(e.install=c=>{for(const t of[e,...Object.values({})])c.component(t.name,t)},e))(T),p={CommonButton:b},x=e=>{for(const o in p)e.component(o,p[o])},B=e=>{x(e)};l.CommonButton=b,l.install=B,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tutor-pro-ui-vue",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.35-beta",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"module": "dist/index.js",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
package/dist/index.umd.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(i,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(i=typeof globalThis<"u"?globalThis:i||self,n(i["tutor-pro-ui-vue"]={},i.Vue))})(this,function(i,n){"use strict";function m(e){return typeof e=="function"?e():n.unref(e)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const d=()=>{};function h(e,o){function l(...t){return new Promise((r,c)=>{Promise.resolve(e(()=>o.apply(this,t),{fn:o,thisArg:this,args:t})).then(r).catch(c)})}return l}function k(e,o={}){let l,t,r=d;const c=u=>{clearTimeout(u),r(),r=d};return u=>{const a=m(e),s=m(o.maxWait);return l&&c(l),a<=0||s!==void 0&&s<=0?(t&&(c(t),t=null),Promise.resolve(u())):new Promise((f,S)=>{r=o.rejectOnCancel?S:f,s&&!t&&(t=setTimeout(()=>{l&&c(l),t=null,f(u())},s)),l=setTimeout(()=>{t&&c(t),t=null,f(u())},a)})}}function y(e,o=200,l={}){return h(k(o,l),e)}const C=n.defineComponent({name:"CommonButton"}),T=n.defineComponent({...C,props:{debounce:{type:Number,default:300},label:{type:Function,default:()=>""}},emits:["click"],setup(e,{emit:o}){const l=e,t=o,r=y(()=>{t==null||t("click")},Number(l.debounce));return(c,w)=>{const u=n.resolveComponent("el-button");return n.openBlock(),n.createBlock(u,{onClick:n.unref(r)},{default:n.withCtx(()=>{var a,s;return[(a=e.label)!=null&&a.call(e)?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString((s=e.label)==null?void 0:s.call(e)),1)],64)):n.renderSlot(c.$slots,"default",{key:1})]}),_:3},8,["onClick"])}}}),b=((e,o)=>(e.install=l=>{for(const t of[e,...Object.values({})])l.component(t.name,t)},e))(T),x=e=>e,p={CommonButton:b},B=e=>{for(const o in p)e.component(o,p[o])},g={install:e=>{B(e)}};i.CommonButton=b,i.default=g,i.getOptionsLabel=x,Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|