@ditari/bsui 1.0.47 → 1.0.48
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/cjs/components/layout/Main.vue.cjs.js +1 -1
- package/dist/cjs/components/layout/Main.vue.d.ts +19 -1
- package/dist/cjs/components/layout/Show.vue.cjs.js +1 -1
- package/dist/cjs/components/select/Select.vue.d.ts +1 -1
- package/dist/cjs/components/select/index.d.ts +1 -1
- package/dist/esm/components/layout/Main.vue.d.ts +19 -1
- package/dist/esm/components/layout/Main.vue.esm.js +48 -45
- package/dist/esm/components/layout/Show.vue.esm.js +38 -38
- package/dist/esm/components/select/Select.vue.d.ts +1 -1
- package/dist/esm/components/select/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/layout/Main.vue +22 -3
- package/src/components/layout/Show.vue +14 -3
- package/dist/cjs/components/layout/index.d.ts +0 -33
- package/dist/esm/components/layout/index.d.ts +0 -33
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@ant-design/icons-vue");require("../../store/modules/Breadcrumb.cjs.js");require("../../store/modules/DataDictionary.cjs.js");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@ant-design/icons-vue");require("../../store/modules/Breadcrumb.cjs.js");require("../../store/modules/DataDictionary.cjs.js");const y=require("../../store/modules/KeepAlive.cjs.js");require("../../store/modules/Menu.cjs.js");require("../../store/modules/NavTab.cjs.js");const g=require("../../store/modules/Settings.cjs.js");require("../../store/modules/User.cjs.js");const k=require("./NavTabs.vue.cjs.js"),h=require("./Breadcrumb.vue.cjs.js"),C=require("../menu/Menu.cjs.js"),N={class:"ditari-logo"},V={class:"ditari-menu"},w={class:"ditari-layout-header"},S={class:"ditari-layout-header-left"},b={class:"ditari-user-menu"},q={name:"DMainLayout"},B=e.defineComponent({...q,props:{showConfig:{default:{backBtn:"LeftOutlined"}}},setup(c){const u=c,d=y.useKeepAliveStore(),p=e.computed(()=>d.get),l=g.useSettingsStore(),{switchCollapsed:s}=l,t=e.computed(()=>l.getCollapsed);return e.provide("showConfig",u.showConfig),(n,r)=>{const _=e.resolveComponent("a-layout-sider"),f=e.resolveComponent("router-view"),m=e.resolveComponent("a-layout-content"),a=e.resolveComponent("a-layout"),v=e.resolveComponent("a-back-top");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(a,{class:"ditari-layout"},{default:e.withCtx(()=>[e.createVNode(_,{collapsed:e.unref(t),"onUpdate:collapsed":r[0]||(r[0]=o=>e.isRef(t)?t.value=o:null),trigger:null,collapsible:"",class:"ditari-layout-sider"},{default:e.withCtx(()=>[e.createElementVNode("div",N,[e.renderSlot(n.$slots,"logo")]),e.createElementVNode("div",V,[e.createVNode(e.unref(C.default))])]),_:3},8,["collapsed"]),e.createVNode(a,null,{default:e.withCtx(()=>[e.createElementVNode("div",{class:"ditari-top-layout",style:e.normalizeStyle({left:e.unref(t)?"80px":"200px"})},[e.createVNode(k.default),e.createElementVNode("div",w,[e.createElementVNode("div",S,[e.createElementVNode("div",{class:"ditari-side-collapsed",onClick:r[1]||(r[1]=(...o)=>e.unref(s)&&e.unref(s)(...o))},[e.unref(t)?(e.openBlock(),e.createBlock(e.unref(i.MenuUnfoldOutlined),{key:0,class:"trigger",style:{"font-size":"16px","font-weight":"bold",cursor:"pointer"}})):(e.openBlock(),e.createBlock(e.unref(i.MenuFoldOutlined),{key:1,style:{"font-size":"16px","font-weight":"bold",cursor:"pointer"}}))]),e.createVNode(h.default)]),e.createElementVNode("div",b,[e.renderSlot(n.$slots,"operation")])])],4),e.createVNode(m,{class:"ditari-layout-content",style:e.normalizeStyle({marginLeft:e.unref(t)?"80px":"200px"})},{default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(({Component:o})=>[e.createVNode(e.Transition,{name:"main",mode:"out-in",appear:""},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.KeepAlive,{ref:"keepAliveRef",include:e.unref(p)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{key:n.$route.path}))],1032,["include"]))]),_:2},1024)]),_:1}),e.renderSlot(n.$slots,"micro")]),_:3},8,["style"])]),_:3})]),_:3}),e.createVNode(v,{class:"ditari-ant-back-top","visibility-height":50})],64)}}});exports.default=B;
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
interface ShowConfig {
|
|
3
|
+
backBtn?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
6
|
+
showConfig: {
|
|
7
|
+
type: __PropType<ShowConfig | undefined>;
|
|
8
|
+
required: false;
|
|
9
|
+
default: any;
|
|
10
|
+
};
|
|
11
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
showConfig: {
|
|
13
|
+
type: __PropType<ShowConfig | undefined>;
|
|
14
|
+
required: false;
|
|
15
|
+
default: any;
|
|
16
|
+
};
|
|
17
|
+
}>>, {
|
|
18
|
+
showConfig: ShowConfig | undefined;
|
|
19
|
+
}>;
|
|
2
20
|
export default _sfc_main;
|
|
@@ -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"),l=require("vue-router"),c=require("@vueuse/core"),k=require("@ant-design/icons-vue"),T=require("../../store/modules/NavTab.cjs.js"),B=require("../../store/modules/Settings.cjs.js"),x=require("pinia"),N={class:"ditari-show-layout"},q={key:0,class:"ditari-show-footer"},V={name:"DShowLayout"},$=e.defineComponent({...V,props:{close:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},setup(i,{expose:u}){const o=i,s=l.useRouter(),r=l.useRoute(),d=e.useSlots(),a=T.useNavTabsStore(),p=B.useSettingsStore(),n=e.inject("showConfig"),f=()=>(console.log(n.backBtn),n.backBtn==="LeftOutlined"?e.h(k.LeftOutlined):e.h(e.resolveComponent(n.backBtn))),{refresh:h}=x.storeToRefs(p),g=e.computed(()=>o.loading),m={padding:`10px 10px ${d.footer?"70px":"10px"} 10px`},S=()=>{o.close&&a.deleteTabs(r.path),s.go(-1)},_=()=>{h.value=!0,a.deleteTabs(r.path),s.go(-1)},{y:v}=c.useWindowScroll(),b=c.useScrollLock(document.body);e.watch(()=>o.loading,t=>{b.value=t});const w=200;return u({closePage:_}),(t,L)=>{const y=e.resolveComponent("a-page-header"),C=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",N,[e.createVNode(C,{tip:"正在处理...",spinning:e.unref(g),delay:w,size:"large"},{default:e.withCtx(()=>[e.createVNode(y,{class:e.normalizeClass(["ditari-page-header",{active:e.unref(v)>0}]),ghost:!1,onBack:S},{backIcon:e.withCtx(()=>[e.createVNode(f)]),title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$route.meta.title),1)]),subTitle:e.withCtx(()=>[e.renderSlot(t.$slots,"subTitle")]),extra:e.withCtx(()=>[e.renderSlot(t.$slots,"extra")]),_:3},8,["class"]),e.createElementVNode("div",{class:"ditari-show-content",style:m},[e.renderSlot(t.$slots,"default")]),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",q,[e.renderSlot(t.$slots,"footer")])):e.createCommentVNode("",!0)]),_:3},8,["spinning"])])}}});exports.default=$;
|
|
@@ -58,8 +58,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
58
58
|
}, {
|
|
59
59
|
name: string;
|
|
60
60
|
value: any;
|
|
61
|
-
disabled: boolean | undefined;
|
|
62
61
|
placeholder: string | undefined;
|
|
62
|
+
disabled: boolean | undefined;
|
|
63
63
|
include: (string | number)[] | undefined;
|
|
64
64
|
}>;
|
|
65
65
|
export default _sfc_main;
|
|
@@ -57,8 +57,8 @@ export declare const DSelect: import("../../utils/install").SFCWithInstall<impor
|
|
|
57
57
|
}, {
|
|
58
58
|
name: string;
|
|
59
59
|
value: any;
|
|
60
|
-
disabled: boolean | undefined;
|
|
61
60
|
placeholder: string | undefined;
|
|
61
|
+
disabled: boolean | undefined;
|
|
62
62
|
include: (string | number)[] | undefined;
|
|
63
63
|
}>>;
|
|
64
64
|
export default DSelect;
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
interface ShowConfig {
|
|
3
|
+
backBtn?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
6
|
+
showConfig: {
|
|
7
|
+
type: __PropType<ShowConfig | undefined>;
|
|
8
|
+
required: false;
|
|
9
|
+
default: any;
|
|
10
|
+
};
|
|
11
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
showConfig: {
|
|
13
|
+
type: __PropType<ShowConfig | undefined>;
|
|
14
|
+
required: false;
|
|
15
|
+
default: any;
|
|
16
|
+
};
|
|
17
|
+
}>>, {
|
|
18
|
+
showConfig: ShowConfig | undefined;
|
|
19
|
+
}>;
|
|
2
20
|
export default _sfc_main;
|
|
@@ -1,91 +1,94 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { MenuUnfoldOutlined as
|
|
1
|
+
import { defineComponent as $, computed as f, provide as x, resolveComponent as n, openBlock as a, createElementBlock as A, Fragment as B, createVNode as t, withCtx as s, unref as e, isRef as M, createElementVNode as o, renderSlot as p, normalizeStyle as y, createBlock as c, Transition as z, KeepAlive as L, resolveDynamicComponent as N } from "vue";
|
|
2
|
+
import { MenuUnfoldOutlined as O, MenuFoldOutlined as D } from "@ant-design/icons-vue";
|
|
3
3
|
import "../../store/modules/Breadcrumb.esm.js";
|
|
4
4
|
import "../../store/modules/DataDictionary.esm.js";
|
|
5
|
-
import { useKeepAliveStore as
|
|
5
|
+
import { useKeepAliveStore as E } from "../../store/modules/KeepAlive.esm.js";
|
|
6
6
|
import "../../store/modules/Menu.esm.js";
|
|
7
7
|
import "../../store/modules/NavTab.esm.js";
|
|
8
|
-
import { useSettingsStore as
|
|
8
|
+
import { useSettingsStore as F } from "../../store/modules/Settings.esm.js";
|
|
9
9
|
import "../../store/modules/User.esm.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const
|
|
10
|
+
import K from "./NavTabs.vue.esm.js";
|
|
11
|
+
import R from "./Breadcrumb.vue.esm.js";
|
|
12
|
+
import U from "../menu/Menu.esm.js";
|
|
13
|
+
const V = { class: "ditari-logo" }, T = { class: "ditari-menu" }, j = { class: "ditari-layout-header" }, q = { class: "ditari-layout-header-left" }, G = { class: "ditari-user-menu" }, H = {
|
|
14
14
|
name: "DMainLayout"
|
|
15
|
-
},
|
|
16
|
-
...
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
}, st = /* @__PURE__ */ $({
|
|
16
|
+
...H,
|
|
17
|
+
props: {
|
|
18
|
+
showConfig: { default: { backBtn: "LeftOutlined" } }
|
|
19
|
+
},
|
|
20
|
+
setup(g) {
|
|
21
|
+
const v = g, h = E(), k = f(() => h.get), u = F(), { switchCollapsed: m } = u, i = f(() => u.getCollapsed);
|
|
22
|
+
return x("showConfig", v.showConfig), (r, d) => {
|
|
23
|
+
const C = n("a-layout-sider"), w = n("router-view"), b = n("a-layout-content"), _ = n("a-layout"), S = n("a-back-top");
|
|
24
|
+
return a(), A(B, null, [
|
|
22
25
|
t(_, { class: "ditari-layout" }, {
|
|
23
|
-
default:
|
|
24
|
-
t(
|
|
25
|
-
collapsed: e(
|
|
26
|
-
"onUpdate:collapsed": d[0] || (d[0] = (
|
|
26
|
+
default: s(() => [
|
|
27
|
+
t(C, {
|
|
28
|
+
collapsed: e(i),
|
|
29
|
+
"onUpdate:collapsed": d[0] || (d[0] = (l) => M(i) ? i.value = l : null),
|
|
27
30
|
trigger: null,
|
|
28
31
|
collapsible: "",
|
|
29
32
|
class: "ditari-layout-sider"
|
|
30
33
|
}, {
|
|
31
|
-
default:
|
|
32
|
-
o("div",
|
|
34
|
+
default: s(() => [
|
|
35
|
+
o("div", V, [
|
|
33
36
|
p(r.$slots, "logo")
|
|
34
37
|
]),
|
|
35
|
-
o("div",
|
|
36
|
-
t(e(
|
|
38
|
+
o("div", T, [
|
|
39
|
+
t(e(U))
|
|
37
40
|
])
|
|
38
41
|
]),
|
|
39
42
|
_: 3
|
|
40
43
|
}, 8, ["collapsed"]),
|
|
41
44
|
t(_, null, {
|
|
42
|
-
default:
|
|
45
|
+
default: s(() => [
|
|
43
46
|
o("div", {
|
|
44
47
|
class: "ditari-top-layout",
|
|
45
|
-
style: y({ left: e(
|
|
48
|
+
style: y({ left: e(i) ? "80px" : "200px" })
|
|
46
49
|
}, [
|
|
47
|
-
t(
|
|
48
|
-
o("div",
|
|
49
|
-
o("div",
|
|
50
|
+
t(K),
|
|
51
|
+
o("div", j, [
|
|
52
|
+
o("div", q, [
|
|
50
53
|
o("div", {
|
|
51
54
|
class: "ditari-side-collapsed",
|
|
52
55
|
onClick: d[1] || (d[1] = //@ts-ignore
|
|
53
|
-
(...
|
|
56
|
+
(...l) => e(m) && e(m)(...l))
|
|
54
57
|
}, [
|
|
55
|
-
e(
|
|
58
|
+
e(i) ? (a(), c(e(O), {
|
|
56
59
|
key: 0,
|
|
57
60
|
class: "trigger",
|
|
58
61
|
style: { "font-size": "16px", "font-weight": "bold", cursor: "pointer" }
|
|
59
|
-
})) : (
|
|
62
|
+
})) : (a(), c(e(D), {
|
|
60
63
|
key: 1,
|
|
61
64
|
style: { "font-size": "16px", "font-weight": "bold", cursor: "pointer" }
|
|
62
65
|
}))
|
|
63
66
|
]),
|
|
64
|
-
t(
|
|
67
|
+
t(R)
|
|
65
68
|
]),
|
|
66
|
-
o("div",
|
|
69
|
+
o("div", G, [
|
|
67
70
|
p(r.$slots, "operation")
|
|
68
71
|
])
|
|
69
72
|
])
|
|
70
73
|
], 4),
|
|
71
74
|
t(b, {
|
|
72
75
|
class: "ditari-layout-content",
|
|
73
|
-
style: y({ marginLeft: e(
|
|
76
|
+
style: y({ marginLeft: e(i) ? "80px" : "200px" })
|
|
74
77
|
}, {
|
|
75
|
-
default:
|
|
76
|
-
t(
|
|
77
|
-
default:
|
|
78
|
-
t(
|
|
78
|
+
default: s(() => [
|
|
79
|
+
t(w, null, {
|
|
80
|
+
default: s(({ Component: l }) => [
|
|
81
|
+
t(z, {
|
|
79
82
|
name: "main",
|
|
80
83
|
mode: "out-in",
|
|
81
84
|
appear: ""
|
|
82
85
|
}, {
|
|
83
|
-
default:
|
|
84
|
-
(
|
|
86
|
+
default: s(() => [
|
|
87
|
+
(a(), c(L, {
|
|
85
88
|
ref: "keepAliveRef",
|
|
86
|
-
include: e(
|
|
89
|
+
include: e(k)
|
|
87
90
|
}, [
|
|
88
|
-
(
|
|
91
|
+
(a(), c(N(l), {
|
|
89
92
|
key: r.$route.path
|
|
90
93
|
}))
|
|
91
94
|
], 1032, ["include"]))
|
|
@@ -105,14 +108,14 @@ const O = { class: "ditari-logo" }, R = { class: "ditari-menu" }, U = { class: "
|
|
|
105
108
|
]),
|
|
106
109
|
_: 3
|
|
107
110
|
}),
|
|
108
|
-
t(
|
|
111
|
+
t(S, {
|
|
109
112
|
class: "ditari-ant-back-top",
|
|
110
|
-
|
|
113
|
+
"visibility-height": 50
|
|
111
114
|
})
|
|
112
115
|
], 64);
|
|
113
116
|
};
|
|
114
117
|
}
|
|
115
118
|
});
|
|
116
119
|
export {
|
|
117
|
-
|
|
120
|
+
st as default
|
|
118
121
|
};
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { defineComponent as x, useSlots as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useNavTabsStore as
|
|
6
|
-
import { useSettingsStore as
|
|
7
|
-
import { storeToRefs as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as x, useSlots as N, inject as R, computed as V, watch as z, resolveComponent as r, openBlock as d, createElementBlock as p, createVNode as l, unref as u, withCtx as o, normalizeClass as D, createTextVNode as E, toDisplayString as O, renderSlot as t, createElementVNode as j, createCommentVNode as I, h as f } from "vue";
|
|
2
|
+
import { useRouter as P, useRoute as W } from "vue-router";
|
|
3
|
+
import { useWindowScroll as q, useScrollLock as A } from "@vueuse/core";
|
|
4
|
+
import { LeftOutlined as F } from "@ant-design/icons-vue";
|
|
5
|
+
import { useNavTabsStore as G } from "../../store/modules/NavTab.esm.js";
|
|
6
|
+
import { useSettingsStore as H } from "../../store/modules/Settings.esm.js";
|
|
7
|
+
import { storeToRefs as J } from "pinia";
|
|
8
|
+
const K = { class: "ditari-show-layout" }, M = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "ditari-show-footer"
|
|
11
|
-
},
|
|
11
|
+
}, Q = {
|
|
12
12
|
name: "DShowLayout"
|
|
13
|
-
},
|
|
14
|
-
...
|
|
13
|
+
}, ne = /* @__PURE__ */ x({
|
|
14
|
+
...Q,
|
|
15
15
|
props: {
|
|
16
16
|
close: { type: Boolean, default: !1 },
|
|
17
17
|
loading: { type: Boolean, default: !1 }
|
|
18
18
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const s =
|
|
21
|
-
padding: `10px 10px ${
|
|
22
|
-
},
|
|
23
|
-
s.close &&
|
|
19
|
+
setup(m, { expose: g }) {
|
|
20
|
+
const s = m, n = P(), i = W(), h = N(), c = G(), _ = H(), a = R("showConfig"), b = () => (console.log(a.backBtn), a.backBtn === "LeftOutlined" ? f(F) : f(r(a.backBtn))), { refresh: y } = J(_), S = V(() => s.loading), k = {
|
|
21
|
+
padding: `10px 10px ${h.footer ? "70px" : "10px"} 10px`
|
|
22
|
+
}, w = () => {
|
|
23
|
+
s.close && c.deleteTabs(i.path), n.go(-1);
|
|
24
24
|
}, v = () => {
|
|
25
|
-
|
|
26
|
-
}, { y: T } =
|
|
27
|
-
|
|
25
|
+
y.value = !0, c.deleteTabs(i.path), n.go(-1);
|
|
26
|
+
}, { y: T } = q(), B = A(document.body);
|
|
27
|
+
z(
|
|
28
28
|
() => s.loading,
|
|
29
29
|
(e) => {
|
|
30
|
-
|
|
30
|
+
B.value = e;
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
|
-
const
|
|
34
|
-
return
|
|
33
|
+
const C = 200;
|
|
34
|
+
return g({
|
|
35
35
|
closePage: v
|
|
36
|
-
}), (e,
|
|
37
|
-
const
|
|
38
|
-
return d(), p("div",
|
|
39
|
-
|
|
36
|
+
}), (e, U) => {
|
|
37
|
+
const $ = r("a-page-header"), L = r("a-spin");
|
|
38
|
+
return d(), p("div", K, [
|
|
39
|
+
l(L, {
|
|
40
40
|
tip: "正在处理...",
|
|
41
|
-
spinning:
|
|
42
|
-
delay:
|
|
41
|
+
spinning: u(S),
|
|
42
|
+
delay: C,
|
|
43
43
|
size: "large"
|
|
44
44
|
}, {
|
|
45
45
|
default: o(() => [
|
|
46
|
-
|
|
47
|
-
class:
|
|
46
|
+
l($, {
|
|
47
|
+
class: D(["ditari-page-header", { active: u(T) > 0 }]),
|
|
48
48
|
ghost: !1,
|
|
49
|
-
onBack:
|
|
49
|
+
onBack: w
|
|
50
50
|
}, {
|
|
51
51
|
backIcon: o(() => [
|
|
52
|
-
|
|
52
|
+
l(b)
|
|
53
53
|
]),
|
|
54
54
|
title: o(() => [
|
|
55
|
-
|
|
55
|
+
E(O(e.$route.meta.title), 1)
|
|
56
56
|
]),
|
|
57
57
|
subTitle: o(() => [
|
|
58
58
|
t(e.$slots, "subTitle")
|
|
@@ -62,15 +62,15 @@ const F = { class: "ditari-show-layout" }, G = {
|
|
|
62
62
|
]),
|
|
63
63
|
_: 3
|
|
64
64
|
}, 8, ["class"]),
|
|
65
|
-
|
|
65
|
+
j("div", {
|
|
66
66
|
class: "ditari-show-content",
|
|
67
|
-
style:
|
|
67
|
+
style: k
|
|
68
68
|
}, [
|
|
69
69
|
t(e.$slots, "default")
|
|
70
70
|
]),
|
|
71
|
-
e.$slots.footer ? (d(), p("div",
|
|
71
|
+
e.$slots.footer ? (d(), p("div", M, [
|
|
72
72
|
t(e.$slots, "footer")
|
|
73
|
-
])) :
|
|
73
|
+
])) : I("", !0)
|
|
74
74
|
]),
|
|
75
75
|
_: 3
|
|
76
76
|
}, 8, ["spinning"])
|
|
@@ -79,5 +79,5 @@ const F = { class: "ditari-show-layout" }, G = {
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
ne as default
|
|
83
83
|
};
|
|
@@ -58,8 +58,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
58
58
|
}, {
|
|
59
59
|
name: string;
|
|
60
60
|
value: any;
|
|
61
|
-
disabled: boolean | undefined;
|
|
62
61
|
placeholder: string | undefined;
|
|
62
|
+
disabled: boolean | undefined;
|
|
63
63
|
include: (string | number)[] | undefined;
|
|
64
64
|
}>;
|
|
65
65
|
export default _sfc_main;
|
|
@@ -57,8 +57,8 @@ export declare const DSelect: import("../../utils/install").SFCWithInstall<impor
|
|
|
57
57
|
}, {
|
|
58
58
|
name: string;
|
|
59
59
|
value: any;
|
|
60
|
-
disabled: boolean | undefined;
|
|
61
60
|
placeholder: string | undefined;
|
|
61
|
+
disabled: boolean | undefined;
|
|
62
62
|
include: (string | number)[] | undefined;
|
|
63
63
|
}>>;
|
|
64
64
|
export default DSelect;
|
package/package.json
CHANGED
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* 入口文件
|
|
4
4
|
*/
|
|
5
|
-
import { computed } from "vue";
|
|
6
|
-
import {
|
|
5
|
+
import { computed, provide } from "vue";
|
|
6
|
+
import {
|
|
7
|
+
MenuFoldOutlined,
|
|
8
|
+
MenuUnfoldOutlined,
|
|
9
|
+
} from "@ant-design/icons-vue";
|
|
7
10
|
import { useKeepAliveStore, useSettingsStore } from "../../store";
|
|
8
11
|
|
|
9
12
|
//标签页组件
|
|
@@ -13,6 +16,19 @@ import DBreadcrumb from "./Breadcrumb.vue";
|
|
|
13
16
|
// 菜单组件
|
|
14
17
|
import Menu from "../menu/Menu";
|
|
15
18
|
|
|
19
|
+
interface Props {
|
|
20
|
+
showConfig?: ShowConfig;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface ShowConfig {
|
|
24
|
+
// 返回按钮 组件名字 默认为LeftOutlined图标
|
|
25
|
+
backBtn?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
29
|
+
showConfig: { backBtn: "LeftOutlined" } as any
|
|
30
|
+
});
|
|
31
|
+
|
|
16
32
|
// 缓存store
|
|
17
33
|
const store = useKeepAliveStore();
|
|
18
34
|
// 缓存的names
|
|
@@ -21,6 +37,9 @@ const keepAliveNames = computed(() => store.get);
|
|
|
21
37
|
const settingsStore = useSettingsStore();
|
|
22
38
|
const { switchCollapsed } = settingsStore;
|
|
23
39
|
const collapsedStatus = computed(() => settingsStore.getCollapsed);
|
|
40
|
+
|
|
41
|
+
// 注入show组件的配置文件
|
|
42
|
+
provide("showConfig", props.showConfig);
|
|
24
43
|
</script>
|
|
25
44
|
<script lang="ts">
|
|
26
45
|
export default {
|
|
@@ -83,6 +102,6 @@ export default {
|
|
|
83
102
|
</a-layout-content>
|
|
84
103
|
</a-layout>
|
|
85
104
|
</a-layout>
|
|
86
|
-
<a-back-top class="ditari-ant-back-top" :
|
|
105
|
+
<a-back-top class="ditari-ant-back-top" :visibility-height="50"></a-back-top>
|
|
87
106
|
</template>
|
|
88
107
|
<style lang="scss"></style>
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* 详情/新增/编辑组件
|
|
4
4
|
*/
|
|
5
|
-
import { computed, useSlots, watch } from "vue";
|
|
5
|
+
import { computed, inject, useSlots, watch, h, resolveComponent } from "vue";
|
|
6
6
|
import { useRoute, useRouter } from "vue-router";
|
|
7
|
-
import { LeftOutlined } from "@ant-design/icons-vue";
|
|
8
7
|
import { useScrollLock, useWindowScroll } from "@vueuse/core";
|
|
8
|
+
import { LeftOutlined } from "@ant-design/icons-vue";
|
|
9
9
|
import { useNavTabsStore } from "../../store/modules/NavTab";
|
|
10
10
|
import { useSettingsStore } from "../../store/modules/Settings";
|
|
11
11
|
|
|
@@ -30,6 +30,17 @@ const slots = useSlots();
|
|
|
30
30
|
const navTabStore = useNavTabsStore();
|
|
31
31
|
const settingsStore = useSettingsStore();
|
|
32
32
|
|
|
33
|
+
const showConfig = inject("showConfig") as any;
|
|
34
|
+
|
|
35
|
+
const btnRender = () => {
|
|
36
|
+
console.log(showConfig.backBtn);
|
|
37
|
+
if (showConfig.backBtn === "LeftOutlined") {
|
|
38
|
+
return h(LeftOutlined);
|
|
39
|
+
} else {
|
|
40
|
+
return h(resolveComponent(showConfig.backBtn));
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
33
44
|
const { refresh } = storeToRefs(settingsStore);
|
|
34
45
|
|
|
35
46
|
const showLoading = computed(() => props.loading);
|
|
@@ -100,7 +111,7 @@ export default {
|
|
|
100
111
|
@back="onBack"
|
|
101
112
|
>
|
|
102
113
|
<template #backIcon>
|
|
103
|
-
<
|
|
114
|
+
<btn-render />
|
|
104
115
|
</template>
|
|
105
116
|
<template #title>{{ $route.meta.title }} </template>
|
|
106
117
|
<template #subTitle>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export declare const DList: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "refresh"[], "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
2
|
-
onRefresh?: ((...args: any[]) => any) | undefined;
|
|
3
|
-
}, {}>>;
|
|
4
|
-
export declare const DMain: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
5
|
-
export declare const DNavTabs: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
6
|
-
export declare const DShow: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{
|
|
7
|
-
close: {
|
|
8
|
-
type: import("vue").PropType<boolean | undefined>;
|
|
9
|
-
required: false;
|
|
10
|
-
default: boolean;
|
|
11
|
-
};
|
|
12
|
-
loading: {
|
|
13
|
-
type: import("vue").PropType<boolean | undefined>;
|
|
14
|
-
required: false;
|
|
15
|
-
default: boolean;
|
|
16
|
-
};
|
|
17
|
-
}, {
|
|
18
|
-
closePage: () => void;
|
|
19
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
-
close: {
|
|
21
|
-
type: import("vue").PropType<boolean | undefined>;
|
|
22
|
-
required: false;
|
|
23
|
-
default: boolean;
|
|
24
|
-
};
|
|
25
|
-
loading: {
|
|
26
|
-
type: import("vue").PropType<boolean | undefined>;
|
|
27
|
-
required: false;
|
|
28
|
-
default: boolean;
|
|
29
|
-
};
|
|
30
|
-
}>>, {
|
|
31
|
-
close: boolean | undefined;
|
|
32
|
-
loading: boolean | undefined;
|
|
33
|
-
}>>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export declare const DList: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "refresh"[], "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
2
|
-
onRefresh?: ((...args: any[]) => any) | undefined;
|
|
3
|
-
}, {}>>;
|
|
4
|
-
export declare const DMain: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
5
|
-
export declare const DNavTabs: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
6
|
-
export declare const DShow: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{
|
|
7
|
-
close: {
|
|
8
|
-
type: import("vue").PropType<boolean | undefined>;
|
|
9
|
-
required: false;
|
|
10
|
-
default: boolean;
|
|
11
|
-
};
|
|
12
|
-
loading: {
|
|
13
|
-
type: import("vue").PropType<boolean | undefined>;
|
|
14
|
-
required: false;
|
|
15
|
-
default: boolean;
|
|
16
|
-
};
|
|
17
|
-
}, {
|
|
18
|
-
closePage: () => void;
|
|
19
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
-
close: {
|
|
21
|
-
type: import("vue").PropType<boolean | undefined>;
|
|
22
|
-
required: false;
|
|
23
|
-
default: boolean;
|
|
24
|
-
};
|
|
25
|
-
loading: {
|
|
26
|
-
type: import("vue").PropType<boolean | undefined>;
|
|
27
|
-
required: false;
|
|
28
|
-
default: boolean;
|
|
29
|
-
};
|
|
30
|
-
}>>, {
|
|
31
|
-
close: boolean | undefined;
|
|
32
|
-
loading: boolean | undefined;
|
|
33
|
-
}>>;
|