vft 0.0.473 → 0.0.474
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/components/carousel/use-carousel.js +1 -1
- package/es/components/iframe-layout/iframe-layout.vue.d.ts +9 -2
- package/es/components/iframe-layout/iframe-layout.vue2.js +24 -21
- package/es/components/iframe-layout/iframe-page.vue.d.ts +7 -1
- package/es/components/iframe-layout/iframe-page.vue2.js +32 -35
- package/es/components/iframe-layout/index.d.ts +13 -6
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/iframe-layout/iframe-layout.vue.d.ts +9 -2
- package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-page.vue.d.ts +7 -1
- package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
- package/lib/components/iframe-layout/index.d.ts +13 -6
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/web-types.json +1 -1
|
@@ -11,7 +11,7 @@ import "../../hooks/use-model-toggle/index.js";
|
|
|
11
11
|
import { useOrderedChildren as ge } from "../../hooks/use-ordered-children/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
import {
|
|
14
|
+
import { carouselContextKey as Se, CAROUSEL_ITEM_NAME as H } from "./constants.js";
|
|
15
15
|
const L = 300, ze = (t, O, M) => {
|
|
16
16
|
const {
|
|
17
17
|
children: o,
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type { RouteLocationNormalized } from 'vue-router';
|
|
2
2
|
interface Props {
|
|
3
3
|
iframePages: RouteLocationNormalized[];
|
|
4
|
-
|
|
4
|
+
currentPath?: string;
|
|
5
5
|
}
|
|
6
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {
|
|
6
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {
|
|
7
|
+
iframePageRef: import("vue").Ref<any, any>;
|
|
8
|
+
iframeIsLoaded: import("vue").ComputedRef<boolean>;
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
"iframe-loaded": (item: import("vue-router").RouteLocationNormalizedGeneric, index: number) => void;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
12
|
+
"onIframe-loaded"?: ((item: import("vue-router").RouteLocationNormalizedGeneric, index: number) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
14
|
export default _default;
|
|
8
15
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
16
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1,34 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
import "../config-provider/hooks/use-global-config.js";
|
|
5
|
-
import "lodash-es";
|
|
6
|
-
import "../form/index.js";
|
|
7
|
-
import "../../hooks/use-model-toggle/index.js";
|
|
8
|
-
import "@popperjs/core";
|
|
9
|
-
import "../../hooks/use-z-index/index.js";
|
|
10
|
-
import i from "./iframe-page.vue2.js";
|
|
11
|
-
const s = o({
|
|
1
|
+
import { defineComponent as c, ref as p, computed as P, createElementBlock as n, openBlock as t, Fragment as m, renderList as _, withDirectives as g, createCommentVNode as k, createBlock as v, vShow as L } from "vue";
|
|
2
|
+
import y from "./iframe-page.vue2.js";
|
|
3
|
+
const B = c({
|
|
12
4
|
name: "vft-iframe-layout"
|
|
13
|
-
}),
|
|
14
|
-
...
|
|
5
|
+
}), x = /* @__PURE__ */ c({
|
|
6
|
+
...B,
|
|
15
7
|
props: {
|
|
16
8
|
iframePages: {},
|
|
17
|
-
|
|
9
|
+
currentPath: {}
|
|
18
10
|
},
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
emits: ["iframe-loaded"],
|
|
12
|
+
setup(o, { expose: l, emit: u }) {
|
|
13
|
+
const d = u, r = p(), s = (a, f) => {
|
|
14
|
+
d("iframe-loaded", a, f);
|
|
15
|
+
}, i = P(() => !r?.value?.[r?.value?.length - 1]?.isLoading);
|
|
16
|
+
return l({
|
|
17
|
+
iframePageRef: r,
|
|
18
|
+
iframeIsLoaded: i
|
|
19
|
+
}), (a, f) => (t(!0), n(m, null, _(o.iframePages, (e, h) => (t(), n(m, {
|
|
21
20
|
key: e.query ? e.fullPath : e.path
|
|
22
21
|
}, [
|
|
23
|
-
e.meta.frameSrc && e.meta.loaded ?
|
|
22
|
+
e.meta.frameSrc && e.meta.loaded ? g((t(), v(y, {
|
|
24
23
|
key: 0,
|
|
24
|
+
ref_for: !0,
|
|
25
|
+
ref_key: "iframePageRef",
|
|
26
|
+
ref: r,
|
|
27
|
+
onLoaded: (S) => s(e, h),
|
|
25
28
|
"frame-src": e.meta.frameSrc
|
|
26
|
-
}, null, 8, ["frame-src"])), [
|
|
27
|
-
[
|
|
28
|
-
]) :
|
|
29
|
+
}, null, 8, ["onLoaded", "frame-src"])), [
|
|
30
|
+
[L, e.fullPath === (o.currentPath || a.$route.fullPath)]
|
|
31
|
+
]) : k("", !0)
|
|
29
32
|
], 64))), 128));
|
|
30
33
|
}
|
|
31
34
|
});
|
|
32
35
|
export {
|
|
33
|
-
|
|
36
|
+
x as default
|
|
34
37
|
};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
interface IframePageProps {
|
|
2
2
|
frameSrc: string;
|
|
3
3
|
}
|
|
4
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IframePageProps>>, {
|
|
4
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IframePageProps>>, {
|
|
5
|
+
isLoading: import("vue").Ref<boolean, boolean>;
|
|
6
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
loaded: () => void;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IframePageProps>>> & Readonly<{
|
|
9
|
+
onLoaded?: (() => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
5
11
|
export default _default;
|
|
6
12
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
7
13
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1,57 +1,54 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as n, ref as t, onMounted as u, nextTick as a, createElementBlock as _, openBlock as v, normalizeClass as w, unref as g } 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 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
|
-
|
|
12
|
-
import "../icon/index.js";
|
|
13
|
-
const b = ["src"], k = m({
|
|
11
|
+
const b = ["src"], k = n({
|
|
14
12
|
name: "vft-iframe-page"
|
|
15
|
-
}),
|
|
13
|
+
}), I = /* @__PURE__ */ n({
|
|
16
14
|
...k,
|
|
17
15
|
props: {
|
|
18
16
|
frameSrc: {}
|
|
19
17
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
emits: ["loaded"],
|
|
19
|
+
setup(i, { expose: m, emit: s }) {
|
|
20
|
+
const l = s, c = h("iframe-page"), e = t(), o = t(!0), r = () => {
|
|
21
|
+
a(() => {
|
|
22
|
+
o.value = !1, l("loaded");
|
|
23
|
+
});
|
|
24
|
+
}, f = () => {
|
|
25
|
+
r();
|
|
26
|
+
}, p = () => {
|
|
26
27
|
if (!e.value) return;
|
|
27
28
|
e.value?.contentDocument?.readyState === "complete" && setTimeout(() => {
|
|
28
|
-
|
|
29
|
+
r();
|
|
29
30
|
}, 1e3);
|
|
30
31
|
};
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
return u(() => {
|
|
33
|
+
o.value = !0, a(() => {
|
|
34
|
+
p();
|
|
34
35
|
});
|
|
35
|
-
}), (
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, null, 42, b)
|
|
50
|
-
], 2)), [
|
|
51
|
-
[r(h), o.value]
|
|
52
|
-
]);
|
|
36
|
+
}), m({
|
|
37
|
+
isLoading: o
|
|
38
|
+
}), (d, x) => (v(), _("iframe", {
|
|
39
|
+
ref_key: "iframeRef",
|
|
40
|
+
ref: e,
|
|
41
|
+
sandbox: "allow-scripts allow-same-origin allow-top-navigation allow-modals allow-forms allow-top-navigation-by-user-activation",
|
|
42
|
+
referrerPolicy: "no-referrer-when-downgrade",
|
|
43
|
+
frameborder: "0",
|
|
44
|
+
style: { border: "none", outline: "none" },
|
|
45
|
+
class: w(g(c).b()),
|
|
46
|
+
src: i.frameSrc,
|
|
47
|
+
onLoad: r,
|
|
48
|
+
onError: f
|
|
49
|
+
}, null, 42, b));
|
|
53
50
|
}
|
|
54
51
|
});
|
|
55
52
|
export {
|
|
56
|
-
|
|
53
|
+
I as default
|
|
57
54
|
};
|
|
@@ -3,16 +3,23 @@ export declare const VftIframeLayout: import("vft/es/utils").SFCWithInstall<impo
|
|
|
3
3
|
type: import("vue").PropType<import("vue-router").RouteLocationNormalizedGeneric[]>;
|
|
4
4
|
required: true;
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
type: import("vue").PropType<
|
|
6
|
+
currentPath: {
|
|
7
|
+
type: import("vue").PropType<string>;
|
|
8
8
|
};
|
|
9
|
-
}>, {
|
|
9
|
+
}>, {
|
|
10
|
+
iframePageRef: import("vue").Ref<any, any>;
|
|
11
|
+
iframeIsLoaded: import("vue").ComputedRef<boolean>;
|
|
12
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
"iframe-loaded": (item: import("vue-router").RouteLocationNormalizedGeneric, index: number) => void;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
15
|
iframePages: {
|
|
11
16
|
type: import("vue").PropType<import("vue-router").RouteLocationNormalizedGeneric[]>;
|
|
12
17
|
required: true;
|
|
13
18
|
};
|
|
14
|
-
|
|
15
|
-
type: import("vue").PropType<
|
|
19
|
+
currentPath: {
|
|
20
|
+
type: import("vue").PropType<string>;
|
|
16
21
|
};
|
|
17
|
-
}>> & Readonly<{
|
|
22
|
+
}>> & Readonly<{
|
|
23
|
+
"onIframe-loaded"?: ((item: import("vue-router").RouteLocationNormalizedGeneric, index: number) => any) | undefined;
|
|
24
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
18
25
|
export default VftIframeLayout;
|
|
@@ -13,8 +13,8 @@ import "../../hooks/use-z-index/index.js";
|
|
|
13
13
|
import { UPDATE_MODEL_EVENT as Q } from "@vft/constants";
|
|
14
14
|
import { useAttrs as Ze, useCursor as _e } from "@vft/use";
|
|
15
15
|
import { calcTextareaHeight as he } from "./utils.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { useFormItem as et, useFormItemInputId as tt } from "../form/hooks/use-form-item.js";
|
|
17
|
+
import { useFormSize as at, useFormDisabled as nt } from "../form/hooks/use-form-common-props.js";
|
|
18
18
|
const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"], st = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"], It = /* @__PURE__ */ Oe({
|
|
19
19
|
__name: "input",
|
|
20
20
|
props: {
|
|
@@ -85,9 +85,9 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
|
|
|
85
85
|
n.is("focus", v.value)
|
|
86
86
|
]), d = Ze({
|
|
87
87
|
excludeKeys: l(() => Object.keys(X.value))
|
|
88
|
-
}), { form: Ce, formItem: F } =
|
|
88
|
+
}), { form: Ce, formItem: F } = et(), { inputId: Y } = tt(we.props, {
|
|
89
89
|
formItemContext: F
|
|
90
|
-
}), ke =
|
|
90
|
+
}), ke = at(), x = nt(), n = ye("input"), Z = ye("textarea"), M = H(), p = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || p.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
|
|
91
91
|
icon: "icon-circle-close",
|
|
92
92
|
size: 16
|
|
93
93
|
})), te = l(() => Ce?.statusIcon ?? !1), I = l(() => F?.validateState || ""), ae = l(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowRef as B, ref as L, computed as c, watch as G } from "vue";
|
|
2
2
|
import { EVENT_CODE as g } from "../../../constants/aria.js";
|
|
3
|
-
import { CHANGE_EVENT as i,
|
|
3
|
+
import { CHANGE_EVENT as i, UPDATE_MODEL_EVENT as d, INPUT_EVENT as H } from "../../../constants/event.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import { isUndefined as K } from "@vft/utils";
|
|
6
6
|
import { debugWarn as C } from "../../../utils/error.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as X, computed as j, ref as re, unref as c, useSlots as oe, createVNode as a, mergeProps as q, withDirectives as ie, vShow as ne,
|
|
1
|
+
import { defineComponent as X, computed as j, ref as re, unref as c, useSlots as oe, createVNode as a, mergeProps as q, withDirectives as ie, vShow as ne, createTextVNode as O, isVNode as le, resolveComponent as N } from "vue";
|
|
2
2
|
import "../alert/index.js";
|
|
3
3
|
import "../avatar/index.js";
|
|
4
4
|
import "../avatar-stack/index.js";
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
package/es/utils/vue/vnode.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hasOwn as m, camelize as N, isArray as E } from "@vft/utils";
|
|
2
2
|
import { isVNode as o, Fragment as S, Comment as A, Text as s, createCommentVNode as L, createBlock as _, openBlock as C } from "vue";
|
|
3
3
|
import { debugWarn as O } from "../error.js";
|
|
4
4
|
const R = "utils/vue/vnode";
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type { RouteLocationNormalized } from 'vue-router';
|
|
2
2
|
interface Props {
|
|
3
3
|
iframePages: RouteLocationNormalized[];
|
|
4
|
-
|
|
4
|
+
currentPath?: string;
|
|
5
5
|
}
|
|
6
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {
|
|
6
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {
|
|
7
|
+
iframePageRef: import("vue").Ref<any, any>;
|
|
8
|
+
iframeIsLoaded: import("vue").ComputedRef<boolean>;
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
"iframe-loaded": (item: import("vue-router").RouteLocationNormalizedGeneric, index: number) => void;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
12
|
+
"onIframe-loaded"?: ((item: import("vue-router").RouteLocationNormalizedGeneric, index: number) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
14
|
export default _default;
|
|
8
15
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
16
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue")
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("./iframe-page.vue2.cjs"),i=e.defineComponent({name:"vft-iframe-layout"}),_=e.defineComponent({...i,props:{iframePages:{},currentPath:{}},emits:["iframe-loaded"],setup(o,{expose:u,emit:l}){const c=l,t=e.ref(),f=(a,n)=>{c("iframe-loaded",a,n)},d=e.computed(()=>!t?.value?.[t?.value?.length-1]?.isLoading);return u({iframePageRef:t,iframeIsLoaded:d}),(a,n)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.iframePages,(r,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r.query?r.fullPath:r.path},[r.meta.frameSrc&&r.meta.loaded?e.withDirectives((e.openBlock(),e.createBlock(m.default,{key:0,ref_for:!0,ref_key:"iframePageRef",ref:t,onLoaded:p=>f(r,s),"frame-src":r.meta.frameSrc},null,8,["onLoaded","frame-src"])),[[e.vShow,r.fullPath===(o.currentPath||a.$route.fullPath)]]):e.createCommentVNode("",!0)],64))),128))}});exports.default=_;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
interface IframePageProps {
|
|
2
2
|
frameSrc: string;
|
|
3
3
|
}
|
|
4
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IframePageProps>>, {
|
|
4
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IframePageProps>>, {
|
|
5
|
+
isLoading: import("vue").Ref<boolean, boolean>;
|
|
6
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
loaded: () => void;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IframePageProps>>> & Readonly<{
|
|
9
|
+
onLoaded?: (() => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
5
11
|
export default _default;
|
|
6
12
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
7
13
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("@vueuse/core");require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("@vueuse/core");require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");const d=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const m=["src"],p=e.defineComponent({name:"vft-iframe-page"}),_=e.defineComponent({...p,props:{frameSrc:{}},emits:["loaded"],setup(a,{expose:t,emit:i}){const s=i,l=d.useNamespace("iframe-page"),r=e.ref(),o=e.ref(!0),n=()=>{e.nextTick(()=>{o.value=!1,s("loaded")})},c=()=>{n()},u=()=>{if(!r.value)return;r.value?.contentDocument?.readyState==="complete"&&setTimeout(()=>{n()},1e3)};return e.onMounted(()=>{o.value=!0,e.nextTick(()=>{u()})}),t({isLoading:o}),(f,v)=>(e.openBlock(),e.createElementBlock("iframe",{ref_key:"iframeRef",ref:r,sandbox:"allow-scripts allow-same-origin allow-top-navigation allow-modals allow-forms allow-top-navigation-by-user-activation",referrerPolicy:"no-referrer-when-downgrade",frameborder:"0",style:{border:"none",outline:"none"},class:e.normalizeClass(e.unref(l).b()),src:a.frameSrc,onLoad:n,onError:c},null,42,m))}});exports.default=_;
|
|
@@ -3,16 +3,23 @@ export declare const VftIframeLayout: import("vft/es/utils").SFCWithInstall<impo
|
|
|
3
3
|
type: import("vue").PropType<import("vue-router").RouteLocationNormalizedGeneric[]>;
|
|
4
4
|
required: true;
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
type: import("vue").PropType<
|
|
6
|
+
currentPath: {
|
|
7
|
+
type: import("vue").PropType<string>;
|
|
8
8
|
};
|
|
9
|
-
}>, {
|
|
9
|
+
}>, {
|
|
10
|
+
iframePageRef: import("vue").Ref<any, any>;
|
|
11
|
+
iframeIsLoaded: import("vue").ComputedRef<boolean>;
|
|
12
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
"iframe-loaded": (item: import("vue-router").RouteLocationNormalizedGeneric, index: number) => void;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
15
|
iframePages: {
|
|
11
16
|
type: import("vue").PropType<import("vue-router").RouteLocationNormalizedGeneric[]>;
|
|
12
17
|
required: true;
|
|
13
18
|
};
|
|
14
|
-
|
|
15
|
-
type: import("vue").PropType<
|
|
19
|
+
currentPath: {
|
|
20
|
+
type: import("vue").PropType<string>;
|
|
16
21
|
};
|
|
17
|
-
}>> & Readonly<{
|
|
22
|
+
}>> & Readonly<{
|
|
23
|
+
"onIframe-loaded"?: ((item: import("vue-router").RouteLocationNormalizedGeneric, index: number) => any) | undefined;
|
|
24
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
18
25
|
export default VftIframeLayout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../form/index.cjs");const b=require("../icon/index.cjs"),Y=require("@vueuse/core"),s=require("@vft/utils"),T=require("../../utils/error.cjs");require("../config-provider/hooks/use-global-config.cjs");const Be=require("lodash-es"),Z=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const q=require("@vft/constants"),_=require("@vft/use"),ee=require("./utils.cjs"),te=require("../form/hooks/use-form-common-props.cjs"),ne=require("../form/hooks/use-form-item.cjs"),Ve=["role"],Ie=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder","form"],Se=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form"],ze=e.defineComponent({__name:"input",props:{id:{},size:{default:""},disabled:{type:Boolean},modelValue:{},type:{default:"text"},resize:{},autosize:{type:[Object,Boolean],default:!1},autocomplete:{default:"off"},formatter:{},parser:{},placeholder:{},form:{},readonly:{type:Boolean},clearable:{type:Boolean},showPassword:{type:Boolean},showWordLimit:{type:Boolean},suffixIcon:{},prefixIcon:{},clearIcon:{},containerRole:{},label:{},tabindex:{default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:[Boolean,null,String,Object,Array]}},emits:{[q.UPDATE_MODEL_EVENT]:t=>s.isString(t),input:t=>s.isString(t),change:t=>s.isString(t),suffixClick:t=>s.isString(t),prefixClick:t=>s.isString(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,enter:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},setup(t,{expose:oe,emit:ae}){const l=ae,p=e.useAttrs(),i=e.useSlots(),M=e.computed(()=>{const n={};return t.containerRole==="combobox"&&(n["aria-haspopup"]=p["aria-haspopup"],n["aria-owns"]=p["aria-owns"],n["aria-expanded"]=p["aria-expanded"]),n}),le=e.computed(()=>[t.type==="textarea"?A.b():o.b(),o.m(ie.value),o.is("disabled",m.value),o.is("exceed",fe.value),o.is("focus",c.value),{[o.b("group")]:i.prepend||i.append,[o.bm("group","append")]:i.append,[o.bm("group","prepend")]:i.prepend,[o.m("prefix")]:i.prefix||t.prefixIcon,[o.m("suffix")]:i.suffix||t.suffixIcon||t.clearable||t.showPassword,[o.bm("suffix","password-clear")]:E.value&&z.value},p.class]),se=e.getCurrentInstance(),re=e.computed(()=>[o.e("wrapper"),o.is("focus",c.value)]),r=_.useAttrs({excludeKeys:e.computed(()=>Object.keys(M.value))}),{form:ue,formItem:k}=ne.useFormItem(),{inputId:F}=ne.useFormItemInputId(se.props,{formItemContext:k}),ie=te.useFormSize(),m=te.useFormDisabled(),o=Z.useNamespace("input"),A=Z.useNamespace("textarea"),C=e.shallowRef(),f=e.shallowRef(),c=e.ref(!1),V=e.ref(!1),y=e.ref(!1),w=e.ref(!1),D=e.ref(),I=e.shallowRef(t.inputStyle),h=e.computed(()=>C.value||f.value),S=e.computed(()=>s.singleAttrToObj(t.prefixIcon,"icon",{size:16})),O=e.computed(()=>s.singleAttrToObj(t.suffixIcon,"icon",{size:16})),ce=e.computed(()=>s.singleAttrToObj(t.clearIcon,"icon",{icon:"icon-circle-close",size:16})),R=e.computed(()=>ue?.statusIcon??!1),x=e.computed(()=>k?.validateState||""),K=e.computed(()=>x.value&&{validating:"icon-loading",success:"icon-circle-check",error:"icon-circle-close"}[x.value]),de=e.computed(()=>w.value?{icon:"icon-view",size:16}:{icon:"icon-hide",size:16}),me=e.computed(()=>[p.style,t.inputStyle]),$=e.computed(()=>[t.inputStyle,I.value,{resize:t.resize}]),u=e.computed(()=>Be.isNil(t.modelValue)?"":String(t.modelValue)),E=e.computed(()=>t.clearable&&!m.value&&!t.readonly&&!!u.value&&(c.value||V.value)),z=e.computed(()=>t.showPassword&&!m.value&&!t.readonly&&!!u.value&&(!!u.value||c.value)),v=e.computed(()=>t.showWordLimit&&!!r.value.maxlength&&(t.type==="text"||t.type==="textarea")&&!m.value&&!t.readonly&&!t.showPassword),N=e.computed(()=>Array.from(u.value).length),fe=e.computed(()=>!!v.value&&N.value>Number(r.value.maxlength)),ve=e.computed(()=>!!i.suffix||!!t.suffixIcon||E.value||t.showPassword||v.value||!!x.value&&R.value),[pe,ye]=_.useCursor(C);Y.useResizeObserver(f,n=>{if(!v.value||t.resize!=="both")return;const a=n[0],{width:d}=a.contentRect;D.value={right:`calc(100% - ${d+15+6}px)`}});const B=()=>{if(!(!Y.isClient||t.type!=="textarea"))if(t.autosize){const n=s.isObject(t.autosize)?t.autosize.minRows:void 0,a=s.isObject(t.autosize)?t.autosize.maxRows:void 0;I.value={...ee.calcTextareaHeight(f.value,n,a)}}else I.value={minHeight:ee.calcTextareaHeight(f.value).minHeight}},g=()=>{const n=h.value;!n||n.value===u.value||(n.value=u.value)},P=async n=>{pe();let{value:a}=n.target;if(r.value.maxlength&&a.length>=r.value.maxlength&&(a=a.slice(0,Number(r.value.maxlength))),t.formatter&&(a=t.parser?t.parser(a):a,a=t.formatter(a)),!y.value){if(a===u.value){g();return}l(q.UPDATE_MODEL_EVENT,a),l("input",a),await e.nextTick(),g(),ye()}},j=n=>{l("change",n.target.value)},he=()=>{l("suffixClick",t.modelValue)},xe=()=>{l("prefixClick",t.modelValue)},L=n=>{l("compositionstart",n),y.value=!0},ge=n=>/([(\uAC00-\uD7AF)|\u3130-\u318F])+/.test(n),W=n=>{l("compositionupdate",n);const a=n.target?.value,d=a[a.length-1]||"";y.value=!ge(d)},H=n=>{l("compositionend",n),y.value&&(y.value=!1,P(n))},be=()=>{w.value=!w.value,U()},U=async()=>{await e.nextTick(),h.value?.focus()},ke=()=>h.value?.blur(),G=n=>{c.value=!0,l("focus",n)},J=n=>{c.value=!1,l("blur",n),t.validateEvent&&k?.validate?.("blur").catch(a=>T.debugWarn(a))},Ce=n=>{V.value=!1,l("mouseleave",n)},we=n=>{V.value=!0,l("mouseenter",n)},Q=n=>{const a=n.key;if(n.target.type==="number"&&["e","+","-0","E"].includes(a))return n.returnValue=!1,!1;l("keydown",n)},Ee=()=>{h.value?.select()},X=()=>{l(q.UPDATE_MODEL_EVENT,""),l("change",""),l("clear"),l("input","")};return e.watch(()=>t.modelValue,()=>{e.nextTick(()=>B()),t.validateEvent&&k?.validate?.("change").catch(n=>T.debugWarn(n))}),e.watch(u,()=>g()),e.watch(()=>t.type,async()=>{await e.nextTick(),g(),B()}),e.onMounted(()=>{!t.formatter&&t.parser&&T.debugWarn("VftInput","If you set the parser, you also need to set the formatter."),g(),e.nextTick(B)}),oe({input:C,textarea:f,ref:h,textareaStyle:$,autosize:t.autosize,focus:U,blur:ke,select:Ee,clear:X,resizeTextarea:B}),(n,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps(M.value,{class:le.value,style:me.value,role:t.containerRole,onMouseenter:we,onMouseleave:Ce,onMousewheel:a[1]||(a[1]=d=>t.type==="number"&&c.value?d.preventDefault():null)}),[t.type!=="textarea"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.$slots.prepend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).be("group","prepend"))},[e.renderSlot(n.$slots,"prepend")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(re.value)},[n.$slots.prefix||S.value?.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(o).e("prefix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("prefix-inner")),onClick:xe},[e.renderSlot(n.$slots,"prefix"),S.value?.icon?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:0,pointer:""},S.value,{class:e.unref(o).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(F),ref_key:"input",ref:C,class:e.unref(o).e("inner")},e.unref(r),{type:t.showPassword?w.value?"text":"password":t.type,disabled:e.unref(m),formatter:t.formatter,parser:t.parser,readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-label":t.label,placeholder:t.placeholder,style:t.inputStyle,form:t.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q,onKeyup:a[0]||(a[0]=e.withKeys(d=>l("enter"),["enter"]))}),null,16,Ie),ve.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(o).e("suffix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("suffix-inner")),onClick:he},[!E.value||!z.value||!v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(n.$slots,"suffix"),O.value?.icon?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:0},O.value,{class:e.unref(o).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:1,pointer:"",class:[e.unref(o).e("icon"),e.unref(o).e("clear")]},ce.value,{onMousedown:e.withModifiers(e.unref(s.noop),["prevent"]),onClick:e.withModifiers(X,["stop"])}),null,16,["class","onMousedown"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:2},de.value,{class:[e.unref(o).e("icon"),e.unref(o).e("password")],onClick:be}),null,16,["class"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(o).e("count"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("count-inner"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),3)],2)):e.createCommentVNode("",!0),x.value&&K.value&&R.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),{key:4,icon:K.value,class:e.normalizeClass([e.unref(o).e("icon"),e.unref(o).e("validateIcon"),e.unref(o).is("loading",x.value==="validating")])},null,8,["icon","class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0)],2),n.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).be("group","append"))},[e.renderSlot(n.$slots,"append")],2)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("textarea",e.mergeProps({id:e.unref(F),ref_key:"textarea",ref:f,class:e.unref(A).e("inner")},e.unref(r),{tabindex:t.tabindex,disabled:e.unref(m),readonly:t.readonly,autocomplete:t.autocomplete,style:$.value,"aria-label":t.label,placeholder:t.placeholder,form:t.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q}),null,16,Se),v.value?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(D.value),class:e.normalizeClass(e.unref(o).e("count"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),7)):e.createCommentVNode("",!0)],64))],16,Ve)),[[e.vShow,t.type!=="hidden"]])}});exports.default=ze;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../form/index.cjs");const b=require("../icon/index.cjs"),Y=require("@vueuse/core"),s=require("@vft/utils"),T=require("../../utils/error.cjs");require("../config-provider/hooks/use-global-config.cjs");const Be=require("lodash-es"),Z=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const q=require("@vft/constants"),_=require("@vft/use"),ee=require("./utils.cjs"),te=require("../form/hooks/use-form-item.cjs"),ne=require("../form/hooks/use-form-common-props.cjs"),Ve=["role"],Ie=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder","form"],Se=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form"],ze=e.defineComponent({__name:"input",props:{id:{},size:{default:""},disabled:{type:Boolean},modelValue:{},type:{default:"text"},resize:{},autosize:{type:[Object,Boolean],default:!1},autocomplete:{default:"off"},formatter:{},parser:{},placeholder:{},form:{},readonly:{type:Boolean},clearable:{type:Boolean},showPassword:{type:Boolean},showWordLimit:{type:Boolean},suffixIcon:{},prefixIcon:{},clearIcon:{},containerRole:{},label:{},tabindex:{default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:[Boolean,null,String,Object,Array]}},emits:{[q.UPDATE_MODEL_EVENT]:t=>s.isString(t),input:t=>s.isString(t),change:t=>s.isString(t),suffixClick:t=>s.isString(t),prefixClick:t=>s.isString(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,enter:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},setup(t,{expose:oe,emit:ae}){const l=ae,p=e.useAttrs(),i=e.useSlots(),M=e.computed(()=>{const n={};return t.containerRole==="combobox"&&(n["aria-haspopup"]=p["aria-haspopup"],n["aria-owns"]=p["aria-owns"],n["aria-expanded"]=p["aria-expanded"]),n}),le=e.computed(()=>[t.type==="textarea"?A.b():o.b(),o.m(ie.value),o.is("disabled",m.value),o.is("exceed",fe.value),o.is("focus",c.value),{[o.b("group")]:i.prepend||i.append,[o.bm("group","append")]:i.append,[o.bm("group","prepend")]:i.prepend,[o.m("prefix")]:i.prefix||t.prefixIcon,[o.m("suffix")]:i.suffix||t.suffixIcon||t.clearable||t.showPassword,[o.bm("suffix","password-clear")]:E.value&&z.value},p.class]),se=e.getCurrentInstance(),re=e.computed(()=>[o.e("wrapper"),o.is("focus",c.value)]),r=_.useAttrs({excludeKeys:e.computed(()=>Object.keys(M.value))}),{form:ue,formItem:k}=te.useFormItem(),{inputId:F}=te.useFormItemInputId(se.props,{formItemContext:k}),ie=ne.useFormSize(),m=ne.useFormDisabled(),o=Z.useNamespace("input"),A=Z.useNamespace("textarea"),C=e.shallowRef(),f=e.shallowRef(),c=e.ref(!1),V=e.ref(!1),y=e.ref(!1),w=e.ref(!1),D=e.ref(),I=e.shallowRef(t.inputStyle),h=e.computed(()=>C.value||f.value),S=e.computed(()=>s.singleAttrToObj(t.prefixIcon,"icon",{size:16})),O=e.computed(()=>s.singleAttrToObj(t.suffixIcon,"icon",{size:16})),ce=e.computed(()=>s.singleAttrToObj(t.clearIcon,"icon",{icon:"icon-circle-close",size:16})),R=e.computed(()=>ue?.statusIcon??!1),x=e.computed(()=>k?.validateState||""),K=e.computed(()=>x.value&&{validating:"icon-loading",success:"icon-circle-check",error:"icon-circle-close"}[x.value]),de=e.computed(()=>w.value?{icon:"icon-view",size:16}:{icon:"icon-hide",size:16}),me=e.computed(()=>[p.style,t.inputStyle]),$=e.computed(()=>[t.inputStyle,I.value,{resize:t.resize}]),u=e.computed(()=>Be.isNil(t.modelValue)?"":String(t.modelValue)),E=e.computed(()=>t.clearable&&!m.value&&!t.readonly&&!!u.value&&(c.value||V.value)),z=e.computed(()=>t.showPassword&&!m.value&&!t.readonly&&!!u.value&&(!!u.value||c.value)),v=e.computed(()=>t.showWordLimit&&!!r.value.maxlength&&(t.type==="text"||t.type==="textarea")&&!m.value&&!t.readonly&&!t.showPassword),N=e.computed(()=>Array.from(u.value).length),fe=e.computed(()=>!!v.value&&N.value>Number(r.value.maxlength)),ve=e.computed(()=>!!i.suffix||!!t.suffixIcon||E.value||t.showPassword||v.value||!!x.value&&R.value),[pe,ye]=_.useCursor(C);Y.useResizeObserver(f,n=>{if(!v.value||t.resize!=="both")return;const a=n[0],{width:d}=a.contentRect;D.value={right:`calc(100% - ${d+15+6}px)`}});const B=()=>{if(!(!Y.isClient||t.type!=="textarea"))if(t.autosize){const n=s.isObject(t.autosize)?t.autosize.minRows:void 0,a=s.isObject(t.autosize)?t.autosize.maxRows:void 0;I.value={...ee.calcTextareaHeight(f.value,n,a)}}else I.value={minHeight:ee.calcTextareaHeight(f.value).minHeight}},g=()=>{const n=h.value;!n||n.value===u.value||(n.value=u.value)},P=async n=>{pe();let{value:a}=n.target;if(r.value.maxlength&&a.length>=r.value.maxlength&&(a=a.slice(0,Number(r.value.maxlength))),t.formatter&&(a=t.parser?t.parser(a):a,a=t.formatter(a)),!y.value){if(a===u.value){g();return}l(q.UPDATE_MODEL_EVENT,a),l("input",a),await e.nextTick(),g(),ye()}},j=n=>{l("change",n.target.value)},he=()=>{l("suffixClick",t.modelValue)},xe=()=>{l("prefixClick",t.modelValue)},L=n=>{l("compositionstart",n),y.value=!0},ge=n=>/([(\uAC00-\uD7AF)|\u3130-\u318F])+/.test(n),W=n=>{l("compositionupdate",n);const a=n.target?.value,d=a[a.length-1]||"";y.value=!ge(d)},H=n=>{l("compositionend",n),y.value&&(y.value=!1,P(n))},be=()=>{w.value=!w.value,U()},U=async()=>{await e.nextTick(),h.value?.focus()},ke=()=>h.value?.blur(),G=n=>{c.value=!0,l("focus",n)},J=n=>{c.value=!1,l("blur",n),t.validateEvent&&k?.validate?.("blur").catch(a=>T.debugWarn(a))},Ce=n=>{V.value=!1,l("mouseleave",n)},we=n=>{V.value=!0,l("mouseenter",n)},Q=n=>{const a=n.key;if(n.target.type==="number"&&["e","+","-0","E"].includes(a))return n.returnValue=!1,!1;l("keydown",n)},Ee=()=>{h.value?.select()},X=()=>{l(q.UPDATE_MODEL_EVENT,""),l("change",""),l("clear"),l("input","")};return e.watch(()=>t.modelValue,()=>{e.nextTick(()=>B()),t.validateEvent&&k?.validate?.("change").catch(n=>T.debugWarn(n))}),e.watch(u,()=>g()),e.watch(()=>t.type,async()=>{await e.nextTick(),g(),B()}),e.onMounted(()=>{!t.formatter&&t.parser&&T.debugWarn("VftInput","If you set the parser, you also need to set the formatter."),g(),e.nextTick(B)}),oe({input:C,textarea:f,ref:h,textareaStyle:$,autosize:t.autosize,focus:U,blur:ke,select:Ee,clear:X,resizeTextarea:B}),(n,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps(M.value,{class:le.value,style:me.value,role:t.containerRole,onMouseenter:we,onMouseleave:Ce,onMousewheel:a[1]||(a[1]=d=>t.type==="number"&&c.value?d.preventDefault():null)}),[t.type!=="textarea"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.$slots.prepend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).be("group","prepend"))},[e.renderSlot(n.$slots,"prepend")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(re.value)},[n.$slots.prefix||S.value?.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(o).e("prefix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("prefix-inner")),onClick:xe},[e.renderSlot(n.$slots,"prefix"),S.value?.icon?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:0,pointer:""},S.value,{class:e.unref(o).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(F),ref_key:"input",ref:C,class:e.unref(o).e("inner")},e.unref(r),{type:t.showPassword?w.value?"text":"password":t.type,disabled:e.unref(m),formatter:t.formatter,parser:t.parser,readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-label":t.label,placeholder:t.placeholder,style:t.inputStyle,form:t.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q,onKeyup:a[0]||(a[0]=e.withKeys(d=>l("enter"),["enter"]))}),null,16,Ie),ve.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(o).e("suffix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("suffix-inner")),onClick:he},[!E.value||!z.value||!v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(n.$slots,"suffix"),O.value?.icon?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:0},O.value,{class:e.unref(o).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:1,pointer:"",class:[e.unref(o).e("icon"),e.unref(o).e("clear")]},ce.value,{onMousedown:e.withModifiers(e.unref(s.noop),["prevent"]),onClick:e.withModifiers(X,["stop"])}),null,16,["class","onMousedown"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:2},de.value,{class:[e.unref(o).e("icon"),e.unref(o).e("password")],onClick:be}),null,16,["class"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(o).e("count"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("count-inner"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),3)],2)):e.createCommentVNode("",!0),x.value&&K.value&&R.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),{key:4,icon:K.value,class:e.normalizeClass([e.unref(o).e("icon"),e.unref(o).e("validateIcon"),e.unref(o).is("loading",x.value==="validating")])},null,8,["icon","class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0)],2),n.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).be("group","append"))},[e.renderSlot(n.$slots,"append")],2)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("textarea",e.mergeProps({id:e.unref(F),ref_key:"textarea",ref:f,class:e.unref(A).e("inner")},e.unref(r),{tabindex:t.tabindex,disabled:e.unref(m),readonly:t.readonly,autocomplete:t.autocomplete,style:$.value,"aria-label":t.label,placeholder:t.placeholder,form:t.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q}),null,16,Se),v.value?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(D.value),class:e.normalizeClass(e.unref(o).e("count"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),7)):e.createCommentVNode("",!0)],64))],16,Ve)),[[e.vShow,t.type!=="hidden"]])}});exports.default=ze;
|
package/lib/package.json.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.0.474";exports.version=e;
|
package/lib/package.json.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.474",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"resize-detector": "0.3.0",
|
|
57
57
|
"sortablejs": "1.15.0",
|
|
58
58
|
"photoswipe": "5.4.4",
|
|
59
|
-
"@vft/utils": "0.0.151",
|
|
60
59
|
"@vft/store": "0.0.63",
|
|
61
|
-
"@vft/
|
|
62
|
-
"@vft/router": "0.0.71",
|
|
60
|
+
"@vft/utils": "0.0.151",
|
|
63
61
|
"@vft/use": "0.0.92",
|
|
64
|
-
"@vft/
|
|
62
|
+
"@vft/router": "0.0.71",
|
|
63
|
+
"@vft/directives": "0.0.36",
|
|
64
|
+
"@vft/constants": "0.0.75"
|
|
65
65
|
},
|
|
66
66
|
"vetur": {
|
|
67
67
|
"tags": "tags.json",
|