@ditari/bsui 1.0.41 → 1.0.42
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/NavTabs.vue.cjs.js +1 -1
- package/dist/cjs/components/layout/Show.vue.cjs.js +1 -1
- package/dist/cjs/components/layout/Show.vue.d.ts +1 -1
- package/dist/cjs/components/layout/index.d.ts +1 -1
- package/dist/esm/components/layout/NavTabs.vue.esm.js +1 -1
- package/dist/esm/components/layout/Show.vue.d.ts +1 -1
- package/dist/esm/components/layout/Show.vue.esm.js +40 -40
- package/dist/esm/components/layout/index.d.ts +1 -1
- package/dist/style/layout/style/show.scss +1 -1
- package/dist/style/theme/variable.scss +7 -2
- package/package.json +1 -1
- package/src/components/layout/NavTabs.vue +3 -2
- package/src/components/layout/Show.vue +5 -3
- package/src/components/layout/style/show.scss +1 -1
- package/src/components/theme/variable.scss +7 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("vue-router"),C=require("@ant-design/icons-vue"),y=require("pinia"),S=require("../../store/modules/NavTab.cjs.js"),g=require("../../store/modules/KeepAlive.cjs.js"),q=require("../../store/modules/Menu.cjs.js"),N={class:"ditari-nav"},T=e.createElementVNode("div",{class:"tab-dividers"},null,-1),B={key:0,class:"tab-close"},K={name:"DNavTabs"},E=e.defineComponent({...K,setup(V){const l=_.useRoute(),v=_.useRouter(),c=S.useNavTabsStore(),p=g.useKeepAliveStore(),h=q.useMenuStore(),n=e.computed(()=>c.getList),{selectedMenuKeys:u}=y.storeToRefs(h),r=e.ref("");e.watchEffect(()=>{r.value=u.value.length>0?u.value[0]:""}),d(),e.watch(()=>l.path,()=>{d()});function d(){c.save(l),u.value=[l.path],p.save(l)}const m=a=>{if(a!==l.path){const t=n.value.filter(s=>s.path===a)[0];v.push({path:t.path,query:t.query,params:t.params})}},f=(a,t)=>{const s=n.value.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("vue-router"),C=require("@ant-design/icons-vue"),y=require("pinia"),S=require("../../store/modules/NavTab.cjs.js"),g=require("../../store/modules/KeepAlive.cjs.js"),q=require("../../store/modules/Menu.cjs.js"),N={class:"ditari-nav"},T=e.createElementVNode("div",{class:"tab-dividers"},null,-1),B={key:0,class:"tab-close"},K={name:"DNavTabs"},E=e.defineComponent({...K,setup(V){const l=_.useRoute(),v=_.useRouter(),c=S.useNavTabsStore(),p=g.useKeepAliveStore(),h=q.useMenuStore(),n=e.computed(()=>c.getList),{selectedMenuKeys:u}=y.storeToRefs(h),r=e.ref("");e.watchEffect(()=>{r.value=u.value.length>0?u.value[0]:""}),d(),e.watch(()=>l.path,()=>{d()});function d(){c.save(l),u.value=[l.path],p.save(l)}const m=a=>{if(a!==l.path){const t=n.value.filter(s=>s.path===a)[0];v.push({path:t.path,query:t.query,params:t.params})}},f=(a,t)=>{const s=n.value.find(i=>i.fullPath===t);a.stopPropagation(),c.deleteTabs(t),v.push(n.value[n.value.length-1].fullPath),s.name&&p.deleteKeepAlive(s.name)},b=a=>{var t;return!((t=a.meta)!=null&&t.keepOpen)||n.value.length===1};return(a,t)=>{const s=e.resolveComponent("a-tab-pane"),i=e.resolveComponent("a-tabs");return e.openBlock(),e.createElementBlock("div",N,[e.createVNode(i,{activeKey:r.value,"onUpdate:activeKey":t[0]||(t[0]=o=>r.value=o),type:"card",onTabClick:m},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),o=>(e.openBlock(),e.createBlock(s,{key:o.path},{tab:e.withCtx(()=>[T,e.createElementVNode("div",{class:e.normalizeClass(["tab-item",{active:r.value===o.path}])},e.toDisplayString(o.meta.title),3),b(o)?(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(e.unref(C.CloseOutlined),{onClick:k=>f(k,o.fullPath)},null,8,["onClick"])])):e.createCommentVNode("",!0)]),_:2},1024))),128))]),_:1},8,["activeKey"])])}}});exports.default=E;
|
|
@@ -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"),a=require("vue-router"),b=require("@ant-design/icons-vue"),l=require("@vueuse/core"),T=require("../../store/modules/NavTab.cjs.js"),C=require("../../store/modules/Settings.cjs.js"),k=require("pinia"),x={class:"ditari-show-layout"},N={key:0,class:"ditari-show-footer"},q={name:"DShowLayout"},B=e.defineComponent({...q,props:{close:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},setup(c,{expose:i}){const o=c,s=a.useRouter(),n=a.useRoute(),u=e.useSlots(),r=T.useNavTabsStore(),d=C.useSettingsStore(),{refresh:p}=k.storeToRefs(d),f=e.computed(()=>o.loading),g={padding:`10px 10px ${u.footer?"70px":"10px"} 10px`},h=()=>{o.close&&r.deleteTabs(n.path),s.go(-1)},m=()=>{p.value=!0,r.deleteTabs(n.path),s.go(-1)},{y:S}=l.useWindowScroll(),_=l.useScrollLock(document.body);e.watch(()=>o.loading,t=>{_.value=t});const v=200;return i({closePage:m}),(t,V)=>{const y=e.resolveComponent("a-page-header"),w=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",x,[e.createVNode(w,{tip:"正在处理...",spinning:e.unref(f),delay:v,size:"large"},{default:e.withCtx(()=>[e.createVNode(y,{class:e.normalizeClass(["ditari-page-header",{active:e.unref(S)>0}]),ghost:!1,onBack:h},{backIcon:e.withCtx(()=>[e.createVNode(e.unref(b.LeftOutlined))]),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:g},[e.renderSlot(t.$slots,"default")]),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",N,[e.renderSlot(t.$slots,"footer")])):e.createCommentVNode("",!0)]),_:3},8,["spinning"])])}}});exports.default=B;
|
|
@@ -11,7 +11,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
11
11
|
default: boolean;
|
|
12
12
|
};
|
|
13
13
|
}, {
|
|
14
|
-
|
|
14
|
+
closePage: () => void;
|
|
15
15
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
16
|
close: {
|
|
17
17
|
type: __PropType<boolean | undefined>;
|
|
@@ -15,7 +15,7 @@ export declare const DShow: import("../../utils/install").SFCWithInstall<import(
|
|
|
15
15
|
default: boolean;
|
|
16
16
|
};
|
|
17
17
|
}, {
|
|
18
|
-
|
|
18
|
+
closePage: () => void;
|
|
19
19
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
20
|
close: {
|
|
21
21
|
type: import("vue").PropType<boolean | undefined>;
|
|
@@ -35,7 +35,7 @@ const j = { class: "ditari-nav" }, G = /* @__PURE__ */ C("div", { class: "tab-di
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}, S = (t, e) => {
|
|
38
|
-
const s = o.value.
|
|
38
|
+
const s = o.value.find((i) => i.fullPath === e);
|
|
39
39
|
t.stopPropagation(), c.deleteTabs(e), v.push(o.value[o.value.length - 1].fullPath), s.name && m.deleteKeepAlive(s.name);
|
|
40
40
|
}, g = (t) => {
|
|
41
41
|
var e;
|
|
@@ -11,7 +11,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
11
11
|
default: boolean;
|
|
12
12
|
};
|
|
13
13
|
}, {
|
|
14
|
-
|
|
14
|
+
closePage: () => void;
|
|
15
15
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
16
|
close: {
|
|
17
17
|
type: __PropType<boolean | undefined>;
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { LeftOutlined as
|
|
4
|
-
import { useWindowScroll as
|
|
5
|
-
import { useNavTabsStore as
|
|
6
|
-
import { useSettingsStore as
|
|
7
|
-
import { storeToRefs as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as x, useSlots as B, computed as C, watch as L, resolveComponent as c, openBlock as d, createElementBlock as p, createVNode as n, unref as r, withCtx as o, normalizeClass as N, createTextVNode as R, toDisplayString as V, renderSlot as t, createElementVNode as z, createCommentVNode as D } from "vue";
|
|
2
|
+
import { useRouter as E, useRoute as I } from "vue-router";
|
|
3
|
+
import { LeftOutlined as O } from "@ant-design/icons-vue";
|
|
4
|
+
import { useWindowScroll as P, useScrollLock as W } from "@vueuse/core";
|
|
5
|
+
import { useNavTabsStore as j } from "../../store/modules/NavTab.esm.js";
|
|
6
|
+
import { useSettingsStore as q } from "../../store/modules/Settings.esm.js";
|
|
7
|
+
import { storeToRefs as A } from "pinia";
|
|
8
|
+
const F = { class: "ditari-show-layout" }, G = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "ditari-show-footer"
|
|
11
|
-
},
|
|
11
|
+
}, H = {
|
|
12
12
|
name: "DShowLayout"
|
|
13
|
-
},
|
|
14
|
-
...
|
|
13
|
+
}, ee = /* @__PURE__ */ x({
|
|
14
|
+
...H,
|
|
15
15
|
props: {
|
|
16
16
|
close: { type: Boolean, default: !1 },
|
|
17
17
|
loading: { type: Boolean, default: !1 }
|
|
18
18
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
padding: `10px 10px ${
|
|
22
|
-
}, y = () => {
|
|
23
|
-
r.close && i.deleteTabs(l.path), s.go(-1);
|
|
19
|
+
setup(u, { expose: m }) {
|
|
20
|
+
const s = u, a = E(), l = I(), f = B(), i = j(), g = q(), { refresh: h } = A(g), _ = C(() => s.loading), y = {
|
|
21
|
+
padding: `10px 10px ${f.footer ? "70px" : "10px"} 10px`
|
|
24
22
|
}, S = () => {
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
s.close && i.deleteTabs(l.path), a.go(-1);
|
|
24
|
+
}, v = () => {
|
|
25
|
+
h.value = !0, i.deleteTabs(l.path), a.go(-1);
|
|
26
|
+
}, { y: T } = P(), b = W(document.body);
|
|
27
|
+
L(
|
|
28
|
+
() => s.loading,
|
|
29
29
|
(e) => {
|
|
30
|
-
|
|
30
|
+
b.value = e;
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
|
-
const
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
}), (e,
|
|
37
|
-
const k = c("a-page-header"),
|
|
38
|
-
return d(), p("div",
|
|
39
|
-
|
|
33
|
+
const w = 200;
|
|
34
|
+
return m({
|
|
35
|
+
closePage: v
|
|
36
|
+
}), (e, J) => {
|
|
37
|
+
const k = c("a-page-header"), $ = c("a-spin");
|
|
38
|
+
return d(), p("div", F, [
|
|
39
|
+
n($, {
|
|
40
40
|
tip: "正在处理...",
|
|
41
|
-
spinning:
|
|
42
|
-
delay:
|
|
41
|
+
spinning: r(_),
|
|
42
|
+
delay: w,
|
|
43
43
|
size: "large"
|
|
44
44
|
}, {
|
|
45
45
|
default: o(() => [
|
|
46
|
-
|
|
47
|
-
class:
|
|
46
|
+
n(k, {
|
|
47
|
+
class: N(["ditari-page-header", { active: r(T) > 0 }]),
|
|
48
48
|
ghost: !1,
|
|
49
|
-
onBack:
|
|
49
|
+
onBack: S
|
|
50
50
|
}, {
|
|
51
51
|
backIcon: o(() => [
|
|
52
|
-
|
|
52
|
+
n(r(O))
|
|
53
53
|
]),
|
|
54
54
|
title: o(() => [
|
|
55
|
-
|
|
55
|
+
R(V(e.$route.meta.title), 1)
|
|
56
56
|
]),
|
|
57
57
|
subTitle: o(() => [
|
|
58
58
|
t(e.$slots, "subTitle")
|
|
@@ -62,15 +62,15 @@ const A = { class: "ditari-show-layout" }, F = {
|
|
|
62
62
|
]),
|
|
63
63
|
_: 3
|
|
64
64
|
}, 8, ["class"]),
|
|
65
|
-
|
|
65
|
+
z("div", {
|
|
66
66
|
class: "ditari-show-content",
|
|
67
|
-
style:
|
|
67
|
+
style: y
|
|
68
68
|
}, [
|
|
69
69
|
t(e.$slots, "default")
|
|
70
70
|
]),
|
|
71
|
-
e.$slots.footer ? (d(), p("div",
|
|
71
|
+
e.$slots.footer ? (d(), p("div", G, [
|
|
72
72
|
t(e.$slots, "footer")
|
|
73
|
-
])) :
|
|
73
|
+
])) : D("", !0)
|
|
74
74
|
]),
|
|
75
75
|
_: 3
|
|
76
76
|
}, 8, ["spinning"])
|
|
@@ -79,5 +79,5 @@ const A = { class: "ditari-show-layout" }, F = {
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
ee as default
|
|
83
83
|
};
|
|
@@ -15,7 +15,7 @@ export declare const DShow: import("../../utils/install").SFCWithInstall<import(
|
|
|
15
15
|
default: boolean;
|
|
16
16
|
};
|
|
17
17
|
}, {
|
|
18
|
-
|
|
18
|
+
closePage: () => void;
|
|
19
19
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
20
|
close: {
|
|
21
21
|
type: import("vue").PropType<boolean | undefined>;
|
|
@@ -17,8 +17,7 @@ $grid-input-border-width: 2px !default;
|
|
|
17
17
|
$gird-border-width: 1px !default;
|
|
18
18
|
// 网格里的输入框校验结果是否显示
|
|
19
19
|
$gird-error-display: block !default;
|
|
20
|
-
|
|
21
|
-
$box-shadow-color: #e0e0e0 !default;
|
|
20
|
+
|
|
22
21
|
|
|
23
22
|
/******======左侧菜单======******/
|
|
24
23
|
// 左侧菜单
|
|
@@ -37,3 +36,9 @@ $nav-tab-dividers-color: #fff !default;
|
|
|
37
36
|
$nav-tab-text-color: #fff !default;
|
|
38
37
|
// 悬浮的背景色
|
|
39
38
|
$nav-tab-hover-bg-color: #065de1 !default;
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
/******======详情页,返回导航距离======******/
|
|
42
|
+
$show-header-top: 84px!default;
|
|
43
|
+
// show头部阴影
|
|
44
|
+
$box-shadow-color: #e0e0e0 !default;
|
package/package.json
CHANGED
|
@@ -21,6 +21,7 @@ const menuStore = useMenuStore();
|
|
|
21
21
|
|
|
22
22
|
//标签列表
|
|
23
23
|
const navTabs: Ref<INavTab[]> = computed(() => navStore.getList);
|
|
24
|
+
// 被选中的菜单
|
|
24
25
|
const { selectedMenuKeys } = storeToRefs(menuStore);
|
|
25
26
|
//当前被激活的标签 通过选中的菜单得到
|
|
26
27
|
const activeKey = ref("");
|
|
@@ -72,7 +73,7 @@ const onClick = (key: string) => {
|
|
|
72
73
|
* @param targetKey
|
|
73
74
|
*/
|
|
74
75
|
const onClose = ($event: any, key: string) => {
|
|
75
|
-
const rs = navTabs.value.
|
|
76
|
+
const rs = navTabs.value.find((item) => item.fullPath === key) as INavTab;
|
|
76
77
|
//阻止冒泡
|
|
77
78
|
$event.stopPropagation();
|
|
78
79
|
// 删除标签
|
|
@@ -87,7 +88,7 @@ const onClose = ($event: any, key: string) => {
|
|
|
87
88
|
};
|
|
88
89
|
|
|
89
90
|
/**
|
|
90
|
-
*
|
|
91
|
+
* 是否显示标签关闭按钮函数
|
|
91
92
|
* @param item
|
|
92
93
|
* 根据item和当前 navTabs 长度来判断是否要隐藏关闭标签按钮
|
|
93
94
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* 详情/新增/编辑组件
|
|
4
4
|
*/
|
|
5
|
-
import { useSlots, watch } from "vue";
|
|
5
|
+
import { computed, useSlots, watch } from "vue";
|
|
6
6
|
import { useRoute, useRouter } from "vue-router";
|
|
7
7
|
import { LeftOutlined } from "@ant-design/icons-vue";
|
|
8
8
|
import { useScrollLock, useWindowScroll } from "@vueuse/core";
|
|
@@ -32,6 +32,8 @@ const settingsStore = useSettingsStore();
|
|
|
32
32
|
|
|
33
33
|
const { refresh } = storeToRefs(settingsStore);
|
|
34
34
|
|
|
35
|
+
const showLoading = computed(() => props.loading);
|
|
36
|
+
|
|
35
37
|
const contentStyle = {
|
|
36
38
|
padding: `10px 10px ${slots.footer ? "70px" : "10px"} 10px`
|
|
37
39
|
};
|
|
@@ -74,7 +76,7 @@ watch(
|
|
|
74
76
|
|
|
75
77
|
const delayTime = 200;
|
|
76
78
|
defineExpose({
|
|
77
|
-
|
|
79
|
+
closePage: onRefresh
|
|
78
80
|
});
|
|
79
81
|
</script>
|
|
80
82
|
<script lang="ts">
|
|
@@ -86,7 +88,7 @@ export default {
|
|
|
86
88
|
<div class="ditari-show-layout">
|
|
87
89
|
<a-spin
|
|
88
90
|
tip="正在处理..."
|
|
89
|
-
:spinning="
|
|
91
|
+
:spinning="showLoading"
|
|
90
92
|
:delay="delayTime"
|
|
91
93
|
size="large"
|
|
92
94
|
>
|
|
@@ -17,8 +17,7 @@ $grid-input-border-width: 2px !default;
|
|
|
17
17
|
$gird-border-width: 1px !default;
|
|
18
18
|
// 网格里的输入框校验结果是否显示
|
|
19
19
|
$gird-error-display: block !default;
|
|
20
|
-
|
|
21
|
-
$box-shadow-color: #e0e0e0 !default;
|
|
20
|
+
|
|
22
21
|
|
|
23
22
|
/******======左侧菜单======******/
|
|
24
23
|
// 左侧菜单
|
|
@@ -37,3 +36,9 @@ $nav-tab-dividers-color: #fff !default;
|
|
|
37
36
|
$nav-tab-text-color: #fff !default;
|
|
38
37
|
// 悬浮的背景色
|
|
39
38
|
$nav-tab-hover-bg-color: #065de1 !default;
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
/******======详情页,返回导航距离======******/
|
|
42
|
+
$show-header-top: 84px!default;
|
|
43
|
+
// show头部阴影
|
|
44
|
+
$box-shadow-color: #e0e0e0 !default;
|