vft 0.0.471 → 0.0.472
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/iframe-layout/iframe-layout.vue.d.ts +1 -0
- package/es/components/iframe-layout/iframe-layout.vue2.js +21 -17
- package/es/components/iframe-layout/iframe-page.vue2.js +42 -17
- package/es/components/iframe-layout/index.d.ts +6 -0
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/iframe-layout/iframe-layout.vue.d.ts +1 -0
- package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
- package/lib/components/iframe-layout/index.d.ts +6 -0
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/theme-style/index.css +1 -1
- package/theme-style/src/iframe-layout.scss +8 -2
- package/theme-style/vft-iframe-layout.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { RouteLocationNormalized } from 'vue-router';
|
|
2
2
|
interface Props {
|
|
3
3
|
iframePages: RouteLocationNormalized[];
|
|
4
|
+
preloadPage?: boolean;
|
|
4
5
|
}
|
|
5
6
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
7
|
export default _default;
|
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as o, createElementBlock as t, openBlock as r, Fragment as a, renderList as n, withDirectives as p, createCommentVNode as f, createBlock as c, vShow as u } from "vue";
|
|
2
|
+
import "@vueuse/core";
|
|
3
|
+
import "@vft/utils";
|
|
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({
|
|
5
12
|
name: "vft-iframe-layout"
|
|
6
|
-
}),
|
|
7
|
-
...
|
|
13
|
+
}), C = /* @__PURE__ */ o({
|
|
14
|
+
...s,
|
|
8
15
|
props: {
|
|
9
|
-
iframePages: {}
|
|
16
|
+
iframePages: {},
|
|
17
|
+
preloadPage: { type: Boolean }
|
|
10
18
|
},
|
|
11
|
-
setup(
|
|
12
|
-
|
|
13
|
-
function c(t) {
|
|
14
|
-
return t.fullPath === i(f.currentRoute).fullPath;
|
|
15
|
-
}
|
|
16
|
-
return (t, P) => (r(!0), a(o, null, m(u.iframePages, (e) => (r(), a(o, {
|
|
19
|
+
setup(m) {
|
|
20
|
+
return (l, _) => (r(!0), t(a, null, n(m.iframePages, (e) => (r(), t(a, {
|
|
17
21
|
key: e.query ? e.fullPath : e.path
|
|
18
22
|
}, [
|
|
19
|
-
e.meta.frameSrc ?
|
|
23
|
+
e.meta.frameSrc && e.meta.loaded ? p((r(), c(i, {
|
|
20
24
|
key: 0,
|
|
21
25
|
"frame-src": e.meta.frameSrc
|
|
22
26
|
}, null, 8, ["frame-src"])), [
|
|
23
|
-
[
|
|
24
|
-
]) :
|
|
27
|
+
[u, e.fullPath === l.$route.fullPath]
|
|
28
|
+
]) : f("", !0)
|
|
25
29
|
], 64))), 128));
|
|
26
30
|
}
|
|
27
31
|
});
|
|
28
32
|
export {
|
|
29
|
-
|
|
33
|
+
C as default
|
|
30
34
|
};
|
|
@@ -1,32 +1,57 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as m, ref as n, onMounted as p, nextTick as d, withDirectives as u, createElementBlock as v, openBlock as _, normalizeClass as i, unref as r, createElementVNode as w } 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 g } 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
|
-
|
|
11
|
+
import { vLoading as h } from "../loading/directive.js";
|
|
12
|
+
import "../icon/index.js";
|
|
13
|
+
const b = ["src"], k = m({
|
|
12
14
|
name: "vft-iframe-page"
|
|
13
|
-
}),
|
|
14
|
-
...
|
|
15
|
+
}), M = /* @__PURE__ */ m({
|
|
16
|
+
...k,
|
|
15
17
|
props: {
|
|
16
|
-
frameSrc: {
|
|
18
|
+
frameSrc: {}
|
|
17
19
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
setup(s) {
|
|
21
|
+
const a = g("iframe-page"), e = n(), o = n(!0), t = () => {
|
|
22
|
+
o.value = !1;
|
|
23
|
+
}, l = () => {
|
|
24
|
+
o.value = !1;
|
|
25
|
+
}, c = () => {
|
|
26
|
+
if (!e.value) return;
|
|
27
|
+
e.value?.contentDocument?.readyState === "complete" && setTimeout(() => {
|
|
28
|
+
t();
|
|
29
|
+
}, 1e3);
|
|
30
|
+
};
|
|
31
|
+
return p(() => {
|
|
32
|
+
d(() => {
|
|
33
|
+
c();
|
|
34
|
+
});
|
|
35
|
+
}), (f, y) => u((_(), v("div", {
|
|
36
|
+
class: i(r(a).b())
|
|
37
|
+
}, [
|
|
38
|
+
w("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: i(r(a).b()),
|
|
46
|
+
src: s.frameSrc,
|
|
47
|
+
onLoad: t,
|
|
48
|
+
onError: l
|
|
49
|
+
}, null, 42, b)
|
|
50
|
+
], 2)), [
|
|
51
|
+
[r(h), o.value]
|
|
52
|
+
]);
|
|
28
53
|
}
|
|
29
54
|
});
|
|
30
55
|
export {
|
|
31
|
-
|
|
56
|
+
M as default
|
|
32
57
|
};
|
|
@@ -3,10 +3,16 @@ 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
|
+
preloadPage: {
|
|
7
|
+
type: import("vue").PropType<boolean>;
|
|
8
|
+
};
|
|
6
9
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
10
|
iframePages: {
|
|
8
11
|
type: import("vue").PropType<import("vue-router").RouteLocationNormalizedGeneric[]>;
|
|
9
12
|
required: true;
|
|
10
13
|
};
|
|
14
|
+
preloadPage: {
|
|
15
|
+
type: import("vue").PropType<boolean>;
|
|
16
|
+
};
|
|
11
17
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
12
18
|
export default VftIframeLayout;
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { RouteLocationNormalized } from 'vue-router';
|
|
2
2
|
interface Props {
|
|
3
3
|
iframePages: RouteLocationNormalized[];
|
|
4
|
+
preloadPage?: boolean;
|
|
4
5
|
}
|
|
5
6
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
7
|
export default _default;
|
|
@@ -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");require("@vueuse/core");require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const u=require("./iframe-page.vue2.cjs"),o=e.defineComponent({name:"vft-iframe-layout"}),l=e.defineComponent({...o,props:{iframePages:{},preloadPage:{type:Boolean}},setup(t){return(a,n)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.iframePages,r=>(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(u.default,{key:0,"frame-src":r.meta.frameSrc},null,8,["frame-src"])),[[e.vShow,r.fullPath===a.$route.fullPath]]):e.createCommentVNode("",!0)],64))),128))}});exports.default=l;
|
|
@@ -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 c=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const u=require("../loading/directive.cjs");require("../icon/index.cjs");const f=["src"],d=e.defineComponent({name:"vft-iframe-page"}),m=e.defineComponent({...d,props:{frameSrc:{}},setup(t){const a=c.useNamespace("iframe-page"),r=e.ref(),o=e.ref(!0),n=()=>{o.value=!1},i=()=>{o.value=!1},s=()=>{if(!r.value)return;r.value?.contentDocument?.readyState==="complete"&&setTimeout(()=>{n()},1e3)};return e.onMounted(()=>{e.nextTick(()=>{s()})}),(l,v)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(a).b())},[e.createElementVNode("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(a).b()),src:t.frameSrc,onLoad:n,onError:i},null,42,f)],2)),[[e.unref(u.vLoading),o.value]])}});exports.default=m;
|
|
@@ -3,10 +3,16 @@ 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
|
+
preloadPage: {
|
|
7
|
+
type: import("vue").PropType<boolean>;
|
|
8
|
+
};
|
|
6
9
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
10
|
iframePages: {
|
|
8
11
|
type: import("vue").PropType<import("vue-router").RouteLocationNormalizedGeneric[]>;
|
|
9
12
|
required: true;
|
|
10
13
|
};
|
|
14
|
+
preloadPage: {
|
|
15
|
+
type: import("vue").PropType<boolean>;
|
|
16
|
+
};
|
|
11
17
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
12
18
|
export default VftIframeLayout;
|
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.472";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.472",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"resize-detector": "0.3.0",
|
|
57
57
|
"sortablejs": "1.15.0",
|
|
58
58
|
"photoswipe": "5.4.4",
|
|
59
|
-
"@vft/constants": "0.0.75",
|
|
60
|
-
"@vft/store": "0.0.61",
|
|
61
59
|
"@vft/router": "0.0.71",
|
|
60
|
+
"@vft/store": "0.0.63",
|
|
61
|
+
"@vft/utils": "0.0.151",
|
|
62
62
|
"@vft/use": "0.0.92",
|
|
63
|
-
"@vft/
|
|
63
|
+
"@vft/constants": "0.0.75",
|
|
64
64
|
"@vft/directives": "0.0.36"
|
|
65
65
|
},
|
|
66
66
|
"vetur": {
|