@chewel611/naive-ui-plus 0.0.19 → 0.0.21
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/LICENSE +21 -0
- package/dist/index.js +804 -676
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/es/application/PApplication.vue.js +16 -16
- package/es/application/index.d.ts +1 -2
- package/es/application/index.js +4 -4
- package/es/components.d.ts +9 -5
- package/es/components.js +20 -9
- package/es/error/P403.css +1 -0
- package/es/error/P403.d.ts +2 -0
- package/es/error/P403.vue.js +19 -0
- package/es/error/P404.css +1 -0
- package/es/error/P404.d.ts +2 -0
- package/es/error/P404.vue.js +19 -0
- package/es/error/P500.css +1 -0
- package/es/error/P500.d.ts +2 -0
- package/es/error/P500.vue.js +19 -0
- package/es/error/index.d.ts +39 -0
- package/es/error/index.js +10 -0
- package/es/iframe/PIframe.css +1 -0
- package/es/iframe/PIframe.d.ts +4 -0
- package/es/iframe/PIframe.vue.js +7 -0
- package/es/iframe/PIframe.vue2.js +46 -0
- package/es/iframe/index.d.ts +15 -0
- package/es/iframe/index.js +6 -0
- package/es/index.d.ts +5 -1
- package/es/index.js +34 -21
- package/es/languages/PLanguage.vue.js +28 -28
- package/es/languages/index.d.ts +3 -4
- package/es/languages/index.js +4 -5
- package/es/languages/store.d.ts +1 -1
- package/es/languages/store.js +1 -1
- package/es/layout/PEmptyLayout.d.ts +2 -0
- package/es/layout/PEmptyLayout.vue.js +11 -0
- package/es/layout/PLayout.css +1 -1
- package/es/layout/PLayout.vue.js +1 -1
- package/es/layout/PLayout.vue2.js +6 -6
- package/es/layout/content/PContent.vue.js +10 -10
- package/es/layout/content/PTabs.css +1 -1
- package/es/layout/content/PTabs.vue.js +2 -2
- package/es/layout/content/PTabs.vue2.js +60 -57
- package/es/layout/header/PHeader.css +1 -1
- package/es/layout/header/PHeader.vue.js +2 -2
- package/es/layout/header/PHeader.vue2.js +10 -17
- package/es/layout/index.d.ts +16 -3
- package/es/layout/index.js +6 -4
- package/es/layout/sider/PLogo.css +1 -1
- package/es/layout/sider/PLogo.vue.js +2 -2
- package/es/layout/sider/PLogo.vue2.js +5 -5
- package/es/layout/sider/PMenus.vue.js +5 -5
- package/es/layout/{layout.d.ts → store.d.ts} +236 -251
- package/es/layout/{layout.js → store.js} +1 -1
- package/es/layout/typing.d.ts +25 -0
- package/es/modal/PModal.d.ts +87 -59
- package/es/modal/PModal.vue.js +37 -38
- package/es/modal/index.d.ts +47 -33
- package/es/modal/index.js +4 -4
- package/es/modal/typing.d.ts +2 -2
- package/es/oidc/POidc.css +1 -0
- package/es/oidc/POidc.d.ts +2 -0
- package/es/oidc/POidc.vue.js +7 -0
- package/es/oidc/POidc.vue2.js +25 -0
- package/es/oidc/index.d.ts +15 -0
- package/es/oidc/index.js +6 -0
- package/es/oidc/store.d.ts +17 -0
- package/es/oidc/store.js +24 -0
- package/es/oidc/typing.d.ts +5 -0
- package/es/redirect/PRedirect.d.ts +2 -0
- package/es/redirect/PRedirect.vue.js +19 -0
- package/es/redirect/PRedirect.vue2.js +4 -0
- package/es/redirect/index.d.ts +13 -0
- package/es/redirect/index.js +6 -0
- package/es/table/PTable.vue.js +114 -121
- package/es/table/index.d.ts +2 -2
- package/es/table/index.js +4 -4
- package/es/table/typing.d.ts +8 -8
- package/lib/application/PApplication.vue.cjs +1 -1
- package/lib/application/index.cjs +1 -1
- package/lib/application/index.d.ts +1 -2
- package/lib/components.cjs +1 -1
- package/lib/components.d.ts +9 -5
- package/lib/error/P403.css +1 -0
- package/lib/error/P403.d.ts +2 -0
- package/lib/error/P403.vue.cjs +1 -0
- package/lib/error/P404.css +1 -0
- package/lib/error/P404.d.ts +2 -0
- package/lib/error/P404.vue.cjs +1 -0
- package/lib/error/P500.css +1 -0
- package/lib/error/P500.d.ts +2 -0
- package/lib/error/P500.vue.cjs +1 -0
- package/lib/error/index.cjs +1 -0
- package/lib/error/index.d.ts +39 -0
- package/lib/iframe/PIframe.css +1 -0
- package/lib/iframe/PIframe.d.ts +4 -0
- package/lib/iframe/PIframe.vue.cjs +1 -0
- package/lib/iframe/PIframe.vue2.cjs +1 -0
- package/lib/iframe/index.cjs +1 -0
- package/lib/iframe/index.d.ts +15 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +5 -1
- package/lib/languages/PLanguage.vue.cjs +1 -1
- package/lib/languages/index.cjs +1 -1
- package/lib/languages/index.d.ts +3 -4
- package/lib/languages/store.cjs +1 -1
- package/lib/languages/store.d.ts +1 -1
- package/lib/layout/PEmptyLayout.d.ts +2 -0
- package/lib/layout/PEmptyLayout.vue.cjs +1 -0
- package/lib/layout/PLayout.css +1 -1
- package/lib/layout/PLayout.vue.cjs +1 -1
- package/lib/layout/PLayout.vue2.cjs +1 -1
- package/lib/layout/content/PContent.vue.cjs +1 -1
- package/lib/layout/content/PTabs.css +1 -1
- package/lib/layout/content/PTabs.vue.cjs +1 -1
- package/lib/layout/content/PTabs.vue2.cjs +1 -1
- package/lib/layout/header/PHeader.css +1 -1
- package/lib/layout/header/PHeader.vue.cjs +1 -1
- package/lib/layout/header/PHeader.vue2.cjs +1 -1
- package/lib/layout/index.cjs +1 -1
- package/lib/layout/index.d.ts +16 -3
- package/lib/layout/sider/PLogo.css +1 -1
- package/lib/layout/sider/PLogo.vue.cjs +1 -1
- package/lib/layout/sider/PLogo.vue2.cjs +1 -1
- package/lib/layout/sider/PMenus.vue.cjs +1 -1
- package/lib/layout/{layout.cjs → store.cjs} +1 -1
- package/lib/layout/{layout.d.ts → store.d.ts} +236 -251
- package/lib/layout/typing.d.ts +25 -0
- package/lib/modal/PModal.d.ts +87 -59
- package/lib/modal/PModal.vue.cjs +1 -1
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.d.ts +47 -33
- package/lib/modal/typing.d.ts +2 -2
- package/lib/oidc/POidc.css +1 -0
- package/lib/oidc/POidc.d.ts +2 -0
- package/lib/oidc/POidc.vue.cjs +1 -0
- package/lib/oidc/POidc.vue2.cjs +1 -0
- package/lib/oidc/index.cjs +1 -0
- package/lib/oidc/index.d.ts +15 -0
- package/lib/oidc/store.cjs +1 -0
- package/lib/oidc/store.d.ts +17 -0
- package/lib/oidc/typing.d.ts +5 -0
- package/lib/redirect/PRedirect.d.ts +2 -0
- package/lib/redirect/PRedirect.vue.cjs +1 -0
- package/lib/redirect/PRedirect.vue2.cjs +1 -0
- package/lib/redirect/index.cjs +1 -0
- package/lib/redirect/index.d.ts +13 -0
- package/lib/table/PTable.vue.cjs +1 -1
- package/lib/table/index.cjs +1 -1
- package/lib/table/index.d.ts +2 -2
- package/lib/table/typing.d.ts +8 -8
- package/package.json +21 -24
- package/es/typing.d.ts +0 -5
- package/lib/typing.d.ts +0 -5
package/es/index.js
CHANGED
|
@@ -1,24 +1,37 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import * as r from "./components.js";
|
|
2
|
+
import { PEmptyLayoutPlugin as n, PLayoutPlugin as l } from "./layout/index.js";
|
|
3
|
+
import { PLanguagePlugin as f } from "./languages/index.js";
|
|
4
|
+
import { POidcPlugin as m } from "./oidc/index.js";
|
|
5
|
+
import { P403Plugin as x, P404Plugin as c, P500Plugin as d } from "./error/index.js";
|
|
6
|
+
import { PApplicationPlugin as y } from "./application/index.js";
|
|
7
|
+
import { PIframePlugin as b } from "./iframe/index.js";
|
|
8
|
+
import { PModalPlugin as S } from "./modal/index.js";
|
|
9
|
+
import { PRedirectPlugin as I } from "./redirect/index.js";
|
|
10
|
+
import { PTablePlugin as R } from "./table/index.js";
|
|
11
|
+
import { useLanguageStore as h } from "./languages/store.js";
|
|
12
|
+
import { useLayoutStore as v } from "./layout/store.js";
|
|
13
|
+
import { useOidcStore as q } from "./oidc/store.js";
|
|
14
|
+
const t = (o, e) => (Object.values(r).forEach((a) => {
|
|
15
|
+
a.install && o.use(a);
|
|
16
|
+
}), e?.(), o), P = {
|
|
17
|
+
install: t
|
|
13
18
|
};
|
|
14
19
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
x as P403,
|
|
21
|
+
c as P404,
|
|
22
|
+
d as P500,
|
|
23
|
+
y as PApplication,
|
|
24
|
+
n as PEmptyLayout,
|
|
25
|
+
b as PIframe,
|
|
26
|
+
f as PLanguage,
|
|
27
|
+
l as PLayout,
|
|
28
|
+
S as PModal,
|
|
29
|
+
m as POidc,
|
|
30
|
+
I as PRedirect,
|
|
31
|
+
R as PTable,
|
|
32
|
+
P as default,
|
|
33
|
+
t as install,
|
|
34
|
+
h as useLanguageStore,
|
|
35
|
+
v as useLayoutStore,
|
|
36
|
+
q as useOidcStore
|
|
24
37
|
};
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { NDropdown as
|
|
2
|
-
import { defineComponent as x, onMounted as L, nextTick as k,
|
|
3
|
-
import {
|
|
1
|
+
import { NDropdown as _, NButton as w, NIcon as h } from "naive-ui";
|
|
2
|
+
import { defineComponent as x, onMounted as L, nextTick as k, unref as t, openBlock as o, createBlock as i, withCtx as l, createVNode as v, createElementVNode as r, createElementBlock as y, toDisplayString as q, createCommentVNode as C } from "vue";
|
|
3
|
+
import { useLanguageStore as N } from "./store.js";
|
|
4
4
|
const b = { key: 1 }, M = /* @__PURE__ */ x({
|
|
5
5
|
__name: "PLanguage",
|
|
6
6
|
setup(B) {
|
|
7
|
-
const {
|
|
8
|
-
select:
|
|
9
|
-
getLanguages:
|
|
10
|
-
getCurrentLanguage:
|
|
11
|
-
getDefaultLanguage:
|
|
12
|
-
getTranslationApiUrl:
|
|
13
|
-
} = N(),
|
|
14
|
-
|
|
7
|
+
const c = (e) => g(e), {
|
|
8
|
+
select: g,
|
|
9
|
+
getLanguages: n,
|
|
10
|
+
getCurrentLanguage: s,
|
|
11
|
+
getDefaultLanguage: u,
|
|
12
|
+
getTranslationApiUrl: p
|
|
13
|
+
} = N(), f = () => {
|
|
14
|
+
const e = window.translate;
|
|
15
|
+
e && (e.selectLanguageTag.show = !1, e.selectLanguageTag.languages = n().map((a) => a.key).join(","), e.ignore.class.push("ignore-translate-flag"), e.ignore.id.push("ignore-translation"), e.language.setLocal(u()), e.request.api.translate = "api/v1/translation", e.request.api.connectTest = "api/v1/translation/connect-test", e.request.api.init = "api/v1/translation/init", e.request.api.language = "api/v1/translation/language", e.request.setHost(p()), e.request.listener.start(), e.listener.start(), e.whole.enableAll(), e.execute());
|
|
15
16
|
};
|
|
16
|
-
return L(async () => await k(() =>
|
|
17
|
-
const
|
|
18
|
-
return t(
|
|
17
|
+
return L(async () => await k(() => f())), (e, a) => {
|
|
18
|
+
const m = h, d = w;
|
|
19
|
+
return t(n)().length > 0 ? (o(), i(t(_), {
|
|
19
20
|
key: 0,
|
|
20
21
|
id: "ignore-translation",
|
|
21
22
|
placement: "bottom-start",
|
|
22
23
|
trigger: "hover",
|
|
23
24
|
class: "flex flex-col justify-center h-full ignore",
|
|
24
|
-
onSelect:
|
|
25
|
-
options: t(
|
|
25
|
+
onSelect: c,
|
|
26
|
+
options: t(n)()
|
|
26
27
|
}, {
|
|
27
|
-
default:
|
|
28
|
-
|
|
28
|
+
default: l(() => [
|
|
29
|
+
v(d, {
|
|
29
30
|
quaternary: "",
|
|
30
31
|
type: "info"
|
|
31
32
|
}, {
|
|
32
|
-
default:
|
|
33
|
-
t(
|
|
33
|
+
default: l(() => [
|
|
34
|
+
t(s)() ? (o(), y("label", b, q(t(s)()?.label), 1)) : (o(), i(m, {
|
|
34
35
|
key: 0,
|
|
35
36
|
size: "18"
|
|
36
37
|
}, {
|
|
37
|
-
default:
|
|
38
|
-
|
|
38
|
+
default: l(() => [...a[0] || (a[0] = [
|
|
39
|
+
r("svg", {
|
|
39
40
|
xmlns: "http://www.w3.org/2000/svg",
|
|
40
41
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
41
42
|
viewBox: "0 0 512 512"
|
|
42
43
|
}, [
|
|
43
|
-
|
|
44
|
+
r("path", {
|
|
44
45
|
d: "M478.33 433.6l-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362L368 281.65L401.17 362z",
|
|
45
46
|
fill: "currentColor"
|
|
46
47
|
}),
|
|
47
|
-
|
|
48
|
+
r("path", {
|
|
48
49
|
d: "M267.84 342.92a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73c39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36c-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93c.92 1.19 1.83 2.35 2.74 3.51c-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59c22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z",
|
|
49
50
|
fill: "currentColor"
|
|
50
51
|
})
|
|
51
52
|
], -1)
|
|
52
|
-
])),
|
|
53
|
-
_: 1
|
|
54
|
-
__: [0]
|
|
53
|
+
])]),
|
|
54
|
+
_: 1
|
|
55
55
|
}))
|
|
56
56
|
]),
|
|
57
57
|
_: 1
|
|
58
58
|
})
|
|
59
59
|
]),
|
|
60
60
|
_: 1
|
|
61
|
-
}, 8, ["options"])) :
|
|
61
|
+
}, 8, ["options"])) : C("", !0);
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
});
|
package/es/languages/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export {
|
|
3
|
-
export declare const
|
|
1
|
+
export type * from './typing';
|
|
2
|
+
export { useLanguageStore } from './store';
|
|
3
|
+
export declare const PLanguagePlugin: {
|
|
4
4
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
5
5
|
P: {};
|
|
6
6
|
B: {};
|
|
@@ -13,4 +13,3 @@ export declare const PLanguageSwitch: {
|
|
|
13
13
|
__isTeleport?: never;
|
|
14
14
|
__isSuspense?: never;
|
|
15
15
|
} & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
|
|
16
|
-
export default PLanguageSwitch;
|
package/es/languages/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { withInstall as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { withInstall as o } from "../utils/install.js";
|
|
2
|
+
import t from "./PLanguage.vue.js";
|
|
3
|
+
const n = o(t);
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
m as default
|
|
5
|
+
n as PLanguagePlugin
|
|
7
6
|
};
|
package/es/languages/store.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LanguageOption, LanguageState } from './typing';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const useLanguageStore: import('pinia').StoreDefinition<"language", Pick<{
|
|
3
3
|
state: import('vue').Ref<{
|
|
4
4
|
translationApiUrl: string;
|
|
5
5
|
defaultLanguage: string;
|
package/es/languages/store.js
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { resolveComponent as e, openBlock as r, createBlock as t } from "vue";
|
|
2
|
+
import c from "../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const n = {};
|
|
4
|
+
function _(m, p) {
|
|
5
|
+
const o = e("router-view");
|
|
6
|
+
return r(), t(o);
|
|
7
|
+
}
|
|
8
|
+
const a = /* @__PURE__ */ c(n, [["render", _]]);
|
|
9
|
+
export {
|
|
10
|
+
a as default
|
|
11
|
+
};
|
package/es/layout/PLayout.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.layout[data-v-
|
|
1
|
+
.layout[data-v-8d20e006]{display:flex;flex-direction:row;flex:auto}.layout-default-background[data-v-8d20e006]{background:#f5f7f9}.layout .layout-sider[data-v-8d20e006]{min-height:100vh;box-shadow:2px 0 8px #1d23290d;position:relative;z-index:13;transition:all .2s ease-in-out}.layout .layout-sider-fix[data-v-8d20e006]{position:fixed;top:0;left:0}.layout .ant-layout[data-v-8d20e006]{overflow:hidden}.layout .layout-right-fix[data-v-8d20e006]{overflow-x:hidden;padding-left:200px;min-height:100vh;transition:all .2s ease-in-out}.layout .layout-content[data-v-8d20e006]{flex:auto;min-height:100vh}.layout .n-layout-header.n-layout-header--absolute-positioned[data-v-8d20e006]{z-index:11}.layout-content-main[data-v-8d20e006]{margin:0 10px 10px;position:relative;padding-top:64px}.layout-content-main-fix[data-v-8d20e006]{padding-top:64px}.main-view-fix[data-v-8d20e006]{padding-top:44px}
|
package/es/layout/PLayout.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./PLayout.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8d20e006"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { NLayout as s, NLayoutSider as i, NFlex as c, NLayoutHeader as d, NLayoutContent as u, NBackTop as p } from "naive-ui";
|
|
2
|
-
import { defineComponent as m, ref as f, provide as _,
|
|
2
|
+
import { defineComponent as m, ref as f, provide as _, openBlock as y, createBlock as g, unref as e, withCtx as a, createVNode as o, createElementVNode as n, nextTick as v } from "vue";
|
|
3
3
|
import h from "./sider/PLogo.vue.js";
|
|
4
4
|
import x from "./header/PHeader.vue.js";
|
|
5
5
|
import b from "./content/PContent.vue.js";
|
|
6
6
|
import N from "./content/PTabs.vue.js";
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
7
|
+
import L from "./sider/PMenus.vue.js";
|
|
8
|
+
import { useLayoutStore as P } from "./store.js";
|
|
9
9
|
const k = { class: "layout-content-main layout-content-main-fix" }, w = { class: "main-view main-view-fix" }, A = /* @__PURE__ */ m({
|
|
10
10
|
__name: "PLayout",
|
|
11
11
|
setup(C) {
|
|
12
|
-
const t =
|
|
12
|
+
const t = P(), l = f(!1);
|
|
13
13
|
return _("reloadPage", () => {
|
|
14
14
|
l.value = !0, v(() => l.value = !1);
|
|
15
15
|
}), (E, T) => {
|
|
16
16
|
const r = p;
|
|
17
|
-
return
|
|
17
|
+
return y(), g(e(s), {
|
|
18
18
|
"has-sider": "",
|
|
19
19
|
class: "layout",
|
|
20
20
|
position: "absolute"
|
|
@@ -36,7 +36,7 @@ const k = { class: "layout-content-main layout-content-main-fix" }, w = { class:
|
|
|
36
36
|
o(e(c), { vertical: "" }, {
|
|
37
37
|
default: a(() => [
|
|
38
38
|
o(h),
|
|
39
|
-
o(
|
|
39
|
+
o(L)
|
|
40
40
|
]),
|
|
41
41
|
_: 1
|
|
42
42
|
})
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as c, resolveComponent as r, openBlock as e, createElementBlock as m, createBlock as t, withCtx as s, KeepAlive as i, resolveDynamicComponent as p, createCommentVNode as u } from "vue";
|
|
2
|
+
const _ = { class: "mt-1" }, k = /* @__PURE__ */ c({
|
|
3
3
|
__name: "PContent",
|
|
4
4
|
props: {
|
|
5
5
|
loading: { type: Boolean, default: !1 }
|
|
6
6
|
},
|
|
7
|
-
setup(
|
|
8
|
-
return (
|
|
9
|
-
const n =
|
|
10
|
-
return e(),
|
|
11
|
-
|
|
12
|
-
default:
|
|
13
|
-
(e(),
|
|
14
|
-
(e(),
|
|
7
|
+
setup(o) {
|
|
8
|
+
return (d, f) => {
|
|
9
|
+
const n = r("RouterView");
|
|
10
|
+
return e(), m("div", _, [
|
|
11
|
+
o.loading ? u("", !0) : (e(), t(n, { key: 0 }, {
|
|
12
|
+
default: s(({ Component: l, route: a }) => [
|
|
13
|
+
(e(), t(i, null, [
|
|
14
|
+
(e(), t(p(l), {
|
|
15
15
|
key: a.fullPath
|
|
16
16
|
}))
|
|
17
17
|
], 1024))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tabs-view[data-v-
|
|
1
|
+
.tabs-view[data-v-48b3be2d]{width:100%;padding:6px 0;display:flex;transition:all .2s ease-in-out}.tabs-view-main[data-v-48b3be2d]{height:32px;display:flex;max-width:100%;min-width:100%}.tabs-view-main .tabs-card[data-v-48b3be2d]{-webkit-box-flex:1;flex-grow:1;flex-shrink:1;overflow:hidden;position:relative}.tabs-view-main .tabs-card .tabs-card-prev[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-next[data-v-48b3be2d]{width:32px;text-align:center;position:absolute;line-height:32px;cursor:pointer}.tabs-view-main .tabs-card .tabs-card-prev .n-icon[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-next .n-icon[data-v-48b3be2d]{display:flex;align-items:center;justify-content:center;height:32px;width:32px}.tabs-view-main .tabs-card .tabs-card-prev[data-v-48b3be2d]{left:0}.tabs-view-main .tabs-card .tabs-card-next[data-v-48b3be2d]{right:0}.tabs-view-main .tabs-card .tabs-card-next-hide[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-prev-hide[data-v-48b3be2d]{display:none}.tabs-view-main .tabs-card-scroll[data-v-48b3be2d]{white-space:nowrap;overflow:hidden}.tabs-view-main .tabs-card-scroll-item[data-v-48b3be2d]{background:var(--v141ddb06);color:var(--cf709148);height:32px;padding:6px 16px 4px;border-radius:3px;margin-right:6px;cursor:pointer;display:inline-block;position:relative;flex:0 0 auto}.tabs-view-main .tabs-card-scroll-item span[data-v-48b3be2d]{float:left;vertical-align:middle}.tabs-view-main .tabs-card-scroll-item[data-v-48b3be2d]:hover{color:#515a6e}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-48b3be2d]{height:22px;width:21px;margin-right:-6px;position:relative;vertical-align:middle;text-align:center;color:#808695}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-48b3be2d]:hover{color:#515a6e!important}.tabs-view-main .tabs-card-scroll-item .n-icon svg[data-v-48b3be2d]{height:21px;display:inline-block}.tabs-view-main .tabs-card-scroll .active-item[data-v-48b3be2d]{color:#2d8cf0}.tabs-view-main .tabs-card-scrollable[data-v-48b3be2d]{padding:0 32px;overflow:hidden}.tabs-view .tabs-close[data-v-48b3be2d]{min-width:32px;width:32px;height:32px;line-height:32px;text-align:center;background:var(--color);border-radius:2px;cursor:pointer}.tabs-view .tabs-close-btn[data-v-48b3be2d]{color:var(--color);height:100%;display:flex;align-items:center;justify-content:center}.tabs-view-default-background[data-v-48b3be2d]{background:#f5f7f9}.tabs-view-dark-background[data-v-48b3be2d]{background:#101014}.tabs-view-fix[data-v-48b3be2d]{position:fixed;z-index:5;padding:6px 10px;left:200px}.tabs-view-fixed-header[data-v-48b3be2d]{top:0}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./PTabs.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-48b3be2d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as oe, useCssVars as le, computed as w, ref as y, reactive as ae, h as d, inject as se, watch as ne, onMounted as re,
|
|
1
|
+
import { defineComponent as oe, useCssVars as le, computed as w, ref as y, reactive as ae, h as d, inject as se, watch as ne, onMounted as re, openBlock as O, createElementBlock as ce, normalizeStyle as ie, createElementVNode as u, normalizeClass as g, createVNode as c, unref as n, withCtx as p, withModifiers as L, toDisplayString as ue, createBlock as de, createCommentVNode as fe, nextTick as R } from "vue";
|
|
2
2
|
import me from "element-resize-detector";
|
|
3
3
|
import he from "vuedraggable";
|
|
4
4
|
import { ReloadOutlined as ve, CloseOutlined as D, ColumnWidthOutlined as pe, MinusOutlined as be, LeftOutlined as we, RightOutlined as ge, DownOutlined as Se } from "@vicons/antd";
|
|
5
5
|
import { useRoute as ye, useRouter as Ce } from "vue-router";
|
|
6
6
|
import { useThemeVars as Te, useMessage as ke, NIcon as f, NDropdown as M } from "naive-ui";
|
|
7
|
-
import {
|
|
7
|
+
import { useLayoutStore as xe } from "../store.js";
|
|
8
8
|
const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"], We = { class: "tabs-close" }, Oe = { class: "tabs-close-btn" }, ze = /* @__PURE__ */ oe({
|
|
9
9
|
__name: "PTabs",
|
|
10
10
|
setup(Le) {
|
|
11
11
|
le((e) => ({
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
v141ddb06: E.value,
|
|
13
|
+
cf709148: N.value
|
|
14
14
|
}));
|
|
15
15
|
const C = Te(), E = w(() => C.value.cardColor), N = w(() => C.value.textColor1), A = ke(), r = ye(), b = Ce(), s = y(null), T = y(null), k = y(!1), i = xe(), m = w(() => i.state.tabs), l = ae({
|
|
16
16
|
activeKey: r.fullPath,
|
|
@@ -21,13 +21,13 @@ const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"],
|
|
|
21
21
|
isMultiHeaderFixed: !0,
|
|
22
22
|
multiTabsSetting: !0
|
|
23
23
|
}), K = ["Login", "Redirect", "ErrorPage"], x = (e) => {
|
|
24
|
-
const { fullPath:
|
|
25
|
-
return { fullPath:
|
|
24
|
+
const { fullPath: t, hash: o, meta: a, name: h, params: Z, path: ee, query: te } = e;
|
|
25
|
+
return { fullPath: t, hash: o, meta: a, name: h, params: Z, path: ee, query: te };
|
|
26
26
|
}, z = w(() => {
|
|
27
|
-
const
|
|
27
|
+
const o = i.state.collapsed ? "64px" : "272px";
|
|
28
28
|
return {
|
|
29
|
-
left:
|
|
30
|
-
width: `calc(100% - ${
|
|
29
|
+
left: o,
|
|
30
|
+
width: `calc(100% - ${o})`
|
|
31
31
|
};
|
|
32
32
|
}), _ = w(() => {
|
|
33
33
|
const e = m.value.length <= 1;
|
|
@@ -58,60 +58,63 @@ const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"],
|
|
|
58
58
|
];
|
|
59
59
|
}), I = () => {
|
|
60
60
|
let e = [];
|
|
61
|
-
const
|
|
61
|
+
const t = x(r);
|
|
62
62
|
try {
|
|
63
63
|
if (i.state.cacheTabs) {
|
|
64
|
-
const
|
|
65
|
-
e =
|
|
64
|
+
const o = localStorage.getItem("TABS_ROUTES");
|
|
65
|
+
e = o ? JSON.parse(o) : [t];
|
|
66
66
|
}
|
|
67
67
|
} catch {
|
|
68
|
-
e = [
|
|
68
|
+
e = [t];
|
|
69
69
|
} finally {
|
|
70
70
|
return e;
|
|
71
71
|
}
|
|
72
72
|
}, V = (e) => {
|
|
73
|
-
const
|
|
74
|
-
e.forEach((
|
|
75
|
-
const a =
|
|
76
|
-
a && (
|
|
73
|
+
const t = b.getRoutes();
|
|
74
|
+
e.forEach((o) => {
|
|
75
|
+
const a = t.find((h) => h.path === o.path);
|
|
76
|
+
a && (o.meta = a.meta || o.meta, o.name = a.name || o.name);
|
|
77
77
|
}), i.state.cacheTabs && localStorage.setItem("TABS_ROUTES", JSON.stringify(e));
|
|
78
78
|
}, $ = () => {
|
|
79
79
|
const e = I();
|
|
80
80
|
V(e), i.initTabs(e);
|
|
81
81
|
}, v = async (e) => {
|
|
82
82
|
if (await R(), !s.value) return;
|
|
83
|
-
const
|
|
84
|
-
|
|
83
|
+
const t = s.value.offsetWidth, o = s.value.scrollWidth;
|
|
84
|
+
t < o ? (l.scrollable = !0, e && [...s.value.querySelectorAll(".tabs-card-scroll-item") || []].forEach((h) => {
|
|
85
85
|
h.id === `tag${l.activeKey.split("/").join("/")}` && h.scrollIntoView && h.scrollIntoView();
|
|
86
86
|
})) : l.scrollable = !1;
|
|
87
87
|
}, B = (e) => !(e.draggedContext.element.meta.affix || e.relatedContext.element.meta.affix), Y = () => {
|
|
88
88
|
let e;
|
|
89
89
|
e = me(), e.listenTo(T.value, () => v(!0));
|
|
90
90
|
}, j = (e) => {
|
|
91
|
-
const { fullPath:
|
|
92
|
-
if (
|
|
91
|
+
const { fullPath: t } = e;
|
|
92
|
+
if (t === r.fullPath || (l.activeKey = t, !e))
|
|
93
93
|
return;
|
|
94
|
-
const { replace:
|
|
95
|
-
toString.call(e),
|
|
96
|
-
}, F = (e,
|
|
97
|
-
e.preventDefault(), k.value =
|
|
94
|
+
const { replace: o } = b;
|
|
95
|
+
toString.call(e), o(e).catch(console.error);
|
|
96
|
+
}, F = (e, t) => {
|
|
97
|
+
e.preventDefault(), k.value = t.path === "/home", l.showDropdown = !1, R().then(() => {
|
|
98
98
|
l.showDropdown = !0, l.dropdownX = e.clientX, l.dropdownY = e.clientY;
|
|
99
99
|
});
|
|
100
100
|
}, X = () => {
|
|
101
|
-
r.meta.keepAlive
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
if (r.meta.keepAlive) {
|
|
102
|
+
var e = b.currentRoute.value.matched.find(
|
|
103
|
+
(t) => t.name == r.name
|
|
104
|
+
);
|
|
105
|
+
e && e.components?.default?.name;
|
|
106
|
+
}
|
|
104
107
|
}, P = (e) => {
|
|
105
108
|
if (m.value.length === 1)
|
|
106
109
|
return A.warning("这已经是最后一页,不能再关闭了!");
|
|
107
110
|
if (X(), i.closeCurrentTab(e), l.activeKey === e.fullPath) {
|
|
108
|
-
const
|
|
109
|
-
l.activeKey =
|
|
111
|
+
const t = m.value[Math.max(0, m.value.length - 1)];
|
|
112
|
+
l.activeKey = t.fullPath, b.push(t);
|
|
110
113
|
}
|
|
111
114
|
v();
|
|
112
115
|
}, q = (e) => {
|
|
113
|
-
const { fullPath:
|
|
114
|
-
P(
|
|
116
|
+
const { fullPath: t } = e, o = m.value.find((a) => a.fullPath == t);
|
|
117
|
+
P(o);
|
|
115
118
|
}, H = (e) => {
|
|
116
119
|
i.closeOtherTabs(e), l.activeKey = e.fullPath, b.replace(e.fullPath), v();
|
|
117
120
|
}, J = () => {
|
|
@@ -136,28 +139,28 @@ const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"],
|
|
|
136
139
|
break;
|
|
137
140
|
}
|
|
138
141
|
v(), l.showDropdown = !1;
|
|
139
|
-
}, S = (e,
|
|
140
|
-
const
|
|
142
|
+
}, S = (e, t) => {
|
|
143
|
+
const o = s.value.scrollLeft, a = t > 0 && o + t >= e || t < 0 && o + t <= e ? e : o + t;
|
|
141
144
|
if (s.value && s.value.scrollTo(a, 0), a !== e)
|
|
142
|
-
return window.requestAnimationFrame(() => S(e,
|
|
145
|
+
return window.requestAnimationFrame(() => S(e, t));
|
|
143
146
|
}, G = () => {
|
|
144
|
-
const e = s.value.offsetWidth,
|
|
145
|
-
if (!
|
|
146
|
-
const
|
|
147
|
-
S(
|
|
147
|
+
const e = s.value.offsetWidth, t = s.value.scrollLeft;
|
|
148
|
+
if (!t) return;
|
|
149
|
+
const o = t > e ? t - e : 0;
|
|
150
|
+
S(o, (o - t) / 20);
|
|
148
151
|
}, Q = () => {
|
|
149
|
-
const e = s.value.offsetWidth,
|
|
150
|
-
if (
|
|
151
|
-
const a =
|
|
152
|
-
S(a, (a -
|
|
152
|
+
const e = s.value.offsetWidth, t = s.value.scrollWidth, o = s.value.scrollLeft;
|
|
153
|
+
if (t - o <= e) return;
|
|
154
|
+
const a = t - o > e * 2 ? o + e : t - e;
|
|
155
|
+
S(a, (a - o) / 20);
|
|
153
156
|
};
|
|
154
157
|
return window.addEventListener("beforeunload", () => {
|
|
155
158
|
localStorage.setItem("TABS_ROUTES", JSON.stringify(m.value));
|
|
156
159
|
}), window.addEventListener(
|
|
157
160
|
"scroll",
|
|
158
161
|
(e) => {
|
|
159
|
-
let
|
|
160
|
-
l.isMultiHeaderFixed =
|
|
162
|
+
let t = e.target.scrollTop || document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
|
|
163
|
+
l.isMultiHeaderFixed = t >= 64;
|
|
161
164
|
},
|
|
162
165
|
!0
|
|
163
166
|
), ne(
|
|
@@ -166,7 +169,7 @@ const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"],
|
|
|
166
169
|
K.includes(r.name) || (l.activeKey = e, i.addTab(x(r)), v(!0));
|
|
167
170
|
},
|
|
168
171
|
{ immediate: !0 }
|
|
169
|
-
), $(), re(() => Y()), (e,
|
|
172
|
+
), $(), re(() => Y()), (e, t) => (O(), ce("div", {
|
|
170
173
|
class: "box-border tabs-view tabs-view-fix tabs-view-default-background",
|
|
171
174
|
style: ie(z.value)
|
|
172
175
|
}, [
|
|
@@ -216,24 +219,24 @@ const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"],
|
|
|
216
219
|
class: "flex",
|
|
217
220
|
move: B
|
|
218
221
|
}, {
|
|
219
|
-
item: p(({ element:
|
|
222
|
+
item: p(({ element: o }) => [
|
|
220
223
|
u("div", {
|
|
221
|
-
id: `tag${
|
|
222
|
-
class: g(["tabs-card-scroll-item", { "active-item": l.activeKey ===
|
|
223
|
-
onClick: L((a) => j(
|
|
224
|
-
onContextmenu: (a) => F(a,
|
|
224
|
+
id: `tag${o.fullPath.split("/").join("/")}`,
|
|
225
|
+
class: g(["tabs-card-scroll-item", { "active-item": l.activeKey === o.fullPath }]),
|
|
226
|
+
onClick: L((a) => j(o), ["stop"]),
|
|
227
|
+
onContextmenu: (a) => F(a, o)
|
|
225
228
|
}, [
|
|
226
|
-
u("span", null,
|
|
227
|
-
|
|
229
|
+
u("span", null, ue(o.meta.title), 1),
|
|
230
|
+
o.meta.affix ? fe("", !0) : (O(), de(n(f), {
|
|
228
231
|
key: 0,
|
|
229
232
|
size: "14",
|
|
230
|
-
onClick: L((a) => q(
|
|
233
|
+
onClick: L((a) => q(o), ["stop"])
|
|
231
234
|
}, {
|
|
232
235
|
default: p(() => [
|
|
233
236
|
c(n(D))
|
|
234
237
|
]),
|
|
235
|
-
_:
|
|
236
|
-
},
|
|
238
|
+
_: 1
|
|
239
|
+
}, 8, ["onClick"]))
|
|
237
240
|
], 42, Pe)
|
|
238
241
|
]),
|
|
239
242
|
_: 1
|
|
@@ -267,7 +270,7 @@ const _e = { class: "tabs-view-main" }, Pe = ["id", "onClick", "onContextmenu"],
|
|
|
267
270
|
show: l.showDropdown,
|
|
268
271
|
x: l.dropdownX,
|
|
269
272
|
y: l.dropdownY,
|
|
270
|
-
onClickoutside:
|
|
273
|
+
onClickoutside: t[0] || (t[0] = (o) => l.showDropdown = !1),
|
|
271
274
|
placement: "bottom-start",
|
|
272
275
|
onSelect: W,
|
|
273
276
|
options: _.value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.layout-header[data-v-
|
|
1
|
+
.layout-header[data-v-9fabccfe]{display:flex;justify-content:space-between;align-items:center;padding:0;height:64px;box-shadow:0 1px 4px #00152914;transition:all .2s ease-in-out;width:100%;z-index:11}.layout-header-left[data-v-9fabccfe]{display:flex;align-items:center}.layout-header-left .logo[data-v-9fabccfe]{display:flex;align-items:center;justify-content:center;height:64px;line-height:64px;overflow:hidden;white-space:nowrap;padding-left:10px}.layout-header-left .logo img[data-v-9fabccfe]{width:auto;height:32px;margin-right:10px}.layout-header-left .logo .title[data-v-9fabccfe]{margin-bottom:0}.layout-header-left[data-v-9fabccfe] .ant-breadcrumb span:last-child .link-text{color:#515a6e}.layout-header-left .n-breadcrumb[data-v-9fabccfe]{display:inline-block}.layout-header-left-menu[data-v-9fabccfe]{color:var(--text-color)}.layout-header-right[data-v-9fabccfe]{display:flex;align-items:center;margin-right:5px}.layout-header-right .avatar[data-v-9fabccfe]{display:flex;align-items:center;height:64px}.layout-header-right[data-v-9fabccfe]>*{cursor:pointer}.layout-header-trigger[data-v-9fabccfe]{display:inline-block;width:64px;height:64px;text-align:center;cursor:pointer;transition:all .2s ease-in-out}.layout-header-trigger .n-icon[data-v-9fabccfe]{display:flex;align-items:center;height:64px;line-height:64px}.layout-header-trigger[data-v-9fabccfe]:hover{background:#ffffff14}.layout-header-trigger .anticon[data-v-9fabccfe]{font-size:16px;color:#515a6e}.layout-header-trigger-min[data-v-9fabccfe]{width:auto;padding:0 10px}.layout-header-light[data-v-9fabccfe]{background:#fff;color:#515a6e}.layout-header-light .n-icon[data-v-9fabccfe]{color:#515a6e}.layout-header-light .layout-header-left[data-v-9fabccfe] .n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link{color:#515a6e}.layout-header-light .layout-header-trigger[data-v-9fabccfe]:hover{background:#f8f8f9}.layout-header-fix[data-v-9fabccfe]{position:fixed;top:0;right:0;left:200px;z-index:11}[data-v-9fabccfe] .menu-router-link{color:#515a6e}[data-v-9fabccfe] .menu-router-link:hover{color:#1890ff}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./PHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-9fabccfe"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|