vue3-pull-refresh 1.0.2 → 1.0.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/index.d.ts +72 -2
- package/dist/index.es.js +83 -82
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +6 -5
- package/dist/PullRefresh.vue.d.ts +0 -73
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,73 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { DefineComponent } from 'vue';
|
|
4
|
+
import { PublicProps } from 'vue';
|
|
5
|
+
|
|
6
|
+
declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
7
|
+
"update:modelValue": (v: boolean) => any;
|
|
8
|
+
refresh: () => any;
|
|
9
|
+
}, string, PublicProps, Readonly<Props> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
|
|
11
|
+
onRefresh?: (() => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
modelValue: boolean;
|
|
14
|
+
pullingText: string;
|
|
15
|
+
loosingText: string;
|
|
16
|
+
loadingText: string;
|
|
17
|
+
headerHeight: number;
|
|
18
|
+
animationDuration: number;
|
|
19
|
+
damping: number;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
22
|
+
rootRef: HTMLDivElement;
|
|
23
|
+
scrollerRef: HTMLDivElement;
|
|
24
|
+
}, HTMLDivElement>;
|
|
25
|
+
|
|
26
|
+
declare function __VLS_template(): {
|
|
27
|
+
attrs: Partial<{}>;
|
|
28
|
+
slots: {
|
|
29
|
+
header?(_: {
|
|
30
|
+
status: PullStatus;
|
|
31
|
+
distance: number;
|
|
32
|
+
}): any;
|
|
33
|
+
default?(_: {}): any;
|
|
34
|
+
};
|
|
35
|
+
refs: {
|
|
36
|
+
rootRef: HTMLDivElement;
|
|
37
|
+
scrollerRef: HTMLDivElement;
|
|
38
|
+
};
|
|
39
|
+
rootEl: HTMLDivElement;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
43
|
+
|
|
44
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
51
|
+
export default _default;
|
|
52
|
+
|
|
53
|
+
declare interface Props {
|
|
54
|
+
modelValue: boolean;
|
|
55
|
+
pullingText?: string;
|
|
56
|
+
loosingText?: string;
|
|
57
|
+
loadingText?: string;
|
|
58
|
+
headerHeight?: number;
|
|
59
|
+
animationDuration?: number;
|
|
60
|
+
damping?: number;
|
|
61
|
+
disabled?: boolean;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare type PullStatus = 'normal' | 'pulling' | 'loosing' | 'loading';
|
|
65
|
+
|
|
66
|
+
export { }
|
|
2
67
|
|
|
3
|
-
|
|
68
|
+
|
|
69
|
+
declare module 'vue' {
|
|
70
|
+
interface GlobalComponents {
|
|
71
|
+
PullRefresh: typeof PullRefresh;
|
|
72
|
+
}
|
|
73
|
+
}
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as S, ref as T, reactive as y, computed as w, watch as B, onMounted as D, onBeforeUnmount as $, createElementBlock as E, openBlock as M, createElementVNode as h, normalizeStyle as V, createCommentVNode as C, renderSlot as L, toDisplayString as P, normalizeClass as z } from "vue";
|
|
2
|
+
const K = { class: "vpr-pull-refresh__header__txt" }, N = /* @__PURE__ */ S({
|
|
3
3
|
__name: "PullRefresh",
|
|
4
4
|
props: {
|
|
5
5
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -8,116 +8,117 @@ const P = { class: "vpr-pull-refresh__header__txt" }, C = /* @__PURE__ */ k({
|
|
|
8
8
|
loadingText: { default: "加载中..." },
|
|
9
9
|
headerHeight: { default: 64 },
|
|
10
10
|
animationDuration: { default: 200 },
|
|
11
|
+
damping: { default: 0.6 },
|
|
11
12
|
disabled: { type: Boolean, default: !1 }
|
|
12
13
|
},
|
|
13
14
|
emits: ["update:modelValue", "refresh"],
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
15
|
+
setup(d, { emit: p }) {
|
|
16
|
+
const n = T(), u = T(), t = d, m = p, f = y({
|
|
16
17
|
scrollerTransition: "",
|
|
17
|
-
scrollerTranslate: ""
|
|
18
|
-
|
|
19
|
-
headerTranslate: ""
|
|
20
|
-
}), t = T({
|
|
18
|
+
scrollerTranslate: ""
|
|
19
|
+
}), s = y({
|
|
21
20
|
status: "normal",
|
|
22
21
|
startY: 0,
|
|
23
22
|
pulling: !1,
|
|
24
23
|
distance: 0
|
|
25
|
-
}),
|
|
26
|
-
switch (
|
|
24
|
+
}), Y = w(() => {
|
|
25
|
+
switch (s.status) {
|
|
27
26
|
case "loading":
|
|
28
|
-
return
|
|
27
|
+
return t.loadingText;
|
|
29
28
|
case "loosing":
|
|
30
|
-
return
|
|
29
|
+
return t.loosingText;
|
|
31
30
|
case "pulling":
|
|
32
|
-
return
|
|
31
|
+
return t.pullingText;
|
|
33
32
|
default:
|
|
34
|
-
return
|
|
33
|
+
return t.pullingText;
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
|
-
function
|
|
38
|
-
const
|
|
39
|
-
|
|
36
|
+
function H(e) {
|
|
37
|
+
const a = t.headerHeight, o = Math.max(0, e);
|
|
38
|
+
if (o <= a) return o;
|
|
39
|
+
const c = o - a, R = 1 + t.damping * 1 / a * c;
|
|
40
|
+
return a + c / R;
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
-
|
|
42
|
+
function l(e, a = !1) {
|
|
43
|
+
s.distance = Math.max(0, e), f.scrollerTransition = a ? `transform ${t.animationDuration}ms ease` : "none", f.scrollerTranslate = `translate3d(0, ${s.distance}px, 0)`;
|
|
43
44
|
}
|
|
44
|
-
function i(e,
|
|
45
|
-
|
|
46
|
-
t.status = "loading";
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
e >= a.headerHeight ? t.status = "loosing" : e > 0 ? t.status = "pulling" : t.status = "normal";
|
|
45
|
+
function i(e, a) {
|
|
46
|
+
a ? s.status = "loading" : e >= t.headerHeight ? s.status = "loosing" : e > 0 ? s.status = "pulling" : s.status = "normal";
|
|
50
47
|
}
|
|
51
|
-
function
|
|
52
|
-
|
|
48
|
+
function v(e) {
|
|
49
|
+
t.modelValue || t.disabled || u.value && u.value.scrollTop <= 0 && (s.pulling = !0, s.startY = e, l(0, !1), i(0, !1));
|
|
53
50
|
}
|
|
54
|
-
function
|
|
55
|
-
if (!t.
|
|
56
|
-
const o = e -
|
|
51
|
+
function g(e, a) {
|
|
52
|
+
if (!s.pulling || t.modelValue || t.disabled) return;
|
|
53
|
+
const o = e - s.startY;
|
|
57
54
|
if (o > 0) {
|
|
58
|
-
const
|
|
59
|
-
|
|
55
|
+
const c = H(o);
|
|
56
|
+
a == null || a.preventDefault(), l(c, !1), i(c, !1);
|
|
60
57
|
} else
|
|
61
|
-
|
|
58
|
+
l(0, !0), s.status = "normal";
|
|
62
59
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
60
|
+
function r() {
|
|
61
|
+
s.pulling && (t.modelValue || t.disabled || (s.distance >= t.headerHeight ? (l(t.headerHeight, !0), i(s.distance, !0), m("update:modelValue", !0), m("refresh"), s.pulling = !1) : (l(0, !0), i(0, !1))));
|
|
65
62
|
}
|
|
66
|
-
|
|
67
|
-
() =>
|
|
63
|
+
B(
|
|
64
|
+
() => t.modelValue,
|
|
68
65
|
(e) => {
|
|
69
|
-
e || (
|
|
66
|
+
e || (l(0, !0), i(0, !1));
|
|
70
67
|
}
|
|
71
68
|
);
|
|
72
|
-
const
|
|
73
|
-
return
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
const b = (e) => v(e.clientY), k = (e) => g(e.clientY, e), _ = (e) => v(e.touches[0].clientY), x = (e) => g(e.touches[0].clientY, e);
|
|
70
|
+
return D(() => {
|
|
71
|
+
const e = n.value;
|
|
72
|
+
e && (e.addEventListener("touchstart", _, { passive: !0 }), e.addEventListener("touchmove", x, { passive: !1 }), e.addEventListener("touchend", r, { passive: !0 }), e.addEventListener("touchcancel", r, { passive: !0 }));
|
|
73
|
+
}), $(() => {
|
|
74
|
+
const e = n.value;
|
|
75
|
+
e && (e.removeEventListener("touchstart", _), e.removeEventListener("touchmove", x), e.removeEventListener("touchend", r), e.removeEventListener("touchcancel", r));
|
|
76
|
+
}), (e, a) => (M(), E("div", {
|
|
77
|
+
ref_key: "rootRef",
|
|
78
|
+
ref: n,
|
|
76
79
|
class: "vpr-pull-refresh",
|
|
77
|
-
onMousedown:
|
|
78
|
-
onMousemove:
|
|
79
|
-
onMouseup:
|
|
80
|
-
onMouseleave:
|
|
81
|
-
onTouchstart: V,
|
|
82
|
-
onTouchmove: $,
|
|
83
|
-
onTouchend: d,
|
|
84
|
-
onTouchcancel: d
|
|
80
|
+
onMousedown: b,
|
|
81
|
+
onMousemove: k,
|
|
82
|
+
onMouseup: r,
|
|
83
|
+
onMouseleave: r
|
|
85
84
|
}, [
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
transform: n.headerTranslate,
|
|
92
|
-
transition: n.headerTransition
|
|
93
|
-
})
|
|
94
|
-
}, [
|
|
95
|
-
M(e.$slots, "header", {
|
|
96
|
-
status: t.status,
|
|
97
|
-
distance: t.distance
|
|
98
|
-
}, () => [
|
|
99
|
-
x("div", P, E(H.value), 1)
|
|
100
|
-
], !0)
|
|
101
|
-
], 4)) : b("", !0),
|
|
102
|
-
x("div", {
|
|
103
|
-
class: "vpr-pull-refresh__scroll",
|
|
104
|
-
ref_key: "scrollerRef",
|
|
105
|
-
ref: l,
|
|
106
|
-
style: y({
|
|
107
|
-
transform: n.scrollerTranslate,
|
|
108
|
-
transition: n.scrollerTransition
|
|
85
|
+
h("div", {
|
|
86
|
+
class: "vpr-pull-refresh-wrap",
|
|
87
|
+
style: V({
|
|
88
|
+
transform: f.scrollerTranslate,
|
|
89
|
+
transition: f.scrollerTransition
|
|
109
90
|
})
|
|
110
91
|
}, [
|
|
111
|
-
M(
|
|
92
|
+
t.disabled ? C("", !0) : (M(), E("div", {
|
|
93
|
+
key: 0,
|
|
94
|
+
class: "vpr-pull-refresh__header",
|
|
95
|
+
style: V({
|
|
96
|
+
height: t.headerHeight + "px"
|
|
97
|
+
})
|
|
98
|
+
}, [
|
|
99
|
+
L(e.$slots, "header", {
|
|
100
|
+
status: s.status,
|
|
101
|
+
distance: s.distance
|
|
102
|
+
}, () => [
|
|
103
|
+
h("div", K, P(Y.value), 1)
|
|
104
|
+
], !0)
|
|
105
|
+
], 4)),
|
|
106
|
+
h("div", {
|
|
107
|
+
class: z(["vpr-pull-refresh__scroll", s.status]),
|
|
108
|
+
ref_key: "scrollerRef",
|
|
109
|
+
ref: u
|
|
110
|
+
}, [
|
|
111
|
+
L(e.$slots, "default", {}, void 0, !0)
|
|
112
|
+
], 2)
|
|
112
113
|
], 4)
|
|
113
|
-
],
|
|
114
|
+
], 544));
|
|
114
115
|
}
|
|
115
|
-
}),
|
|
116
|
-
const
|
|
117
|
-
for (const [
|
|
118
|
-
|
|
119
|
-
return
|
|
120
|
-
},
|
|
116
|
+
}), O = (d, p) => {
|
|
117
|
+
const n = d.__vccOpts || d;
|
|
118
|
+
for (const [u, t] of p)
|
|
119
|
+
n[u] = t;
|
|
120
|
+
return n;
|
|
121
|
+
}, q = /* @__PURE__ */ O(N, [["__scopeId", "data-v-6d1a5bf2"]]);
|
|
121
122
|
export {
|
|
122
|
-
|
|
123
|
+
q as default
|
|
123
124
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(t,
|
|
1
|
+
(function(t,c){typeof exports=="object"&&typeof module<"u"?module.exports=c(require("vue")):typeof define=="function"&&define.amd?define(["vue"],c):(t=typeof globalThis<"u"?globalThis:t||self,t.Vue3PullRefresh=c(t.Vue))})(this,function(t){"use strict";const c={class:"vpr-pull-refresh__header__txt"};return((p,m)=>{const a=p.__vccOpts||p;for(const[u,s]of m)a[u]=s;return a})(t.defineComponent({__name:"PullRefresh",props:{modelValue:{type:Boolean,default:!1},pullingText:{default:"下拉即可刷新..."},loosingText:{default:"释放即可刷新..."},loadingText:{default:"加载中..."},headerHeight:{default:64},animationDuration:{default:200},damping:{default:.6},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","refresh"],setup(p,{emit:m}){const a=t.ref(),u=t.ref(),s=p,g=m,h=t.reactive({scrollerTransition:"",scrollerTranslate:""}),n=t.reactive({status:"normal",startY:0,pulling:!1,distance:0}),y=t.computed(()=>{switch(n.status){case"loading":return s.loadingText;case"loosing":return s.loosingText;case"pulling":return s.pullingText;default:return s.pullingText}});function E(e){const l=s.headerHeight,i=Math.max(0,e);if(i<=l)return i;const f=i-l,k=1+s.damping*1/l*f;return l+f/k}function r(e,l=!1){n.distance=Math.max(0,e),h.scrollerTransition=l?`transform ${s.animationDuration}ms ease`:"none",h.scrollerTranslate=`translate3d(0, ${n.distance}px, 0)`}function d(e,l){l?n.status="loading":e>=s.headerHeight?n.status="loosing":e>0?n.status="pulling":n.status="normal"}function _(e){s.modelValue||s.disabled||u.value&&u.value.scrollTop<=0&&(n.pulling=!0,n.startY=e,r(0,!1),d(0,!1))}function v(e,l){if(!n.pulling||s.modelValue||s.disabled)return;const i=e-n.startY;if(i>0){const f=E(i);l==null||l.preventDefault(),r(f,!1),d(f,!1)}else r(0,!0),n.status="normal"}function o(){n.pulling&&(s.modelValue||s.disabled||(n.distance>=s.headerHeight?(r(s.headerHeight,!0),d(n.distance,!0),g("update:modelValue",!0),g("refresh"),n.pulling=!1):(r(0,!0),d(0,!1))))}t.watch(()=>s.modelValue,e=>{e||(r(0,!0),d(0,!1))});const V=e=>_(e.clientY),M=e=>v(e.clientY,e),x=e=>_(e.touches[0].clientY),T=e=>v(e.touches[0].clientY,e);return t.onMounted(()=>{const e=a.value;e&&(e.addEventListener("touchstart",x,{passive:!0}),e.addEventListener("touchmove",T,{passive:!1}),e.addEventListener("touchend",o,{passive:!0}),e.addEventListener("touchcancel",o,{passive:!0}))}),t.onBeforeUnmount(()=>{const e=a.value;e&&(e.removeEventListener("touchstart",x),e.removeEventListener("touchmove",T),e.removeEventListener("touchend",o),e.removeEventListener("touchcancel",o))}),(e,l)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"rootRef",ref:a,class:"vpr-pull-refresh",onMousedown:V,onMousemove:M,onMouseup:o,onMouseleave:o},[t.createElementVNode("div",{class:"vpr-pull-refresh-wrap",style:t.normalizeStyle({transform:h.scrollerTranslate,transition:h.scrollerTransition})},[s.disabled?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:"vpr-pull-refresh__header",style:t.normalizeStyle({height:s.headerHeight+"px"})},[t.renderSlot(e.$slots,"header",{status:n.status,distance:n.distance},()=>[t.createElementVNode("div",c,t.toDisplayString(y.value),1)],!0)],4)),t.createElementVNode("div",{class:t.normalizeClass(["vpr-pull-refresh__scroll",n.status]),ref_key:"scrollerRef",ref:u},[t.renderSlot(e.$slots,"default",{},void 0,!0)],2)],4)],544))}}),[["__scopeId","data-v-6d1a5bf2"]])});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.vpr-pull-refresh[data-v-
|
|
1
|
+
.vpr-pull-refresh[data-v-6d1a5bf2]{position:relative;width:100%;height:100%;overflow:hidden;touch-action:pan-y}.vpr-pull-refresh-wrap[data-v-6d1a5bf2]{position:relative;width:100%;height:100%;will-change:transform}.vpr-pull-refresh__scroll[data-v-6d1a5bf2]{position:relative;height:100%;overflow:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.vpr-pull-refresh__scroll.normal[data-v-6d1a5bf2]{overflow:auto}.vpr-pull-refresh__header[data-v-6d1a5bf2]{position:absolute;top:0;left:0;right:0;pointer-events:none;transform:translate3d(0,-100%,0)}.vpr-pull-refresh__header__txt[data-v-6d1a5bf2]{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue3-pull-refresh",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "A Vue3 pull-to-refresh component",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "dist/index.umd.js",
|
|
6
7
|
"module": "dist/index.es.js",
|
|
7
8
|
"types": "dist/index.d.ts",
|
|
@@ -37,10 +38,10 @@
|
|
|
37
38
|
"vue": "^3.0.0"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"vite": "^5.0.0",
|
|
41
|
-
"vue": "^3.4.0",
|
|
42
41
|
"@vitejs/plugin-vue": "^5.0.0",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
42
|
+
"typescript": "^5.3.0",
|
|
43
|
+
"vite": "^5.0.0",
|
|
44
|
+
"vite-plugin-dts": "^4.5.4",
|
|
45
|
+
"vue": "^3.4.0"
|
|
45
46
|
}
|
|
46
47
|
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
modelValue: boolean;
|
|
3
|
-
pullingText?: string;
|
|
4
|
-
loosingText?: string;
|
|
5
|
-
loadingText?: string;
|
|
6
|
-
headerHeight?: number;
|
|
7
|
-
animationDuration?: number;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare function __VLS_template(): {
|
|
11
|
-
header?(_: {
|
|
12
|
-
status: "pulling" | "loosing" | "loading";
|
|
13
|
-
distance: number;
|
|
14
|
-
}): any;
|
|
15
|
-
default?(_: {}): any;
|
|
16
|
-
};
|
|
17
|
-
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
18
|
-
modelValue: boolean;
|
|
19
|
-
pullingText: string;
|
|
20
|
-
loosingText: string;
|
|
21
|
-
loadingText: string;
|
|
22
|
-
headerHeight: number;
|
|
23
|
-
animationDuration: number;
|
|
24
|
-
disabled: boolean;
|
|
25
|
-
}>>, {
|
|
26
|
-
scroller: import('vue').Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
27
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
|
-
"update:modelValue": (v: boolean) => void;
|
|
29
|
-
refresh: () => void;
|
|
30
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
31
|
-
modelValue: boolean;
|
|
32
|
-
pullingText: string;
|
|
33
|
-
loosingText: string;
|
|
34
|
-
loadingText: string;
|
|
35
|
-
headerHeight: number;
|
|
36
|
-
animationDuration: number;
|
|
37
|
-
disabled: boolean;
|
|
38
|
-
}>>> & Readonly<{
|
|
39
|
-
"onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
|
|
40
|
-
onRefresh?: (() => any) | undefined;
|
|
41
|
-
}>, {
|
|
42
|
-
modelValue: boolean;
|
|
43
|
-
pullingText: string;
|
|
44
|
-
loosingText: string;
|
|
45
|
-
loadingText: string;
|
|
46
|
-
headerHeight: number;
|
|
47
|
-
animationDuration: number;
|
|
48
|
-
disabled: boolean;
|
|
49
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
50
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
51
|
-
export default _default;
|
|
52
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
53
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
54
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
55
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
56
|
-
} : {
|
|
57
|
-
type: import('vue').PropType<T[K]>;
|
|
58
|
-
required: true;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
type __VLS_WithDefaults<P, D> = {
|
|
62
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
63
|
-
default: D[K];
|
|
64
|
-
}> : P[K];
|
|
65
|
-
};
|
|
66
|
-
type __VLS_Prettify<T> = {
|
|
67
|
-
[K in keyof T]: T[K];
|
|
68
|
-
} & {};
|
|
69
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
70
|
-
new (): {
|
|
71
|
-
$slots: S;
|
|
72
|
-
};
|
|
73
|
-
};
|