@ditari/bsui 1.0.47 → 1.0.49
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/cjs/components/table/Table.cjs.js +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/dist/esm/components/table/Table.esm.js +57 -54
- package/package.json +1 -1
- package/src/components/layout/Main.vue +22 -3
- package/src/components/layout/Show.vue +14 -3
- package/src/components/table/Table.tsx +6 -1
- 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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),C=require("ant-design-vue"),P=require("../../utils/html.cjs.js"),M=require("../theme/index.cjs.js"),Q=()=>({data:{type:Object,required:!0},height:{type:Number,default:300},keys:Array,rowKey:{type:String,default:"id"},loading:{type:Boolean,default:!1},pagination:{type:Object,default:()=>({})},config:{type:Object,default:()=>({})},expandedRowKeys:{type:Object,default:()=>[]}}),b={defaultPageSize:20,hideOnSinglePage:!1,pageSizeOptions:["10","20","30","40"],responsive:!0,showQuickJumper:!0,showLessItems:!0,showTotal:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),C=require("ant-design-vue"),P=require("../../utils/html.cjs.js"),M=require("../theme/index.cjs.js"),Q=()=>({data:{type:Object,required:!0},height:{type:Number,default:300},keys:Array,rowKey:{type:String,default:"id"},loading:{type:Boolean,default:!1},pagination:{type:Object,default:()=>({})},config:{type:Object,default:()=>({})},expandedRowKeys:{type:Object,default:()=>[]}}),b={defaultPageSize:20,hideOnSinglePage:!1,pageSizeOptions:["10","20","30","40"],responsive:!0,showQuickJumper:!0,showLessItems:!0,showTotal:a=>`总共 ${a} 条`},z=`${M.prefixName}-pagination`,I=t.defineComponent({name:"DTable",props:Q(),emits:["update:keys"],setup:function(a,{emit:p,slots:d}){const n=t.ref(a.keys||[]),E=t.computed(()=>a.data),K=t.computed(()=>{var e;return((e=a.config)==null?void 0:e.columns)??[]}),v=t.computed(()=>{var e;return((e=a.config)==null?void 0:e.pagination)??{}}),S=t.ref(a.expandedRowKeys);t.watchEffect(()=>{const{expandedRowKeys:e}=a;S.value=e});const{tableRef:O,tableRootRef:B,tableHeight:V,onPageChange:H,onRowClassName:j}=q();function q(){const{rowClassName:e,keepSelected:l,onPageChange:i}=a.config,f=a.config.selection??"N",r=t.ref(),c=t.ref(null),o=t.ref(),u=t.ref(null),g=s=>{var h,N;try{const m=(h=c==null?void 0:c.value)==null?void 0:h.$el,x=P.useEleHeight(m.getElementsByClassName("ant-table-header")[0]);console.log(m.getElementsByClassName("ant-table-header")[0]),console.log(x);let T=0;if(a.config.pagination){const J=(N=r.value)==null?void 0:N.getElementsByClassName(z)[0];T=P.useEleHeight(J)??0}o.value=s-(x+T),m.getElementsByClassName("ant-table-body")[0].style.height=o.value+"px",u.value=m.getElementsByClassName("ant-table-body")[0]}catch(m){console.warn(m)}};return t.watchEffect(()=>{a.height!==0&&t.nextTick(()=>{setTimeout(()=>{g(a.height)},10)})}),{tableRef:c,tableRootRef:r,tableHeight:o,onPageChange:(s,h)=>{i&&i({page:s,size:h}),u.value.scrollTop=0,(f==="S"||!l)&&(n.value=[],p("update:keys",n.value))},onRowClassName:(s,h)=>e?e(s,h):void 0}}const D=F();function F(){const{rowKey:e,config:{getCheckboxProps:l}}=a;let i=a.config.selection??"N";const f=(o,u)=>{i==="S"?(n.value=[],n.value=u?[o[e]]:[]):n.value=u?n.value.concat(o[e]):n.value.filter(g=>g!==o[e]),p("update:keys",n.value)},r=(o,u,g)=>{const y=g.map(w=>w[e]);n.value=o?n.value.concat(y):n.value.filter(w=>!y.includes(w)),p("update:keys",n.value)};t.watch(()=>a.keys,o=>{n.value=o});const c=t.ref(void 0);return t.watchEffect(()=>{const{selection:o}=a.config;i=o,i!=="N"?c.value={selectedRowKeys:n,onSelect:f,onSelectAll:r,fixed:!0,columnTitle:i==="S"?"选择":null,columnWidth:i==="S"?60:40,getCheckboxProps:l}:c.value=void 0}),c}const U=_();function _(){return e=>{let l;const{rowKey:i,config:{click:f,dbClick:r,selection:c,getCheckboxProps:o}}=a,u=e[i],g=()=>{const y=o===void 0?!1:o(e).disabled;if(c==="N"||y)return;n.value.some(s=>s===u)?n.value=n.value.filter(s=>s!==u):(c==="S"&&(n.value=[]),n.value.push(u)),p("update:keys",n.value)};return{onClick:()=>{clearTimeout(l),l=setTimeout(()=>{g(),f&&f(e)},200)},onDblclick:()=>{clearTimeout(l),r&&r(e)}}}}const R=e=>{e.stopPropagation()},$=t.computed(()=>{const{selection:e}=a.config;return e==="N"}),k={};d.expandedRowRender&&(k.expandedRowRender=e=>t.createVNode(t.Fragment,null,[d.expandedRowRender&&d.expandedRowRender(e)]));const A=()=>t.createVNode(t.Fragment,null,[d.summary&&d.summary()]);return()=>{var e;return t.createVNode("div",{ref:B,style:{height:"100%"}},[t.createVNode(C.Table,{ref:O,"row-key":a.rowKey,bordered:a.config.bordered,columns:K.value,dataSource:E.value,loading:a.loading,size:((e=a.config)==null?void 0:e.size)??"small",scroll:{scrollToFirstRowOnChange:!0,x:"100%",y:V.value+"px"},expandedRowKeys:S.value,"onUpdate:expandedRowKeys":l=>S.value=l,expandRowByClick:$.value,pagination:!1,customRow:U,rowSelection:D.value,rowClassName:j},{bodyCell:({column:l,record:i})=>{if(l.slot==="action")return t.createVNode("div",{onClick:R,onDblclick:R},[t.createVNode(C.Space,null,{default:()=>[d.action&&d.action(i)]})])},...k,summary:A}),t.withDirectives(t.createVNode(C.Pagination,{class:[z],current:v.value.current,"onUpdate:current":l=>v.value.current=l,pageSize:v.value.pageSize,"onUpdate:pageSize":l=>v.value.pageSize=l,disabled:a.loading,"show-size-changer":!0,size:"default","hide-on-single-page":b.hideOnSinglePage,"show-quick-jumper":b.showQuickJumper,"default-page-size":b.defaultPageSize,"page-size-options":b.pageSizeOptions,"show-total":b.showTotal,total:v.value.total,onChange:H},null),[[t.vShow,a.config.pagination]])])}}});exports.default=I;
|
|
@@ -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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as X, ref as r, computed as C, watchEffect as k, nextTick as _, watch as G, createVNode as f, withDirectives as M, vShow as Y, Fragment as
|
|
1
|
+
import { defineComponent as X, ref as r, computed as C, watchEffect as k, nextTick as _, watch as G, createVNode as f, withDirectives as M, vShow as Y, Fragment as K } from "vue";
|
|
2
2
|
import { Table as Z, Space as ee, Pagination as te } from "ant-design-vue";
|
|
3
|
-
import { useEleHeight as
|
|
3
|
+
import { useEleHeight as E } from "../../utils/html.esm.js";
|
|
4
4
|
import { prefixName as ne } from "../theme/index.esm.js";
|
|
5
5
|
const ae = () => ({
|
|
6
6
|
data: {
|
|
@@ -32,7 +32,7 @@ const ae = () => ({
|
|
|
32
32
|
type: Object,
|
|
33
33
|
default: () => []
|
|
34
34
|
}
|
|
35
|
-
}),
|
|
35
|
+
}), p = {
|
|
36
36
|
defaultPageSize: 20,
|
|
37
37
|
hideOnSinglePage: !1,
|
|
38
38
|
pageSizeOptions: ["10", "20", "30", "40"],
|
|
@@ -40,7 +40,7 @@ const ae = () => ({
|
|
|
40
40
|
showQuickJumper: !0,
|
|
41
41
|
showLessItems: !0,
|
|
42
42
|
showTotal: (t) => `总共 ${t} 条`
|
|
43
|
-
},
|
|
43
|
+
}, B = `${ne}-pagination`, ue = /* @__PURE__ */ X({
|
|
44
44
|
name: "DTable",
|
|
45
45
|
props: ae(),
|
|
46
46
|
// emits: { "update:keys": (keys: []) => void }
|
|
@@ -50,10 +50,10 @@ const ae = () => ({
|
|
|
50
50
|
emit: S,
|
|
51
51
|
slots: s
|
|
52
52
|
}) {
|
|
53
|
-
const n = r(t.keys || []), O = C(() => t.data),
|
|
53
|
+
const n = r(t.keys || []), O = C(() => t.data), H = C(() => {
|
|
54
54
|
var e;
|
|
55
55
|
return ((e = t.config) == null ? void 0 : e.columns) ?? [];
|
|
56
|
-
}),
|
|
56
|
+
}), y = C(() => {
|
|
57
57
|
var e;
|
|
58
58
|
return ((e = t.config) == null ? void 0 : e.pagination) ?? {};
|
|
59
59
|
}), R = r(t.expandedRowKeys);
|
|
@@ -64,34 +64,37 @@ const ae = () => ({
|
|
|
64
64
|
R.value = e;
|
|
65
65
|
});
|
|
66
66
|
const {
|
|
67
|
-
tableRef:
|
|
68
|
-
tableRootRef:
|
|
69
|
-
tableHeight:
|
|
70
|
-
onPageChange:
|
|
71
|
-
onRowClassName:
|
|
72
|
-
} =
|
|
73
|
-
function
|
|
67
|
+
tableRef: j,
|
|
68
|
+
tableRootRef: D,
|
|
69
|
+
tableHeight: U,
|
|
70
|
+
onPageChange: $,
|
|
71
|
+
onRowClassName: q
|
|
72
|
+
} = A();
|
|
73
|
+
function A() {
|
|
74
74
|
const {
|
|
75
75
|
rowClassName: e,
|
|
76
76
|
keepSelected: o,
|
|
77
77
|
onPageChange: l
|
|
78
78
|
} = t.config, m = t.config.selection ?? "N", d = r(), i = r(null), a = r(), c = r(null), g = (u) => {
|
|
79
|
-
var h,
|
|
79
|
+
var h, T;
|
|
80
80
|
try {
|
|
81
|
-
const
|
|
82
|
-
|
|
81
|
+
const v = (h = i == null ? void 0 : i.value) == null ? void 0 : h.$el, P = E(v.getElementsByClassName("ant-table-header")[0]);
|
|
82
|
+
console.log(v.getElementsByClassName("ant-table-header")[0]), console.log(P);
|
|
83
|
+
let z = 0;
|
|
83
84
|
if (t.config.pagination) {
|
|
84
|
-
const W = (
|
|
85
|
-
|
|
85
|
+
const W = (T = d.value) == null ? void 0 : T.getElementsByClassName(B)[0];
|
|
86
|
+
z = E(W) ?? 0;
|
|
86
87
|
}
|
|
87
|
-
a.value = u - (
|
|
88
|
-
} catch (
|
|
89
|
-
console.warn(
|
|
88
|
+
a.value = u - (P + z), v.getElementsByClassName("ant-table-body")[0].style.height = a.value + "px", c.value = v.getElementsByClassName("ant-table-body")[0];
|
|
89
|
+
} catch (v) {
|
|
90
|
+
console.warn(v);
|
|
90
91
|
}
|
|
91
92
|
};
|
|
92
93
|
return k(() => {
|
|
93
94
|
t.height !== 0 && _(() => {
|
|
94
|
-
|
|
95
|
+
setTimeout(() => {
|
|
96
|
+
g(t.height);
|
|
97
|
+
}, 10);
|
|
95
98
|
});
|
|
96
99
|
}), {
|
|
97
100
|
tableRef: i,
|
|
@@ -106,8 +109,8 @@ const ae = () => ({
|
|
|
106
109
|
onRowClassName: (u, h) => e ? e(u, h) : void 0
|
|
107
110
|
};
|
|
108
111
|
}
|
|
109
|
-
const
|
|
110
|
-
function
|
|
112
|
+
const F = J();
|
|
113
|
+
function J() {
|
|
111
114
|
const {
|
|
112
115
|
rowKey: e,
|
|
113
116
|
config: {
|
|
@@ -118,8 +121,8 @@ const ae = () => ({
|
|
|
118
121
|
const m = (a, c) => {
|
|
119
122
|
l === "S" ? (n.value = [], n.value = c ? [a[e]] : []) : n.value = c ? n.value.concat(a[e]) : n.value.filter((g) => g !== a[e]), S("update:keys", n.value);
|
|
120
123
|
}, d = (a, c, g) => {
|
|
121
|
-
const
|
|
122
|
-
n.value = a ? n.value.concat(
|
|
124
|
+
const w = g.map((b) => b[e]);
|
|
125
|
+
n.value = a ? n.value.concat(w) : n.value.filter((b) => !w.includes(b)), S("update:keys", n.value);
|
|
123
126
|
};
|
|
124
127
|
G(() => t.keys, (a) => {
|
|
125
128
|
n.value = a;
|
|
@@ -140,8 +143,8 @@ const ae = () => ({
|
|
|
140
143
|
} : i.value = void 0;
|
|
141
144
|
}), i;
|
|
142
145
|
}
|
|
143
|
-
const
|
|
144
|
-
function
|
|
146
|
+
const Q = I();
|
|
147
|
+
function I() {
|
|
145
148
|
return (e) => {
|
|
146
149
|
let o;
|
|
147
150
|
const {
|
|
@@ -153,8 +156,8 @@ const ae = () => ({
|
|
|
153
156
|
getCheckboxProps: a
|
|
154
157
|
}
|
|
155
158
|
} = t, c = e[l], g = () => {
|
|
156
|
-
const
|
|
157
|
-
if (i === "N" ||
|
|
159
|
+
const w = a === void 0 ? !1 : a(e).disabled;
|
|
160
|
+
if (i === "N" || w)
|
|
158
161
|
return;
|
|
159
162
|
n.value.some((u) => u === c) ? n.value = n.value.filter((u) => u !== c) : (i === "S" && (n.value = []), n.value.push(c)), S("update:keys", n.value);
|
|
160
163
|
};
|
|
@@ -182,41 +185,41 @@ const ae = () => ({
|
|
|
182
185
|
}
|
|
183
186
|
const x = (e) => {
|
|
184
187
|
e.stopPropagation();
|
|
185
|
-
},
|
|
188
|
+
}, L = C(() => {
|
|
186
189
|
const {
|
|
187
190
|
selection: e
|
|
188
191
|
} = t.config;
|
|
189
192
|
return e === "N";
|
|
190
193
|
}), N = {};
|
|
191
|
-
s.expandedRowRender && (N.expandedRowRender = (e) => f(
|
|
192
|
-
const
|
|
194
|
+
s.expandedRowRender && (N.expandedRowRender = (e) => f(K, null, [s.expandedRowRender && s.expandedRowRender(e)]));
|
|
195
|
+
const V = () => f(K, null, [s.summary && s.summary()]);
|
|
193
196
|
return () => {
|
|
194
197
|
var e;
|
|
195
198
|
return f("div", {
|
|
196
|
-
ref:
|
|
199
|
+
ref: D,
|
|
197
200
|
style: {
|
|
198
201
|
height: "100%"
|
|
199
202
|
}
|
|
200
203
|
}, [f(Z, {
|
|
201
|
-
ref:
|
|
204
|
+
ref: j,
|
|
202
205
|
"row-key": t.rowKey,
|
|
203
206
|
bordered: t.config.bordered,
|
|
204
|
-
columns:
|
|
207
|
+
columns: H.value,
|
|
205
208
|
dataSource: O.value,
|
|
206
209
|
loading: t.loading,
|
|
207
210
|
size: ((e = t.config) == null ? void 0 : e.size) ?? "small",
|
|
208
211
|
scroll: {
|
|
209
212
|
scrollToFirstRowOnChange: !0,
|
|
210
213
|
x: "100%",
|
|
211
|
-
y:
|
|
214
|
+
y: U.value + "px"
|
|
212
215
|
},
|
|
213
216
|
expandedRowKeys: R.value,
|
|
214
217
|
"onUpdate:expandedRowKeys": (o) => R.value = o,
|
|
215
|
-
expandRowByClick:
|
|
218
|
+
expandRowByClick: L.value,
|
|
216
219
|
pagination: !1,
|
|
217
|
-
customRow:
|
|
218
|
-
rowSelection:
|
|
219
|
-
rowClassName:
|
|
220
|
+
customRow: Q,
|
|
221
|
+
rowSelection: F.value,
|
|
222
|
+
rowClassName: q
|
|
220
223
|
}, {
|
|
221
224
|
bodyCell: ({
|
|
222
225
|
column: o,
|
|
@@ -232,23 +235,23 @@ const ae = () => ({
|
|
|
232
235
|
},
|
|
233
236
|
...N,
|
|
234
237
|
// 总结栏插槽
|
|
235
|
-
summary:
|
|
238
|
+
summary: V
|
|
236
239
|
}), M(f(te, {
|
|
237
|
-
class: [
|
|
238
|
-
current:
|
|
239
|
-
"onUpdate:current": (o) =>
|
|
240
|
-
pageSize:
|
|
241
|
-
"onUpdate:pageSize": (o) =>
|
|
240
|
+
class: [B],
|
|
241
|
+
current: y.value.current,
|
|
242
|
+
"onUpdate:current": (o) => y.value.current = o,
|
|
243
|
+
pageSize: y.value.pageSize,
|
|
244
|
+
"onUpdate:pageSize": (o) => y.value.pageSize = o,
|
|
242
245
|
disabled: t.loading,
|
|
243
246
|
"show-size-changer": !0,
|
|
244
247
|
size: "default",
|
|
245
|
-
"hide-on-single-page":
|
|
246
|
-
"show-quick-jumper":
|
|
247
|
-
"default-page-size":
|
|
248
|
-
"page-size-options":
|
|
249
|
-
"show-total":
|
|
250
|
-
total:
|
|
251
|
-
onChange:
|
|
248
|
+
"hide-on-single-page": p.hideOnSinglePage,
|
|
249
|
+
"show-quick-jumper": p.showQuickJumper,
|
|
250
|
+
"default-page-size": p.defaultPageSize,
|
|
251
|
+
"page-size-options": p.pageSizeOptions,
|
|
252
|
+
"show-total": p.showTotal,
|
|
253
|
+
total: y.value.total,
|
|
254
|
+
onChange: $
|
|
252
255
|
}, null), [[Y, t.config.pagination]])]);
|
|
253
256
|
};
|
|
254
257
|
}
|
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>
|
|
@@ -141,6 +141,8 @@ const DXTable = defineComponent({
|
|
|
141
141
|
const headerHeight = useEleHeight(
|
|
142
142
|
tableEl.getElementsByClassName("ant-table-header")[0]
|
|
143
143
|
);
|
|
144
|
+
console.log(tableEl.getElementsByClassName("ant-table-header")[0]);
|
|
145
|
+
console.log(headerHeight);
|
|
144
146
|
// 获取分页组件高度
|
|
145
147
|
let paginationHeight = 0;
|
|
146
148
|
if (props.config.pagination) {
|
|
@@ -164,7 +166,10 @@ const DXTable = defineComponent({
|
|
|
164
166
|
if (props.height !== 0) {
|
|
165
167
|
nextTick(() => {
|
|
166
168
|
// 必须在组件挂载成功后 执行计算高度 否则无法正确获取元素的高度
|
|
167
|
-
|
|
169
|
+
setTimeout(() => {
|
|
170
|
+
// 如果表格头 有多行的清空下,获取到的头部高度不对,需要延迟执行获取高度方法
|
|
171
|
+
playHeight(props.height);
|
|
172
|
+
}, 10);
|
|
168
173
|
});
|
|
169
174
|
}
|
|
170
175
|
});
|
|
@@ -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
|
-
}>>;
|