vft 0.0.514 → 0.0.516
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.css +1 -1
- package/es/components/icon/icon.vue.d.ts +5 -1
- package/es/components/icon/icon.vue2.js +23 -21
- package/es/components/icon/index.d.ts +6 -2
- package/es/components/image/image.vue2.js +25 -24
- package/es/components/image/index.d.ts +9 -0
- package/es/components/image/types.d.ts +2 -0
- package/es/components/image-viewer/image-viewer.vue.d.ts +1 -12
- package/es/components/image-viewer/types.d.ts +22 -0
- package/es/components/md-comment/md-comment.vue2.js +50 -28
- package/es/components/modal/modal.vue2.js +31 -30
- package/es/components/select/index.d.ts +6 -2
- package/es/components/select/select.vue.d.ts +6 -2
- package/es/components/table/index.d.ts +12 -12
- package/es/components/table/table.vue2.js +126 -121
- package/es/components/table/vxe-runtime.d.ts +16 -0
- package/es/components/table/vxe-runtime.js +16 -0
- package/es/components/tree/tree-node.vue.d.ts +6 -2
- package/es/components/upload/index.d.ts +2 -2
- package/es/components/upload/upload.vue.d.ts +2 -2
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/icon/icon.vue.d.ts +5 -1
- package/lib/components/icon/icon.vue2.cjs +1 -1
- package/lib/components/icon/index.d.ts +6 -2
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image/index.d.ts +9 -0
- package/lib/components/image/types.d.ts +2 -0
- package/lib/components/image-viewer/image-viewer.vue.d.ts +1 -12
- package/lib/components/image-viewer/types.d.ts +22 -0
- package/lib/components/md-comment/md-comment.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/select/index.d.ts +6 -2
- package/lib/components/select/select.vue.d.ts +6 -2
- package/lib/components/table/index.d.ts +12 -12
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/vxe-runtime.cjs +1 -0
- package/lib/components/table/vxe-runtime.d.ts +16 -0
- package/lib/components/tree/tree-node.vue.d.ts +6 -2
- package/lib/components/upload/index.d.ts +2 -2
- package/lib/components/upload/upload.vue.d.ts +2 -2
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +3 -3
- package/theme-style/index.css +1 -1
- package/theme-style/vft-autocomplete.css +1 -1
- package/theme-style/vft-button-group.css +1 -1
- package/theme-style/vft-button.css +1 -1
- package/theme-style/vft-cascader.css +1 -1
- package/theme-style/vft-checkbox.css +1 -1
- package/theme-style/vft-color-picker.css +1 -1
- package/theme-style/vft-date-picker.css +1 -1
- package/theme-style/vft-dropdown.css +1 -1
- package/theme-style/vft-input.css +1 -1
- package/theme-style/vft-link.css +1 -1
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-md-vue-playground.css +1 -1
- package/theme-style/vft-multiple-tabs.css +1 -1
- package/theme-style/vft-popper.css +1 -1
- package/theme-style/vft-radio.css +1 -1
- package/theme-style/vft-result.css +1 -1
- package/theme-style/vft-select.css +1 -1
- package/theme-style/vft-tag.css +1 -1
- package/theme-style/vft-time-picker.css +1 -1
- package/theme-style/vft-time-select.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { IconProps } from './types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
|
+
error: (event: Event) => void;
|
|
4
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>> & Readonly<{
|
|
5
|
+
onError?: ((event: Event) => any) | undefined;
|
|
6
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
3
7
|
export default _default;
|
|
4
8
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
5
9
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isString as
|
|
1
|
+
import { defineComponent as u, computed as t, openBlock as l, createElementBlock as c, normalizeStyle as m, normalizeClass as f, unref as i } from "vue";
|
|
2
|
+
import { isString as z } from "@vft/utils";
|
|
3
3
|
import "../config-provider/index.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
|
-
import { addUnit as
|
|
6
|
-
import { generateCssVars as
|
|
5
|
+
import { addUnit as I } from "../../utils/helper.js";
|
|
6
|
+
import { generateCssVars as h } from "../../utils/ns-cover.js";
|
|
7
7
|
import "lodash-es";
|
|
8
8
|
import "../form/index.js";
|
|
9
|
-
import { useNamespace as
|
|
9
|
+
import { useNamespace as k } from "../../hooks/use-namespace/index.js";
|
|
10
10
|
import "../../hooks/use-model-toggle/index.js";
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../hooks/use-z-index/index.js";
|
|
13
|
-
import { useGlobalConfig as
|
|
14
|
-
const
|
|
13
|
+
import { useGlobalConfig as x } from "../config-provider/hooks/use-global-config.js";
|
|
14
|
+
const B = ["src"], S = u({
|
|
15
15
|
name: "vft-icon"
|
|
16
|
-
}),
|
|
17
|
-
...
|
|
16
|
+
}), F = /* @__PURE__ */ u({
|
|
17
|
+
...S,
|
|
18
18
|
props: {
|
|
19
19
|
icon: {},
|
|
20
20
|
size: {},
|
|
@@ -24,11 +24,12 @@ const z = ["src"], I = f({
|
|
|
24
24
|
pointer: { type: Boolean },
|
|
25
25
|
hoverColor: {}
|
|
26
26
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
emits: ["error"],
|
|
28
|
+
setup(o, { emit: v }) {
|
|
29
|
+
const d = v, n = k("icon"), e = x(), r = t(
|
|
30
|
+
() => h(
|
|
30
31
|
{
|
|
31
|
-
size:
|
|
32
|
+
size: I(o.size),
|
|
32
33
|
color: o.color,
|
|
33
34
|
hoverColor: o.hoverColor,
|
|
34
35
|
cursor: o.pointer ? "pointer" : void 0,
|
|
@@ -36,20 +37,21 @@ const z = ["src"], I = f({
|
|
|
36
37
|
},
|
|
37
38
|
"icon"
|
|
38
39
|
)
|
|
39
|
-
),
|
|
40
|
-
return (
|
|
40
|
+
), y = (s) => s?.includes("/"), C = t(() => y(o.icon)), g = t(() => e.value?.iconifyPrefixClass && o.icon && z(o.icon) ? o.icon.startsWith(e.value?.iconifyPrefixClass) : !1).value ? "" : e.value?.iconfontClass || "";
|
|
41
|
+
return (s, a) => C.value ? (l(), c("img", {
|
|
41
42
|
key: 0,
|
|
42
|
-
class:
|
|
43
|
+
class: f(i(n).e("image")),
|
|
43
44
|
src: o.icon,
|
|
44
45
|
alt: "",
|
|
45
|
-
style:
|
|
46
|
-
|
|
46
|
+
style: m(r.value),
|
|
47
|
+
onError: a[0] || (a[0] = (p) => d("error", p))
|
|
48
|
+
}, null, 46, B)) : (l(), c("i", {
|
|
47
49
|
key: 1,
|
|
48
|
-
class:
|
|
49
|
-
style:
|
|
50
|
+
class: f([i(n).b(), o.icon, i(g)]),
|
|
51
|
+
style: m(r.value)
|
|
50
52
|
}, null, 6));
|
|
51
53
|
}
|
|
52
54
|
});
|
|
53
55
|
export {
|
|
54
|
-
|
|
56
|
+
F as default
|
|
55
57
|
};
|
|
@@ -21,7 +21,9 @@ export declare const VftIcon: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
21
21
|
hoverColor: {
|
|
22
22
|
type: import("vue").PropType<string>;
|
|
23
23
|
};
|
|
24
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
|
+
error: (event: Event) => void;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
27
|
icon: {
|
|
26
28
|
type: import("vue").PropType<string>;
|
|
27
29
|
required: true;
|
|
@@ -44,6 +46,8 @@ export declare const VftIcon: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
44
46
|
hoverColor: {
|
|
45
47
|
type: import("vue").PropType<string>;
|
|
46
48
|
};
|
|
47
|
-
}>> & Readonly<{
|
|
49
|
+
}>> & Readonly<{
|
|
50
|
+
onError?: ((event: Event) => any) | undefined;
|
|
51
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
48
52
|
export * from './types';
|
|
49
53
|
export default VftIcon;
|
|
@@ -13,7 +13,7 @@ import "../../hooks/use-z-index/index.js";
|
|
|
13
13
|
const ue = ["src", "loading"], ce = { key: 0 }, de = T({
|
|
14
14
|
name: "vft-image",
|
|
15
15
|
inheritAttrs: !1
|
|
16
|
-
}),
|
|
16
|
+
}), xe = /* @__PURE__ */ T({
|
|
17
17
|
...de,
|
|
18
18
|
props: {
|
|
19
19
|
hideOnClickModal: { type: Boolean, default: !1 },
|
|
@@ -27,41 +27,42 @@ const ue = ["src", "loading"], ce = { key: 0 }, de = T({
|
|
|
27
27
|
zIndex: {},
|
|
28
28
|
initialIndex: { default: 0 },
|
|
29
29
|
infinite: { type: Boolean, default: !0 },
|
|
30
|
-
closeOnPressEscape: { type: Boolean, default: !0 }
|
|
30
|
+
closeOnPressEscape: { type: Boolean, default: !0 },
|
|
31
|
+
zoomRate: { default: 1.2 }
|
|
31
32
|
},
|
|
32
33
|
emits: ["load", "error", "switch", "close", "show"],
|
|
33
34
|
setup(e, { expose: $, emit: b }) {
|
|
34
35
|
const c = b, i = se("image");
|
|
35
36
|
let C = "";
|
|
36
37
|
const M = W(), O = te(), w = o(), r = o(!1), n = o(!0), h = o(!1), m = o(), a = o(), H = v && "loading" in HTMLImageElement.prototype;
|
|
37
|
-
let z,
|
|
38
|
+
let z, S;
|
|
38
39
|
const F = d(() => M.style), N = d(() => v && e.fit ? { objectFit: e.fit } : {}), g = d(() => Array.isArray(e.previewSrcList) && e.previewSrcList.length > 0), P = d(() => {
|
|
39
40
|
let t = e.initialIndex;
|
|
40
41
|
return e.initialIndex > e.previewSrcList.length - 1 && (t = 0), t;
|
|
41
|
-
}),
|
|
42
|
+
}), p = d(() => e.loading === "eager" ? !1 : !H && e.loading === "lazy" || e.lazy), L = () => {
|
|
42
43
|
v && (n.value = !0, r.value = !1, w.value = e.src);
|
|
43
44
|
};
|
|
44
45
|
function D(t) {
|
|
45
46
|
n.value = !1, r.value = !1, c("load", t);
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
+
function R(t) {
|
|
48
49
|
n.value = !1, r.value = !0, c("error", t);
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
+
function x() {
|
|
51
52
|
le(m.value, a.value) && (L(), B());
|
|
52
53
|
}
|
|
53
|
-
const
|
|
54
|
+
const I = oe(x, 200);
|
|
54
55
|
async function E() {
|
|
55
56
|
v && (await ee(), ne(e.scrollContainer) ? a.value = e.scrollContainer : ae(e.scrollContainer) && e.scrollContainer !== "" ? a.value = document.querySelector(e.scrollContainer) ?? void 0 : m.value && (a.value = ie(m.value)), a.value && (z = V(
|
|
56
57
|
a,
|
|
57
58
|
"scroll",
|
|
58
|
-
|
|
59
|
-
), setTimeout(() =>
|
|
59
|
+
I
|
|
60
|
+
), setTimeout(() => x(), 100)));
|
|
60
61
|
}
|
|
61
62
|
function B() {
|
|
62
|
-
!v || !a.value || !
|
|
63
|
+
!v || !a.value || !I || (z?.(), a.value = void 0);
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
+
function Y(t) {
|
|
65
66
|
if (t.ctrlKey) {
|
|
66
67
|
if (t.deltaY < 0)
|
|
67
68
|
return t.preventDefault(), !1;
|
|
@@ -69,24 +70,24 @@ const ue = ["src", "loading"], ce = { key: 0 }, de = T({
|
|
|
69
70
|
return t.preventDefault(), !1;
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
|
-
function
|
|
73
|
-
g.value && (
|
|
73
|
+
function j() {
|
|
74
|
+
g.value && (S = V("wheel", Y, {
|
|
74
75
|
passive: !1
|
|
75
76
|
}), C = document.body.style.overflow, document.body.style.overflow = "hidden", h.value = !0, c("show"));
|
|
76
77
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
78
|
+
function q() {
|
|
79
|
+
console.log(11122), S?.(), document.body.style.overflow = C, h.value = !1, c("close");
|
|
79
80
|
}
|
|
80
|
-
function
|
|
81
|
+
function K(t) {
|
|
81
82
|
c("switch", t);
|
|
82
83
|
}
|
|
83
84
|
return G(
|
|
84
85
|
() => e.src,
|
|
85
86
|
() => {
|
|
86
|
-
|
|
87
|
+
p.value ? (n.value = !0, r.value = !1, B(), E()) : L();
|
|
87
88
|
}
|
|
88
89
|
), J(() => {
|
|
89
|
-
|
|
90
|
+
p.value ? E() : L();
|
|
90
91
|
}), $({
|
|
91
92
|
isLoading: n
|
|
92
93
|
}), (t, fe) => (s(), f("div", {
|
|
@@ -104,9 +105,9 @@ const ue = ["src", "loading"], ce = { key: 0 }, de = T({
|
|
|
104
105
|
g.value && l(i).e("preview"),
|
|
105
106
|
n.value && l(i).is("loading")
|
|
106
107
|
],
|
|
107
|
-
onClick:
|
|
108
|
+
onClick: j,
|
|
108
109
|
onLoad: D,
|
|
109
|
-
onError:
|
|
110
|
+
onError: R,
|
|
110
111
|
alt: ""
|
|
111
112
|
}), null, 16, ue)) : u("", !0),
|
|
112
113
|
n.value || r.value ? (s(), f("div", {
|
|
@@ -129,13 +130,13 @@ const ue = ["src", "loading"], ce = { key: 0 }, de = T({
|
|
|
129
130
|
"z-index": e.zIndex,
|
|
130
131
|
"initial-index": P.value,
|
|
131
132
|
infinite: e.infinite,
|
|
132
|
-
"zoom-rate":
|
|
133
|
+
"zoom-rate": e.zoomRate,
|
|
133
134
|
"url-list": e.previewSrcList,
|
|
134
135
|
"hide-on-click-modal": e.hideOnClickModal,
|
|
135
136
|
teleported: e.previewTeleported,
|
|
136
137
|
"close-on-press-escape": e.closeOnPressEscape,
|
|
137
|
-
onClose:
|
|
138
|
-
onSwitch:
|
|
138
|
+
onClose: q,
|
|
139
|
+
onSwitch: K
|
|
139
140
|
}, {
|
|
140
141
|
default: _(() => [
|
|
141
142
|
t.$slots.viewer ? (s(), f("div", ce, [
|
|
@@ -149,5 +150,5 @@ const ue = ["src", "loading"], ce = { key: 0 }, de = T({
|
|
|
149
150
|
}
|
|
150
151
|
});
|
|
151
152
|
export {
|
|
152
|
-
|
|
153
|
+
xe as default
|
|
153
154
|
};
|
|
@@ -36,6 +36,9 @@ export declare const VftImage: import("vft/es/utils").SFCWithInstall<{
|
|
|
36
36
|
closeOnPressEscape: {
|
|
37
37
|
type: import("vue").PropType<boolean>;
|
|
38
38
|
};
|
|
39
|
+
zoomRate: {
|
|
40
|
+
type: import("vue").PropType<number>;
|
|
41
|
+
};
|
|
39
42
|
}>> & Readonly<{
|
|
40
43
|
onSwitch?: ((...args: any[]) => any) | undefined;
|
|
41
44
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -94,6 +97,9 @@ export declare const VftImage: import("vft/es/utils").SFCWithInstall<{
|
|
|
94
97
|
closeOnPressEscape: {
|
|
95
98
|
type: import("vue").PropType<boolean>;
|
|
96
99
|
};
|
|
100
|
+
zoomRate: {
|
|
101
|
+
type: import("vue").PropType<number>;
|
|
102
|
+
};
|
|
97
103
|
}>> & Readonly<{
|
|
98
104
|
onSwitch?: ((...args: any[]) => any) | undefined;
|
|
99
105
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -143,6 +149,9 @@ export declare const VftImage: import("vft/es/utils").SFCWithInstall<{
|
|
|
143
149
|
closeOnPressEscape: {
|
|
144
150
|
type: import("vue").PropType<boolean>;
|
|
145
151
|
};
|
|
152
|
+
zoomRate: {
|
|
153
|
+
type: import("vue").PropType<number>;
|
|
154
|
+
};
|
|
146
155
|
}>> & Readonly<{
|
|
147
156
|
onSwitch?: ((...args: any[]) => any) | undefined;
|
|
148
157
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
urlList?: string[];
|
|
3
|
-
zIndex?: number;
|
|
4
|
-
initialIndex?: number;
|
|
5
|
-
infinite?: boolean;
|
|
6
|
-
hideOnClickModal?: boolean;
|
|
7
|
-
teleported?: boolean;
|
|
8
|
-
closeOnPressEscape?: boolean;
|
|
9
|
-
zoomRate?: number;
|
|
10
|
-
referrerpolicy?: 'no-referrer' | 'no-referrer-when-downgrade' | 'same-origin' | 'origin' | 'strict-origin' | 'origin-when-cross-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
11
|
-
crossorigin?: 'anonymous' | 'use-credentials';
|
|
12
|
-
}
|
|
1
|
+
import type { ImageViewerProps } from './types';
|
|
13
2
|
declare function setActiveItem(index: number): void;
|
|
14
3
|
declare function __VLS_template(): {
|
|
15
4
|
default?(_: {}): any;
|
|
@@ -1 +1,23 @@
|
|
|
1
1
|
export type ImageViewerAction = 'zoomIn' | 'zoomOut' | 'clockwise' | 'anticlockwise';
|
|
2
|
+
export interface ImageViewerProps {
|
|
3
|
+
/** 图片地址列表 */
|
|
4
|
+
urlList?: string[];
|
|
5
|
+
/** 层级 */
|
|
6
|
+
zIndex?: number;
|
|
7
|
+
/** 初始预览的下标 */
|
|
8
|
+
initialIndex?: number;
|
|
9
|
+
/** 是否循环切换 */
|
|
10
|
+
infinite?: boolean;
|
|
11
|
+
/** 点击遮罩层是否关闭 */
|
|
12
|
+
hideOnClickModal?: boolean;
|
|
13
|
+
/** 是否将节点 teleport 到 body */
|
|
14
|
+
teleported?: boolean;
|
|
15
|
+
/** 是否支持 Esc 关闭 */
|
|
16
|
+
closeOnPressEscape?: boolean;
|
|
17
|
+
/** 缩放倍率(每次滚轮/按钮放大缩小的步长) */
|
|
18
|
+
zoomRate?: number;
|
|
19
|
+
/** referrer policy */
|
|
20
|
+
referrerpolicy?: 'no-referrer' | 'no-referrer-when-downgrade' | 'same-origin' | 'origin' | 'strict-origin' | 'origin-when-cross-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
21
|
+
/** crossorigin */
|
|
22
|
+
crossorigin?: 'anonymous' | 'use-credentials';
|
|
23
|
+
}
|
|
@@ -1,41 +1,63 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as m, onMounted as r, nextTick as c, onBeforeUnmount as a, openBlock as l, createElementBlock as s, normalizeClass as p, unref as i, createElementVNode as u } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../config-provider/hooks/use-global-config.js";
|
|
5
5
|
import "lodash-es";
|
|
6
6
|
import "../form/index.js";
|
|
7
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as d } 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
|
-
import { init as
|
|
12
|
-
const
|
|
11
|
+
import { init as f } from "@waline/client";
|
|
12
|
+
const w = ["id"], _ = m({
|
|
13
13
|
name: "vft-md-comment"
|
|
14
|
-
}), C = /* @__PURE__ */
|
|
15
|
-
...
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
14
|
+
}), C = /* @__PURE__ */ m({
|
|
15
|
+
..._,
|
|
16
|
+
setup(j) {
|
|
17
|
+
const t = d("md-comment");
|
|
18
|
+
let e = null;
|
|
19
|
+
return r(async () => {
|
|
20
|
+
await c();
|
|
21
|
+
const n = `#${t.e("waline")}`, o = document.querySelector(n);
|
|
22
|
+
if (o) {
|
|
23
|
+
if (o.innerHTML && (o.innerHTML = ""), e) {
|
|
24
|
+
try {
|
|
25
|
+
e.destroy();
|
|
26
|
+
} catch {
|
|
27
|
+
}
|
|
28
|
+
e = null;
|
|
29
|
+
}
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
e = f({
|
|
32
|
+
el: n,
|
|
33
|
+
serverURL: "https://waline.wflynn.cn/",
|
|
34
|
+
pageview: !0,
|
|
35
|
+
reaction: !0,
|
|
36
|
+
emoji: [
|
|
37
|
+
"//unpkg.com/@waline/emojis@1.1.0/weibo",
|
|
38
|
+
"//unpkg.com/@waline/emojis@1.1.0/bilibili",
|
|
39
|
+
"//unpkg.com/@waline/emojis@1.1.0/bmoji",
|
|
40
|
+
"//unpkg.com/@waline/emojis@1.1.0/qq",
|
|
41
|
+
"//unpkg.com/@waline/emojis@1.1.0/tieba",
|
|
42
|
+
"//unpkg.com/@waline/emojis@1.1.0/tw-emoji"
|
|
43
|
+
]
|
|
44
|
+
});
|
|
45
|
+
}, 0);
|
|
46
|
+
}
|
|
47
|
+
}), a(() => {
|
|
48
|
+
if (e) {
|
|
49
|
+
try {
|
|
50
|
+
e.destroy();
|
|
51
|
+
} catch {
|
|
52
|
+
}
|
|
53
|
+
e = null;
|
|
54
|
+
}
|
|
55
|
+
}), (n, o) => (l(), s("div", {
|
|
56
|
+
class: p(i(t).b())
|
|
35
57
|
}, [
|
|
36
|
-
|
|
37
|
-
id:
|
|
38
|
-
}, null, 8,
|
|
58
|
+
u("div", {
|
|
59
|
+
id: i(t).e("waline")
|
|
60
|
+
}, null, 8, w)
|
|
39
61
|
], 2));
|
|
40
62
|
}
|
|
41
63
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as A, useAttrs as $, ref as m, getCurrentInstance as M, computed as d, unref as
|
|
1
|
+
import { defineComponent as A, useAttrs as $, ref as m, getCurrentInstance as M, computed as d, unref as t, watchEffect as P, watch as T, nextTick as B, openBlock as C, createBlock as g, mergeProps as R, createSlots as S, withCtx as w, renderSlot as h, createCommentVNode as D } from "vue";
|
|
2
2
|
import { VftDialog as G } from "../dialog/index.js";
|
|
3
3
|
import { deepMerge as I, isFunction as x } from "@vft/utils";
|
|
4
4
|
import E from "./modal-footer-action.vue2.js";
|
|
@@ -47,75 +47,76 @@ const W = /* @__PURE__ */ A({
|
|
|
47
47
|
actionRowOptions: {}
|
|
48
48
|
},
|
|
49
49
|
emits: ["visible-change", "close", "ok", "register", "update:modelValue", "submit", "open", "opened", "closed", "openAutoFocus", "closeAutoFocus"],
|
|
50
|
-
setup(s, { emit:
|
|
51
|
-
const n = s,
|
|
50
|
+
setup(s, { emit: V }) {
|
|
51
|
+
const n = s, l = V, v = $(), c = m(null), a = m(!1), u = m(null), f = {
|
|
52
52
|
setModalProps: p,
|
|
53
53
|
emitVisible: void 0,
|
|
54
54
|
redoModalHeight: () => {
|
|
55
55
|
B(() => {
|
|
56
|
-
|
|
56
|
+
t(u) && t(u).setModalHeight();
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
}, i = M();
|
|
60
|
-
i &&
|
|
61
|
-
const
|
|
60
|
+
i && l("register", f, i.uid);
|
|
61
|
+
const b = d(() => ({
|
|
62
62
|
...n,
|
|
63
|
-
...
|
|
63
|
+
...t(c)
|
|
64
64
|
})), O = d(() => ({
|
|
65
|
-
...
|
|
66
|
-
...
|
|
67
|
-
modelValue:
|
|
65
|
+
...v,
|
|
66
|
+
...t(b),
|
|
67
|
+
modelValue: t(a)
|
|
68
68
|
}));
|
|
69
69
|
P(() => {
|
|
70
70
|
a.value = !!n.modelValue;
|
|
71
71
|
}), T(
|
|
72
|
-
() =>
|
|
72
|
+
() => t(a),
|
|
73
73
|
(e) => {
|
|
74
|
-
|
|
74
|
+
l("visible-change", e), l("update:modelValue", e), i && f.emitVisible && B(() => {
|
|
75
75
|
f.emitVisible(e, i.uid);
|
|
76
76
|
}), B(() => {
|
|
77
|
-
n.scrollTop && e &&
|
|
77
|
+
n.scrollTop && e && t(u) && t(u).scrollTop();
|
|
78
78
|
});
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
immediate: !1
|
|
82
82
|
}
|
|
83
83
|
);
|
|
84
|
-
async function
|
|
84
|
+
async function y(e) {
|
|
85
85
|
if (e?.stopPropagation(), n.closeFunc && x(n.closeFunc)) {
|
|
86
86
|
await n.closeFunc() || p({ modelValue: !1 });
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
-
p({ modelValue: !1 }),
|
|
89
|
+
p({ modelValue: !1 }), l("close", e);
|
|
90
90
|
}
|
|
91
91
|
function p(e) {
|
|
92
|
-
c.value = I(
|
|
92
|
+
c.value = I(t(c) || {}, e), Reflect.has(e, "modelValue") && (a.value = !!e.modelValue);
|
|
93
93
|
}
|
|
94
94
|
const F = d(() => ({
|
|
95
|
-
onClick: (e) =>
|
|
95
|
+
onClick: (e) => y(e),
|
|
96
96
|
...n.cancelButtonOptions
|
|
97
97
|
})), k = d(() => ({
|
|
98
|
-
onClick: () =>
|
|
98
|
+
onClick: () => l("submit"),
|
|
99
|
+
loading: t(b).confirmLoading,
|
|
99
100
|
...n.submitButtonOptions
|
|
100
101
|
}));
|
|
101
|
-
return (e, o) => (
|
|
102
|
-
onClose:
|
|
103
|
-
onOpen: o[0] || (o[0] = (r) =>
|
|
104
|
-
onOpened: o[1] || (o[1] = (r) =>
|
|
105
|
-
onClosed: o[2] || (o[2] = (r) =>
|
|
106
|
-
onOpenAutoFocus: o[3] || (o[3] = (r) =>
|
|
107
|
-
onCloseAutoFocus: o[4] || (o[4] = (r) =>
|
|
102
|
+
return (e, o) => (C(), g(t(G), R(O.value, {
|
|
103
|
+
onClose: y,
|
|
104
|
+
onOpen: o[0] || (o[0] = (r) => l("open")),
|
|
105
|
+
onOpened: o[1] || (o[1] = (r) => l("opened")),
|
|
106
|
+
onClosed: o[2] || (o[2] = (r) => l("closed")),
|
|
107
|
+
onOpenAutoFocus: o[3] || (o[3] = (r) => l("openAutoFocus")),
|
|
108
|
+
onCloseAutoFocus: o[4] || (o[4] = (r) => l("closeAutoFocus"))
|
|
108
109
|
}), S({
|
|
109
|
-
default:
|
|
110
|
-
|
|
110
|
+
default: w(() => [
|
|
111
|
+
h(e.$slots, "default")
|
|
111
112
|
]),
|
|
112
113
|
_: 2
|
|
113
114
|
}, [
|
|
114
115
|
e.$slots.footer || s.showActionButtonGroup ? {
|
|
115
116
|
name: "footer",
|
|
116
|
-
fn:
|
|
117
|
-
|
|
118
|
-
s.showActionButtonGroup ? (
|
|
117
|
+
fn: w(() => [
|
|
118
|
+
h(e.$slots, "footer", {}, () => [
|
|
119
|
+
s.showActionButtonGroup ? (C(), g(E, {
|
|
119
120
|
key: 0,
|
|
120
121
|
"show-cancel-button": s.showCancelButton,
|
|
121
122
|
"show-submit-button": s.showSubmitButton,
|
|
@@ -2764,7 +2764,9 @@ export declare const VftSelect: SFCWithInstall<import("vue").DefineComponent<imp
|
|
|
2764
2764
|
hoverColor: {
|
|
2765
2765
|
type: import("vue").PropType<string>;
|
|
2766
2766
|
};
|
|
2767
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2767
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2768
|
+
error: (event: Event) => void;
|
|
2769
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2768
2770
|
icon: {
|
|
2769
2771
|
type: import("vue").PropType<string>;
|
|
2770
2772
|
required: true;
|
|
@@ -2787,7 +2789,9 @@ export declare const VftSelect: SFCWithInstall<import("vue").DefineComponent<imp
|
|
|
2787
2789
|
hoverColor: {
|
|
2788
2790
|
type: import("vue").PropType<string>;
|
|
2789
2791
|
};
|
|
2790
|
-
}>> & Readonly<{
|
|
2792
|
+
}>> & Readonly<{
|
|
2793
|
+
onError?: ((event: Event) => any) | undefined;
|
|
2794
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
2791
2795
|
}, {
|
|
2792
2796
|
ClickOutside: import("vue").ObjectDirective<any, any, string, any>;
|
|
2793
2797
|
}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
@@ -2760,7 +2760,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2760
2760
|
hoverColor: {
|
|
2761
2761
|
type: import("vue").PropType<string>;
|
|
2762
2762
|
};
|
|
2763
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2763
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2764
|
+
error: (event: Event) => void;
|
|
2765
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2764
2766
|
icon: {
|
|
2765
2767
|
type: import("vue").PropType<string>;
|
|
2766
2768
|
required: true;
|
|
@@ -2783,7 +2785,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2783
2785
|
hoverColor: {
|
|
2784
2786
|
type: import("vue").PropType<string>;
|
|
2785
2787
|
};
|
|
2786
|
-
}>> & Readonly<{
|
|
2788
|
+
}>> & Readonly<{
|
|
2789
|
+
onError?: ((event: Event) => any) | undefined;
|
|
2790
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
2787
2791
|
}, {
|
|
2788
2792
|
ClickOutside: import("vue").ObjectDirective<any, any, string, any>;
|
|
2789
2793
|
}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|