vft 0.0.306 → 0.0.307
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/es/component.js +119 -121
- package/es/components/index.d.ts +0 -1
- package/es/components/index.js +367 -369
- package/es/components/modal/use/use-modal.js +51 -53
- package/es/components/pagination/index.d.ts +2 -2
- package/es/components/pagination/pagination.vue.d.ts +1 -1
- package/es/components/timeline/timeline-item.vue2.js +18 -24
- package/es/index.js +506 -508
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/component.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +0 -1
- package/lib/components/modal/use/use-modal.cjs +1 -1
- package/lib/components/pagination/index.d.ts +2 -2
- package/lib/components/pagination/pagination.vue.d.ts +1 -1
- package/lib/components/timeline/timeline-item.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +6 -6
- package/web-types.json +1 -1
- package/es/components/exception/exception.png.js +0 -4
- package/es/components/exception/exception.vue.d.ts +0 -16
- package/es/components/exception/exception.vue.js +0 -4
- package/es/components/exception/exception.vue2.js +0 -52
- package/es/components/exception/index.d.ts +0 -22
- package/es/components/exception/index.js +0 -12
- package/es/components/exception/style/css.d.ts +0 -1
- package/es/components/exception/style/css.js +0 -2
- package/es/components/exception/style/index.d.ts +0 -1
- package/es/components/exception/style/index.js +0 -2
- package/lib/components/exception/exception.png.cjs +0 -1
- package/lib/components/exception/exception.vue.cjs +0 -1
- package/lib/components/exception/exception.vue.d.ts +0 -16
- package/lib/components/exception/exception.vue2.cjs +0 -1
- package/lib/components/exception/index.cjs +0 -1
- package/lib/components/exception/index.d.ts +0 -22
- package/lib/components/exception/style/css.cjs +0 -1
- package/lib/components/exception/style/css.d.ts +0 -1
- package/lib/components/exception/style/index.cjs +0 -1
- package/lib/components/exception/style/index.d.ts +0 -1
|
@@ -1,91 +1,89 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isFunction as
|
|
3
|
-
import { isEqual as
|
|
4
|
-
import { reactive as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
if (!
|
|
1
|
+
import { onMountedOrActivated as h } from "@vft/use";
|
|
2
|
+
import { isFunction as I } from "@vft/utils";
|
|
3
|
+
import { isEqual as V } from "lodash-es";
|
|
4
|
+
import { reactive as g, ref as c, computed as m, unref as t, getCurrentInstance as v, watchEffect as w, nextTick as H, onBeforeUnmount as P, toRaw as d } from "vue";
|
|
5
|
+
const i = g({}), p = g({});
|
|
6
|
+
function x() {
|
|
7
|
+
const r = c(null), s = c(!1), l = c("");
|
|
8
|
+
function u(e, n) {
|
|
9
|
+
if (!v())
|
|
10
10
|
throw new Error(
|
|
11
11
|
"useModal() can only be used inside setup() or functional components!"
|
|
12
12
|
);
|
|
13
|
-
l.value =
|
|
14
|
-
|
|
15
|
-
}),
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
l.value = n, P(() => {
|
|
14
|
+
r.value = null, s.value = !1, i[t(l)] = null;
|
|
15
|
+
}), h(() => {
|
|
16
|
+
t(s) && e === t(r) || (r.value = e, s.value = !0, e.emitVisible = (M, a) => {
|
|
17
|
+
p[a] = M;
|
|
18
18
|
});
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
return
|
|
21
|
+
const o = () => {
|
|
22
|
+
const e = t(r);
|
|
23
|
+
return e || console.error("useModal instance is undefined!"), e;
|
|
24
24
|
}, f = {
|
|
25
|
-
setModalProps: (
|
|
26
|
-
|
|
25
|
+
setModalProps: (e) => {
|
|
26
|
+
o()?.setModalProps(e);
|
|
27
27
|
},
|
|
28
|
-
getVisible:
|
|
28
|
+
getVisible: m(() => p[~~t(l)]),
|
|
29
29
|
redoModalHeight: () => {
|
|
30
|
-
|
|
30
|
+
o()?.redoModalHeight?.();
|
|
31
31
|
},
|
|
32
|
-
openModal: (
|
|
33
|
-
if (
|
|
34
|
-
modelValue:
|
|
35
|
-
}), !
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
|
|
32
|
+
openModal: (e = !0, n, M = !0) => {
|
|
33
|
+
if (o()?.setModalProps({
|
|
34
|
+
modelValue: e
|
|
35
|
+
}), !n) return;
|
|
36
|
+
const a = t(l);
|
|
37
|
+
if (M) {
|
|
38
|
+
i[a] = null, i[a] = d(n);
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
V(d(i[a]), d(n)) || (i[a] = d(n));
|
|
42
42
|
},
|
|
43
43
|
closeModal: () => {
|
|
44
|
-
|
|
44
|
+
o()?.setModalProps({ modelValue: !1 });
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
return [
|
|
47
|
+
return [u, f];
|
|
48
48
|
}
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const e =
|
|
49
|
+
const O = (r) => {
|
|
50
|
+
const s = c(null), l = v(), u = c(""), o = () => {
|
|
51
|
+
const e = t(s);
|
|
52
52
|
return e || console.error("useModalInner instance is undefined!"), e;
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}),
|
|
57
|
-
r.value = null;
|
|
58
|
-
}), c.value = f, r.value = e, l?.emit("register", e, f);
|
|
53
|
+
}, f = (e, n) => {
|
|
54
|
+
P(() => {
|
|
55
|
+
s.value = null;
|
|
56
|
+
}), u.value = n, s.value = e, l?.emit("register", e, n);
|
|
59
57
|
};
|
|
60
|
-
return
|
|
61
|
-
const e =
|
|
62
|
-
e && (!
|
|
63
|
-
|
|
58
|
+
return w(() => {
|
|
59
|
+
const e = i[t(u)];
|
|
60
|
+
e && (!r || !I(r) || H(() => {
|
|
61
|
+
r(e);
|
|
64
62
|
}));
|
|
65
63
|
}), [
|
|
66
|
-
|
|
64
|
+
f,
|
|
67
65
|
{
|
|
68
66
|
changeLoading: (e = !0) => {
|
|
69
|
-
|
|
67
|
+
o()?.setModalProps({ loading: e });
|
|
70
68
|
},
|
|
71
|
-
getVisible:
|
|
69
|
+
getVisible: m(() => p[~~t(u)]),
|
|
72
70
|
changeOkLoading: (e = !0) => {
|
|
73
|
-
|
|
71
|
+
o()?.setModalProps({ confirmLoading: e });
|
|
74
72
|
},
|
|
75
73
|
closeModal: () => {
|
|
76
|
-
|
|
74
|
+
o()?.setModalProps({ modelValue: !1 });
|
|
77
75
|
},
|
|
78
76
|
setModalProps: (e) => {
|
|
79
|
-
|
|
77
|
+
o()?.setModalProps(e);
|
|
80
78
|
},
|
|
81
79
|
redoModalHeight: () => {
|
|
82
|
-
const e =
|
|
80
|
+
const e = o()?.redoModalHeight;
|
|
83
81
|
e && e();
|
|
84
82
|
}
|
|
85
83
|
}
|
|
86
84
|
];
|
|
87
85
|
};
|
|
88
86
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
x as useModal,
|
|
88
|
+
O as useModalInner
|
|
91
89
|
};
|
|
@@ -21,7 +21,7 @@ export declare const VftPagination: import("vft/es/utils").SFCWithInstall<import
|
|
|
21
21
|
type: import("vue").PropType<number>;
|
|
22
22
|
};
|
|
23
23
|
layout: {
|
|
24
|
-
type: import("vue").PropType<string>;
|
|
24
|
+
type: import("vue").PropType<string[]>;
|
|
25
25
|
};
|
|
26
26
|
pageSizes: {
|
|
27
27
|
type: import("vue").PropType<number[]>;
|
|
@@ -83,7 +83,7 @@ export declare const VftPagination: import("vft/es/utils").SFCWithInstall<import
|
|
|
83
83
|
type: import("vue").PropType<number>;
|
|
84
84
|
};
|
|
85
85
|
layout: {
|
|
86
|
-
type: import("vue").PropType<string>;
|
|
86
|
+
type: import("vue").PropType<string[]>;
|
|
87
87
|
};
|
|
88
88
|
pageSizes: {
|
|
89
89
|
type: import("vue").PropType<number[]>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftIcon as
|
|
1
|
+
import { defineComponent as d, computed as u, createElementBlock as a, openBlock as s, normalizeClass as l, unref as o, createElementVNode as n, createCommentVNode as m, normalizeStyle as f, createBlock as y, mergeProps as k, renderSlot as r, toDisplayString as p } from "vue";
|
|
2
|
+
import { VftIcon as v } from "../icon/index.js";
|
|
3
3
|
import "@vueuse/core";
|
|
4
4
|
import "@vft/utils";
|
|
5
5
|
import "../../utils/ns-cover.js";
|
|
6
6
|
import "lodash-es";
|
|
7
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as h } from "../../hooks/use-namespace/index.js";
|
|
8
8
|
import "../../hooks/use-model-toggle/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
const
|
|
11
|
+
const B = d({
|
|
12
12
|
name: "vft-timeline-item"
|
|
13
|
-
}),
|
|
14
|
-
...
|
|
13
|
+
}), D = /* @__PURE__ */ d({
|
|
14
|
+
...B,
|
|
15
15
|
props: {
|
|
16
16
|
timestamp: {},
|
|
17
17
|
hideTimestamp: { type: Boolean, default: !1 },
|
|
@@ -20,11 +20,11 @@ const C = c({
|
|
|
20
20
|
type: {},
|
|
21
21
|
color: {},
|
|
22
22
|
size: { default: "normal" },
|
|
23
|
-
icon: {
|
|
23
|
+
icon: {},
|
|
24
24
|
hollow: { type: Boolean, default: !1 }
|
|
25
25
|
},
|
|
26
26
|
setup(i) {
|
|
27
|
-
const e =
|
|
27
|
+
const e = h("timeline-item"), c = u(() => [
|
|
28
28
|
e.e("node"),
|
|
29
29
|
e.em("node", i.size || ""),
|
|
30
30
|
e.em("node", i.type || ""),
|
|
@@ -38,26 +38,20 @@ const C = c({
|
|
|
38
38
|
}, null, 2),
|
|
39
39
|
t.$slots.dot ? m("", !0) : (s(), a("div", {
|
|
40
40
|
key: 0,
|
|
41
|
-
class: l(
|
|
42
|
-
style:
|
|
41
|
+
class: l(c.value),
|
|
42
|
+
style: f({
|
|
43
43
|
backgroundColor: t.color
|
|
44
44
|
})
|
|
45
45
|
}, [
|
|
46
|
-
t.icon ? (s(),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, {
|
|
50
|
-
default: v(() => [
|
|
51
|
-
(s(), r(k(t.icon)))
|
|
52
|
-
]),
|
|
53
|
-
_: 1
|
|
54
|
-
}, 8, ["class"])) : m("", !0)
|
|
46
|
+
t.icon?.icon ? (s(), y(o(v), k({ key: 0 }, t.icon, {
|
|
47
|
+
class: o(e).e("icon")
|
|
48
|
+
}), null, 16, ["class"])) : m("", !0)
|
|
55
49
|
], 6)),
|
|
56
50
|
t.$slots.dot ? (s(), a("div", {
|
|
57
51
|
key: 1,
|
|
58
52
|
class: l(o(e).e("dot"))
|
|
59
53
|
}, [
|
|
60
|
-
|
|
54
|
+
r(t.$slots, "dot")
|
|
61
55
|
], 2)) : m("", !0),
|
|
62
56
|
n("div", {
|
|
63
57
|
class: l(o(e).e("wrapper"))
|
|
@@ -65,20 +59,20 @@ const C = c({
|
|
|
65
59
|
!t.hideTimestamp && t.placement === "top" ? (s(), a("div", {
|
|
66
60
|
key: 0,
|
|
67
61
|
class: l([o(e).e("timestamp"), o(e).is("top")])
|
|
68
|
-
},
|
|
62
|
+
}, p(t.timestamp), 3)) : m("", !0),
|
|
69
63
|
n("div", {
|
|
70
64
|
class: l(o(e).e("content"))
|
|
71
65
|
}, [
|
|
72
|
-
|
|
66
|
+
r(t.$slots, "default")
|
|
73
67
|
], 2),
|
|
74
68
|
!t.hideTimestamp && t.placement === "bottom" ? (s(), a("div", {
|
|
75
69
|
key: 1,
|
|
76
70
|
class: l([o(e).e("timestamp"), o(e).is("bottom")])
|
|
77
|
-
},
|
|
71
|
+
}, p(t.timestamp), 3)) : m("", !0)
|
|
78
72
|
], 2)
|
|
79
73
|
], 2));
|
|
80
74
|
}
|
|
81
75
|
});
|
|
82
76
|
export {
|
|
83
|
-
|
|
77
|
+
D as default
|
|
84
78
|
};
|