@ditari/bsui 1.0.45 → 1.0.47
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/index.cjs.js +1 -1
- package/dist/cjs/components/index.d.ts +1 -1
- package/dist/cjs/components/layout/Breadcrumb.vue.cjs.js +1 -1
- package/dist/cjs/components/layout/NavTabs.vue.cjs.js +1 -1
- package/dist/cjs/components/menu/Menu.cjs.js +1 -1
- package/dist/cjs/store/modules/NavTab.cjs.js +1 -1
- package/dist/css/index.css +1 -1
- package/dist/css/layout/style/breadcrumb.css +1 -1
- package/dist/css/layout/style/index.css +1 -1
- package/dist/css/layout/style/navtab.css +1 -1
- package/dist/esm/components/index.d.ts +1 -1
- package/dist/esm/components/index.esm.js +1 -1
- package/dist/esm/components/layout/Breadcrumb.vue.esm.js +23 -20
- package/dist/esm/components/layout/NavTabs.vue.esm.js +39 -36
- package/dist/esm/components/menu/Menu.esm.js +23 -23
- package/dist/esm/store/modules/NavTab.esm.js +4 -4
- package/dist/style/layout/style/breadcrumb.scss +9 -5
- package/dist/style/layout/style/navtab.scss +18 -4
- package/dist/style/theme/variable.scss +18 -3
- package/package.json +1 -1
- package/src/components/index.ts +2 -2
- package/src/components/layout/Breadcrumb.vue +4 -1
- package/src/components/layout/NavTabs.vue +12 -3
- package/src/components/layout/Show.vue +1 -0
- package/src/components/layout/style/breadcrumb.scss +9 -5
- package/src/components/layout/style/navtab.scss +18 -4
- package/src/components/menu/Menu.jsx +2 -3
- package/src/components/theme/variable.scss +18 -3
- package/src/hooks/route/index.ts +0 -70
- package/src/store/modules/NavTab.ts +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("pinia"),D=require("pinia-plugin-persistedstate"),d=require("./components.cjs.js"),l=require("../directive/trim.cjs.js"),q=require("./table/index.cjs.js"),m=require("./select/index.cjs.js"),x=require("./desensitize/index.cjs.js"),$=require("./dic/index.cjs.js"),S=require("./modal/index.cjs.js"),b=require("./form/index.cjs.js"),r=require("./grid/index.cjs.js"),i=require("./layout/index.cjs.js"),s=d,o=function(e,c){Object.keys(s).forEach(a=>{const n=s[a];n.install&&e.use(n)});const t=u.createPinia();t.use(D.createPersistedState({storage:sessionStorage})),e.use(t),e.directive("trim",l.default),e.provide("menuIcon",c.menuIcon)},f={install:o};exports.DTable=q.DTable;exports.DSelect=m.DSelect;exports.DDesensitize=x.DDesensitize;exports.DicReplace=$.DDicReplace;exports.DModal=S.DModal;exports.DForm=b.default;exports.DGrid=r.DGrid;exports.DGridItem=r.DGridItem;exports.DList=i.DList;exports.DMain=i.DMain;exports.DNavTabs=i.DNavTabs;exports.DShow=i.DShow;exports.default=f;exports.install=o;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("pinia"),D=require("pinia-plugin-persistedstate"),d=require("./components.cjs.js"),l=require("../directive/trim.cjs.js"),q=require("./table/index.cjs.js"),m=require("./select/index.cjs.js"),x=require("./desensitize/index.cjs.js"),$=require("./dic/index.cjs.js"),S=require("./modal/index.cjs.js"),b=require("./form/index.cjs.js"),r=require("./grid/index.cjs.js"),i=require("./layout/index.cjs.js"),s=d,o=function(e,c){Object.keys(s).forEach(a=>{const n=s[a];n.install&&e.use(n)});const t=u.createPinia();t.use(D.createPersistedState({storage:sessionStorage})),e.use(t),e.directive("trim",l.default),e.provide("menuIcon",c.menuIcon||{})},f={install:o};exports.DTable=q.DTable;exports.DSelect=m.DSelect;exports.DDesensitize=x.DDesensitize;exports.DicReplace=$.DDicReplace;exports.DModal=S.DModal;exports.DForm=b.default;exports.DGrid=r.DGrid;exports.DGridItem=r.DGridItem;exports.DList=i.DList;exports.DMain=i.DMain;exports.DNavTabs=i.DNavTabs;exports.DShow=i.DShow;exports.default=f;exports.install=o;
|
|
@@ -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("../../store/modules/Breadcrumb.cjs.js"),s=require("../theme/index.cjs.js"),u={class:"breadcrumb"},d={key:1,class:"breadcrumb-link"},i={name:"DBreadcrumb"},m=e.defineComponent({...i,setup(b){const o=l.useBreadcrumbStore(),r=e.computed(()=>o.getBreadcrumb),n=`${s.prefixName}-breadcrumb`;return(p,_)=>{const c=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n)},[e.createElementVNode("div",u,[e.createVNode(e.TransitionGroup,{name:"breadcrumb"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"breadcrumb-item",key:t.path},[a+1!==e.unref(r).length?(e.openBlock(),e.createBlock(c,{key:0,class:"breadcrumb-link",to:{path:t.path}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:2},1032,["to"])):(e.openBlock(),e.createElementBlock("span",d,e.toDisplayString(t.title),1))]))),128))]),_:1})])])}}});exports.default=m;
|
|
@@ -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"),m=require("vue-router"),N=require("@ant-design/icons-vue"),q=require("pinia"),y=require("../../store/modules/NavTab.cjs.js"),S=require("../../store/modules/KeepAlive.cjs.js"),g=require("../../store/modules/Menu.cjs.js"),T=require("../theme/index.cjs.js"),B=e.createElementVNode("div",{class:"tab-dividers"},null,-1),K={key:0,class:"tab-close"},E={name:"DNavTabs"},V=e.defineComponent({...E,setup(x){const l=m.useRoute(),p=m.useRouter(),c=y.useNavTabsStore(),v=S.useKeepAliveStore(),f=g.useMenuStore(),_=`${T.prefixName}-nav`,n=e.computed(()=>c.getList),{selectedMenuKeys:u}=q.storeToRefs(f),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],v.save(l)}const h=a=>{if(a!==l.path){const t=n.value.filter(s=>s.path===a)[0];p.push({path:t.path,query:t.query,params:t.params})}},b=(a,t)=>{const s=n.value.find(i=>i.fullPath===t);a.stopPropagation(),c.deleteTabs(t),p.push(n.value[n.value.length-1].fullPath),s.name&&v.deleteKeepAlive(s.name)},C=a=>{var t;return(t=a.meta)!=null&&t.keepOpen?!1: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",{class:e.normalizeClass(_)},[e.createVNode(i,{activeKey:r.value,"onUpdate:activeKey":t[0]||(t[0]=o=>r.value=o),type:"card",onTabClick:h},{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(()=>[B,e.createElementVNode("div",{class:e.normalizeClass(["tab-item",{active:r.value===o.path}])},e.toDisplayString(o.meta.title),3),C(o)?(e.openBlock(),e.createElementBlock("div",K,[e.createVNode(e.unref(N.CloseOutlined),{onClick:k=>b(k,o.fullPath)},null,8,["onClick"])])):e.createCommentVNode("",!0)]),_:2},1024))),128))]),_:1},8,["activeKey"])])}}});exports.default=V;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),v=require("vue-router"),h=require("pinia"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),v=require("vue-router"),h=require("pinia"),K=require("../../store/modules/Menu.cjs.js"),U=require("../../store/modules/Settings.cjs.js");function j(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!t.isVNode(o)}const q=t.defineComponent({name:"DMenu",setup(){const o=v.useRouter(),f=v.useRoute(),{componentName:s,prop:g}=t.inject("menuIcon"),N=K.useMenuStore(),{list:a,openMenusKeys:c,selectedMenuKeys:l}=h.storeToRefs(N),S=U.useSettingsStore(),{getCollapsed:m}=h.storeToRefs(S);t.watchEffect(()=>{const e=l.value.length>0?l.value[0]:"",n=i(a.value,e);c.value=n||[]});function i(e,n){for(let r=0;r<e.length;r++){if(e[r].url===n||n.startsWith(e[r].url))return[e[r].url];if(e[r].children&&e[r].children.length>0){const u=i(e[r].children,n);if(u)return[e[r].url,...u]}}return null}const V=({item:e,key:n,keyPath:r})=>{c.value=r,l.value=[n],f.path!==n&&o.push(n).then(u=>u?console.warn(u):null)},M=e=>t.createVNode(t.Fragment,null,[t.createVNode(t.resolveComponent("a-menu-item"),{key:e.url},{icon:()=>d(e),default:()=>e.title})]),y=["anticon","anticon-menu","ant-menu-item-icon"],d=e=>t.createVNode(t.Fragment,null,[e.icon?C(e.icon):t.withDirectives(t.createVNode("div",{className:y},[e.title.substring(0,1)]),[[t.vShow,m.value]])]),C=e=>s==="nativeHtml"?t.createVNode("span",{innerHTML:e},null):t.h(t.resolveComponent(s),{[`${g}`]:e}),p=e=>t.createVNode(t.Fragment,null,[t.createVNode(t.resolveComponent("a-sub-menu"),{key:e.url},{title:()=>e.title,icon:()=>d(e),default:()=>e.children.map(n=>!n.children||n.children.length===0?b(n):p(n))})]),b=e=>t.createVNode(t.Fragment,null,[t.createVNode(t.resolveComponent("a-menu-item"),{key:e.url},{default:()=>e.title})]);return()=>{let e;return t.createVNode(t.Fragment,null,[t.createVNode(t.resolveComponent("a-menu"),{mode:"inline",theme:"dark",openKeys:c.value,"onUpdate:openKeys":n=>c.value=n,selectedKeys:l.value,"onUpdate:selectedKeys":n=>l.value=n,onClick:V},j(e=a.value.map(n=>{var r;return!n.children||((r=n.children)==null?void 0:r.length)===0?M(n):p(n)}))?e:{default:()=>[e]})])}}});exports.default=q;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("pinia"),l=require("../types.cjs.js"),r=a.defineStore(l.NAV_TAB_ID,{state:()=>({list:[],activeKey:""}),getters:{getList:t=>t.list,getActiveKey:t=>t.activeKey},actions:{setActiveKey(t){this.activeKey=t},save(t){if(this.list.some(i=>i.path===t.path))return;const e={path:t.path,fullPath:t.fullPath,query:t.query,params:t.params,meta:t.meta,name:t.name||""};this.list.push(e)},deleteTabs(t){this.list.splice(this.list.findIndex(s=>s.fullPath===t),1)},setNavTitle(t,s){for(let e=0;e<this.list.length;e++)if(this.list[e].fullPath===s){this.list[e].meta.title=t;break}}},persist:!0});exports.useNavTabsStore=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("pinia"),l=require("../types.cjs.js"),r=a.defineStore(l.NAV_TAB_ID,{state:()=>({list:[],activeKey:""}),getters:{getList:t=>t.list,getActiveKey:t=>t.activeKey},actions:{setActiveKey(t){this.activeKey=t},save(t){if(!t.meta.title||this.list.some(i=>i.path===t.path))return;const e={path:t.path,fullPath:t.fullPath,query:t.query,params:t.params,meta:t.meta,name:t.name||""};this.list.push(e)},deleteTabs(t){this.list.splice(this.list.findIndex(s=>s.fullPath===t),1)},setNavTitle(t,s){for(let e=0;e<this.list.length;e++)if(this.list[e].fullPath===s){this.list[e].meta.title=t;break}}},persist:!0});exports.useNavTabsStore=r;
|
package/dist/css/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ditari-bsui-grid{position:relative;display:grid}.ditari-bsui-grid .ditari-bsui-grid--item{border:1px solid #4e4e4e;margin-left:-1px;margin-top:-1px}.ditari-bsui-grid-form .ant-form-item{margin-bottom:0;height:100%}.ditari-bsui-grid-form .ant-form-item .ant-form-item-label{border-right:1px solid #4e4e4e}.ditari-bsui-grid-form .ant-form-item .ant-input,.ditari-bsui-grid-form .ant-form-item .ant-select-selector,.ditari-bsui-grid-form .ant-form-item .ant-input-number{border:0;border-radius:0}.ditari-bsui-grid-form .ant-form-item .ant-input:focus,.ditari-bsui-grid-form .ant-form-item .ant-select-selector:focus,.ditari-bsui-grid-form .ant-form-item .ant-input-number:focus{box-shadow:0 0 0 2px #1890ff}.ditari-bsui-grid-form .ant-form-item .ant-input .ant-input-number-input,.ditari-bsui-grid-form .ant-form-item .ant-select-selector .ant-input-number-input,.ditari-bsui-grid-form .ant-form-item .ant-input-number .ant-input-number-input{border:0;border-radius:0}.ditari-bsui-grid-form .ant-form-item .ant-input .ant-input-number-input:focus,.ditari-bsui-grid-form .ant-form-item .ant-select-selector .ant-input-number-input:focus,.ditari-bsui-grid-form .ant-form-item .ant-input-number .ant-input-number-input:focus{box-shadow:0 0 0 2px #1890ff}.ditari-bsui-grid-form .ant-form-item .ant-input[disabled]{color:#525252}.ditari-bsui-grid-form .ant-form-item-has-error .ant-form-item-explain{display:block}.ditari-bsui-grid-form .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{box-shadow:0 0 0 2px #1890ff}.ditari-bsui-grid-form .ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus{box-shadow:0 0 0px 2px red;border-radius:0}.ditari-bsui-grid-form .ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input{box-shadow:0 0 0px 2px #ff4d4f}.ditari-menu{height:calc(100vh - 240px);overflow:scroll}.ditari-menu::-webkit-scrollbar{width:0 !important;display:none}.ditari-layout-sider{background-color:#162157}.ditari-layout-sider .ant-menu-dark{background-color:#162157}.ditari-layout-sider .ant-menu-dark .ant-menu-inline.ant-menu-sub{background-color:#101847}.ditari-breadcrumb .ant-breadcrumb-separator{display:none}.ditari-breadcrumb .breadcrumb{display:flex}.ditari-breadcrumb .breadcrumb .breadcrumb-item:first-child .breadcrumb-link{border-radius:6px 0 0 6px;clip-path:polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%)}.ditari-breadcrumb .breadcrumb .breadcrumb-item:last-child:not(:
|
|
1
|
+
.ditari-bsui-grid{position:relative;display:grid}.ditari-bsui-grid .ditari-bsui-grid--item{border:1px solid #4e4e4e;margin-left:-1px;margin-top:-1px}.ditari-bsui-grid-form .ant-form-item{margin-bottom:0;height:100%}.ditari-bsui-grid-form .ant-form-item .ant-form-item-label{border-right:1px solid #4e4e4e}.ditari-bsui-grid-form .ant-form-item .ant-input,.ditari-bsui-grid-form .ant-form-item .ant-select-selector,.ditari-bsui-grid-form .ant-form-item .ant-input-number{border:0;border-radius:0}.ditari-bsui-grid-form .ant-form-item .ant-input:focus,.ditari-bsui-grid-form .ant-form-item .ant-select-selector:focus,.ditari-bsui-grid-form .ant-form-item .ant-input-number:focus{box-shadow:0 0 0 2px #1890ff}.ditari-bsui-grid-form .ant-form-item .ant-input .ant-input-number-input,.ditari-bsui-grid-form .ant-form-item .ant-select-selector .ant-input-number-input,.ditari-bsui-grid-form .ant-form-item .ant-input-number .ant-input-number-input{border:0;border-radius:0}.ditari-bsui-grid-form .ant-form-item .ant-input .ant-input-number-input:focus,.ditari-bsui-grid-form .ant-form-item .ant-select-selector .ant-input-number-input:focus,.ditari-bsui-grid-form .ant-form-item .ant-input-number .ant-input-number-input:focus{box-shadow:0 0 0 2px #1890ff}.ditari-bsui-grid-form .ant-form-item .ant-input[disabled]{color:#525252}.ditari-bsui-grid-form .ant-form-item-has-error .ant-form-item-explain{display:block}.ditari-bsui-grid-form .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{box-shadow:0 0 0 2px #1890ff}.ditari-bsui-grid-form .ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus{box-shadow:0 0 0px 2px red;border-radius:0}.ditari-bsui-grid-form .ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input{box-shadow:0 0 0px 2px #ff4d4f}.ditari-menu{height:calc(100vh - 240px);overflow:scroll}.ditari-menu::-webkit-scrollbar{width:0 !important;display:none}.ditari-layout-sider{background-color:#162157}.ditari-layout-sider .ant-menu-dark{background-color:#162157}.ditari-layout-sider .ant-menu-dark .ant-menu-inline.ant-menu-sub{background-color:#101847}.ditari-bsui-breadcrumb .ant-breadcrumb-separator{display:none}.ditari-bsui-breadcrumb .breadcrumb{display:flex}.ditari-bsui-breadcrumb .breadcrumb .breadcrumb-item{color:#333}.ditari-bsui-breadcrumb .breadcrumb .breadcrumb-item:first-child .breadcrumb-link{border-radius:6px 0 0 6px;clip-path:polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%)}.ditari-bsui-breadcrumb .breadcrumb .breadcrumb-item:last-child:not(:first-child) .breadcrumb-link{border-radius:0 6px 6px 0;clip-path:polygon(0 0, 100% 0, 100% 100%, 0 100%, 8px 50%)}.ditari-bsui-breadcrumb .breadcrumb-link{display:block;padding:4px 12px;background:#f0f2f5;clip-path:polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%)}.ditari-bsui-breadcrumb a.breadcrumb-link{color:#2589ff}.breadcrumb-enter-active{transition:all .25s}.breadcrumb-enter-from,.breadcrumb-leave-active{opacity:0;transform:translateX(30px) skewX(-50deg)}.ditari-list-layout{padding:20px;height:100%}.ditari-list-layout .wrapper{display:flex;flex-direction:column}.ditari-list-layout .ditari-list-table{flex:1}.ditari-list-layout .ditari-list-table .ant-card-body{display:flex;flex-direction:column;height:100%}.ditari-list-layout .ditari-list-form .ant-card-body{padding-bottom:0}.ditari-list-layout .wrapper{height:100%}.ditari-ant-back-top{right:4px;bottom:120px}.ditari-layout{height:100%}.ditari-layout .ditari-layout-sider{position:fixed;left:0;top:0;bottom:0;z-index:1}.ditari-layout .ditari-top-layout{position:fixed;left:200px;right:0;z-index:210}.ditari-layout .ditari-layout-content{margin-left:200px;margin-top:84px}.fade-enter-active,.fade-leave-active{transition:opacity .1s ease}.fade-enter-from,.fade-leave-to{opacity:0}.main-enter-active{transition:.2s}.main-leave-active{transition:.15s}.main-enter-from{opacity:0;margin-left:-20px}.main-leave-to{opacity:0;margin-left:20px}.ditari-layout-header{display:flex;justify-content:space-between;align-items:center;padding:0 15px;height:42px;border-bottom:1px solid #f0f2f5;background-color:#fff}.ditari-layout-header .ditari-layout-header-left{display:flex;justify-content:center}.ditari-layout-header .ditari-layout-header-left .ditari-side-collapsed{margin-right:20px;cursor:pointer;width:42px;line-height:30px;text-align:center;transition-duration:.2s}.ditari-layout-header .ditari-layout-header-left .ditari-side-collapsed:hover{background-color:#f0f2f5;border-radius:4px}.ditari-layout-header .ditari-layout-header-left .ditari-side-collapsed .icon{transition-duration:.2s}.ditari-user-menu{display:flex;align-items:center;height:100%}.ditari-user-menu .ditari-operation-items{margin-left:10px;height:100%}.ditari-user-menu .ditari-operation-items .ant-dropdown-link{display:flex;align-items:center;justify-content:center;height:100%}.collapsed-animation{transform:rotate(-180deg)}.ditari-bsui-nav{display:flex;background:linear-gradient(270deg, #019cfe 0%, #0165fe 100%)}.ditari-bsui-nav .ant-tabs-nav{margin:0}.ditari-bsui-nav .ant-tabs-content-holder{display:none}.ditari-bsui-nav .ant-tabs-tab{position:relative;margin-left:0 !important;border:0 !important;transition:none !important;border-radius:10px 10px 0 0 !important;color:#fff}.ditari-bsui-nav .ant-tabs-tab:first-child .tab-dividers::before,.ditari-bsui-nav .ant-tabs-tab.ant-tabs-tab-active .tab-dividers::before{opacity:0}.ditari-bsui-nav .ant-tabs-tab.ant-tabs-tab-active .tab-item{color:#0065b3}.ditari-bsui-nav .ant-tabs-tab:not(.ant-tabs-tab-active){background:rgba(0,0,0,0)}.ditari-bsui-nav .ant-tabs-tab:hover:not(.ant-tabs-tab-active){background:#065de1}.ditari-bsui-nav .ant-tabs-tab:hover:not(.ant-tabs-tab-active) .tab-dividers::before{opacity:0}.ditari-bsui-nav .ant-tabs-tab:hover:not(.ant-tabs-tab-active)+.ant-tabs-tab .tab-dividers::before{opacity:0}.ditari-bsui-nav .ant-tabs-tab .ant-tabs-tab-btn{display:flex;align-items:center}.ditari-bsui-nav .ant-tabs-tab .tab-close{padding:4px;margin-left:10px;display:flex;align-items:center;justify-content:center;border-radius:50%}.ditari-bsui-nav .ant-tabs-tab .tab-close:hover{background-color:#63aeff;color:#fff}.ditari-bsui-nav .ant-tabs-tab .tab-close .anticon{margin:0}.ditari-bsui-nav .ant-tabs-tab-active+.ant-tabs-tab .tab-dividers::before{opacity:0}.ditari-bsui-nav .ant-tabs-nav-wrap{padding:4px 8px 0}.ditari-bsui-nav .ant-tabs-nav::before{border-bottom-width:0}.ditari-bsui-nav .ant-tabs-tab::before,.ditari-bsui-nav .ant-tabs-tab::after{position:absolute;bottom:0;content:"";width:20px;height:20px;border-radius:100%;box-shadow:0 0 0 40px rgba(0,0,0,0)}.ditari-bsui-nav .ant-tabs-tab::before{left:-20px;clip-path:inset(50% -10px 0 50%)}.ditari-bsui-nav .ant-tabs-tab::after{right:-20px;clip-path:inset(50% 50% 0 -10px)}.ditari-bsui-nav .ant-tabs-tab:hover::before,.ditari-bsui-nav .ant-tabs-tab:hover::after{box-shadow:0 0 0 30px #065de1}.ditari-bsui-nav .ant-tabs-tab.ant-tabs-tab-active::before,.ditari-bsui-nav .ant-tabs-tab.ant-tabs-tab-active::after{z-index:10;box-shadow:0 0 0 30px #fff}.ditari-bsui-nav .tab-dividers{position:absolute;z-index:0;height:14px;top:50%;left:0;margin-top:-7px}.ditari-bsui-nav .tab-dividers::before{content:"";display:block;position:absolute;top:0;left:1px;bottom:0;width:1px;opacity:1;background-color:#fff;transition:opacity .2s ease,background-color .3s}.ditari-show-layout{position:relative}.ditari-show-layout .ant-card{margin-bottom:10px}.ditari-show-layout .ant-card .ant-card-head{padding:10px 24px}.ditari-show-layout .ant-card .ant-card-head .ant-card-head-title{padding:0}.ditari-show-layout .ant-card:last-child{margin-bottom:0}.ditari-show-layout .ditari-page-header{position:sticky;top:84px;z-index:10;padding:4px 24px;transition:all .3s}.ditari-show-layout .ditari-page-header.active{box-shadow:7px 12px 20px 0 #e0e0e0}.ditari-show-layout .ditari-show-footer{position:fixed;right:0;bottom:0;left:200px;z-index:10;padding:10px;background:#fff;box-shadow:4px -2px 5px 3px #e0e0e0}.ditari-bsui-pagination{margin-top:24px;text-align:center}.ant-table.ant-table-bordered>.ant-table-container{border-bottom:1px solid #f0f0f0}.ditari-bsui-desensitize .value{padding:0 4px}.ditari-bsui-modal .ant-modal-body{padding:0}.ditari-bsui-modal .ditari-bsui-modal-content{max-height:200px;overflow-y:scroll}.ditari-bsui-modal .ditari-bsui-modal-content::-webkit-scrollbar{width:0 !important;display:none}.ant-table.ant-table-bordered>.ant-table-container{border-bottom:1px solid #f0f0f0}@media screen and (min-width: 320px){.modal{font-size:12px}}@media screen and (min-width: 640px){.modal{font-size:14px}}@media screen and (min-width: 1024px){.modal{font-size:16px}}@media screen and (min-width: 1440px){.modal{font-size:18px}}@media screen and (max-width: 640px){.modal-sm{width:100%;height:100%;min-width:240px;min-height:160px}}@media screen and (min-width: 640px)and (max-width: 1024px){.modal-md{margin:100px auto;max-width:600px;max-height:480px}}@media screen and (min-width: 1024px)and (max-width: 1440px){.modal-lg{margin:100px auto;max-width:800px;max-height:600px}}@media screen and (min-width: 1440px){.modal-xl{margin:100px auto}}html,body,#app{height:100%;background:#f0f2f5}html::-webkit-scrollbar,body::-webkit-scrollbar,#app::-webkit-scrollbar{width:0 !important;display:none}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ditari-breadcrumb .ant-breadcrumb-separator{display:none}.ditari-breadcrumb .breadcrumb{display:flex}.ditari-breadcrumb .breadcrumb .breadcrumb-item:first-child .breadcrumb-link{border-radius:6px 0 0 6px;clip-path:polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%)}.ditari-breadcrumb .breadcrumb .breadcrumb-item:last-child:not(:
|
|
1
|
+
.ditari-bsui-breadcrumb .ant-breadcrumb-separator{display:none}.ditari-bsui-breadcrumb .breadcrumb{display:flex}.ditari-bsui-breadcrumb .breadcrumb .breadcrumb-item{color:#333}.ditari-bsui-breadcrumb .breadcrumb .breadcrumb-item:first-child .breadcrumb-link{border-radius:6px 0 0 6px;clip-path:polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%)}.ditari-bsui-breadcrumb .breadcrumb .breadcrumb-item:last-child:not(:first-child) .breadcrumb-link{border-radius:0 6px 6px 0;clip-path:polygon(0 0, 100% 0, 100% 100%, 0 100%, 8px 50%)}.ditari-bsui-breadcrumb .breadcrumb-link{display:block;padding:4px 12px;background:#f0f2f5;clip-path:polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%)}.ditari-bsui-breadcrumb a.breadcrumb-link{color:#2589ff}.breadcrumb-enter-active{transition:all .25s}.breadcrumb-enter-from,.breadcrumb-leave-active{opacity:0;transform:translateX(30px) skewX(-50deg)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ditari-breadcrumb .ant-breadcrumb-separator{display:none}.ditari-breadcrumb .breadcrumb{display:flex}.ditari-breadcrumb .breadcrumb .breadcrumb-item:first-child .breadcrumb-link{border-radius:6px 0 0 6px;clip-path:polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%)}.ditari-breadcrumb .breadcrumb .breadcrumb-item:last-child:not(:
|
|
1
|
+
.ditari-bsui-breadcrumb .ant-breadcrumb-separator{display:none}.ditari-bsui-breadcrumb .breadcrumb{display:flex}.ditari-bsui-breadcrumb .breadcrumb .breadcrumb-item{color:#333}.ditari-bsui-breadcrumb .breadcrumb .breadcrumb-item:first-child .breadcrumb-link{border-radius:6px 0 0 6px;clip-path:polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%)}.ditari-bsui-breadcrumb .breadcrumb .breadcrumb-item:last-child:not(:first-child) .breadcrumb-link{border-radius:0 6px 6px 0;clip-path:polygon(0 0, 100% 0, 100% 100%, 0 100%, 8px 50%)}.ditari-bsui-breadcrumb .breadcrumb-link{display:block;padding:4px 12px;background:#f0f2f5;clip-path:polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%)}.ditari-bsui-breadcrumb a.breadcrumb-link{color:#2589ff}.breadcrumb-enter-active{transition:all .25s}.breadcrumb-enter-from,.breadcrumb-leave-active{opacity:0;transform:translateX(30px) skewX(-50deg)}.ditari-list-layout{padding:20px;height:100%}.ditari-list-layout .wrapper{display:flex;flex-direction:column}.ditari-list-layout .ditari-list-table{flex:1}.ditari-list-layout .ditari-list-table .ant-card-body{display:flex;flex-direction:column;height:100%}.ditari-list-layout .ditari-list-form .ant-card-body{padding-bottom:0}.ditari-list-layout .wrapper{height:100%}.ditari-ant-back-top{right:4px;bottom:120px}.ditari-layout{height:100%}.ditari-layout .ditari-layout-sider{position:fixed;left:0;top:0;bottom:0;z-index:1}.ditari-layout .ditari-top-layout{position:fixed;left:200px;right:0;z-index:210}.ditari-layout .ditari-layout-content{margin-left:200px;margin-top:84px}.fade-enter-active,.fade-leave-active{transition:opacity .1s ease}.fade-enter-from,.fade-leave-to{opacity:0}.main-enter-active{transition:.2s}.main-leave-active{transition:.15s}.main-enter-from{opacity:0;margin-left:-20px}.main-leave-to{opacity:0;margin-left:20px}.ditari-layout-header{display:flex;justify-content:space-between;align-items:center;padding:0 15px;height:42px;border-bottom:1px solid #f0f2f5;background-color:#fff}.ditari-layout-header .ditari-layout-header-left{display:flex;justify-content:center}.ditari-layout-header .ditari-layout-header-left .ditari-side-collapsed{margin-right:20px;cursor:pointer;width:42px;line-height:30px;text-align:center;transition-duration:.2s}.ditari-layout-header .ditari-layout-header-left .ditari-side-collapsed:hover{background-color:#f0f2f5;border-radius:4px}.ditari-layout-header .ditari-layout-header-left .ditari-side-collapsed .icon{transition-duration:.2s}.ditari-user-menu{display:flex;align-items:center;height:100%}.ditari-user-menu .ditari-operation-items{margin-left:10px;height:100%}.ditari-user-menu .ditari-operation-items .ant-dropdown-link{display:flex;align-items:center;justify-content:center;height:100%}.collapsed-animation{transform:rotate(-180deg)}.ditari-bsui-nav{display:flex;background:linear-gradient(270deg, #019cfe 0%, #0165fe 100%)}.ditari-bsui-nav .ant-tabs-nav{margin:0}.ditari-bsui-nav .ant-tabs-content-holder{display:none}.ditari-bsui-nav .ant-tabs-tab{position:relative;margin-left:0 !important;border:0 !important;transition:none !important;border-radius:10px 10px 0 0 !important;color:#fff}.ditari-bsui-nav .ant-tabs-tab:first-child .tab-dividers::before,.ditari-bsui-nav .ant-tabs-tab.ant-tabs-tab-active .tab-dividers::before{opacity:0}.ditari-bsui-nav .ant-tabs-tab.ant-tabs-tab-active .tab-item{color:#0065b3}.ditari-bsui-nav .ant-tabs-tab:not(.ant-tabs-tab-active){background:rgba(0,0,0,0)}.ditari-bsui-nav .ant-tabs-tab:hover:not(.ant-tabs-tab-active){background:#065de1}.ditari-bsui-nav .ant-tabs-tab:hover:not(.ant-tabs-tab-active) .tab-dividers::before{opacity:0}.ditari-bsui-nav .ant-tabs-tab:hover:not(.ant-tabs-tab-active)+.ant-tabs-tab .tab-dividers::before{opacity:0}.ditari-bsui-nav .ant-tabs-tab .ant-tabs-tab-btn{display:flex;align-items:center}.ditari-bsui-nav .ant-tabs-tab .tab-close{padding:4px;margin-left:10px;display:flex;align-items:center;justify-content:center;border-radius:50%}.ditari-bsui-nav .ant-tabs-tab .tab-close:hover{background-color:#63aeff;color:#fff}.ditari-bsui-nav .ant-tabs-tab .tab-close .anticon{margin:0}.ditari-bsui-nav .ant-tabs-tab-active+.ant-tabs-tab .tab-dividers::before{opacity:0}.ditari-bsui-nav .ant-tabs-nav-wrap{padding:4px 8px 0}.ditari-bsui-nav .ant-tabs-nav::before{border-bottom-width:0}.ditari-bsui-nav .ant-tabs-tab::before,.ditari-bsui-nav .ant-tabs-tab::after{position:absolute;bottom:0;content:"";width:20px;height:20px;border-radius:100%;box-shadow:0 0 0 40px rgba(0,0,0,0)}.ditari-bsui-nav .ant-tabs-tab::before{left:-20px;clip-path:inset(50% -10px 0 50%)}.ditari-bsui-nav .ant-tabs-tab::after{right:-20px;clip-path:inset(50% 50% 0 -10px)}.ditari-bsui-nav .ant-tabs-tab:hover::before,.ditari-bsui-nav .ant-tabs-tab:hover::after{box-shadow:0 0 0 30px #065de1}.ditari-bsui-nav .ant-tabs-tab.ant-tabs-tab-active::before,.ditari-bsui-nav .ant-tabs-tab.ant-tabs-tab-active::after{z-index:10;box-shadow:0 0 0 30px #fff}.ditari-bsui-nav .tab-dividers{position:absolute;z-index:0;height:14px;top:50%;left:0;margin-top:-7px}.ditari-bsui-nav .tab-dividers::before{content:"";display:block;position:absolute;top:0;left:1px;bottom:0;width:1px;opacity:1;background-color:#fff;transition:opacity .2s ease,background-color .3s}.ditari-show-layout{position:relative}.ditari-show-layout .ant-card{margin-bottom:10px}.ditari-show-layout .ant-card .ant-card-head{padding:10px 24px}.ditari-show-layout .ant-card .ant-card-head .ant-card-head-title{padding:0}.ditari-show-layout .ant-card:last-child{margin-bottom:0}.ditari-show-layout .ditari-page-header{position:sticky;top:84px;z-index:10;padding:4px 24px;transition:all .3s}.ditari-show-layout .ditari-page-header.active{box-shadow:7px 12px 20px 0 #e0e0e0}.ditari-show-layout .ditari-show-footer{position:fixed;right:0;bottom:0;left:200px;z-index:10;padding:10px;background:#fff;box-shadow:4px -2px 5px 3px #e0e0e0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ditari-nav{background:linear-gradient(270deg, #019cfe 0%, #0165fe 100%)}.ditari-nav .ant-tabs-nav{margin:0}.ditari-nav .ant-tabs-content-holder{display:none}.ditari-nav .ant-tabs-tab{position:relative;margin-left:0 !important;border:0 !important;transition:none !important;border-radius:10px 10px 0 0 !important;color:#fff}.ditari-nav .ant-tabs-tab:first-child .tab-dividers::before,.ditari-nav .ant-tabs-tab.ant-tabs-tab-active .tab-dividers::before{opacity:0}.ditari-nav .ant-tabs-tab:not(.ant-tabs-tab-active){background:rgba(0,0,0,0)}.ditari-nav .ant-tabs-tab:hover:not(.ant-tabs-tab-active){background:#065de1}.ditari-nav .ant-tabs-tab:hover:not(.ant-tabs-tab-active) .tab-dividers::before{opacity:0}.ditari-nav .ant-tabs-tab:hover:not(.ant-tabs-tab-active)+.ant-tabs-tab .tab-dividers::before{opacity:0}.ditari-nav .ant-tabs-tab .ant-tabs-tab-btn{display:flex;align-items:center}.ditari-nav .ant-tabs-tab .tab-close{padding:4px;margin-left:10px;display:flex;align-items:center;justify-content:center;border-radius:50%}.ditari-nav .ant-tabs-tab .tab-close:hover{background-color:#63aeff;color:#fff}.ditari-nav .ant-tabs-tab .tab-close .anticon{margin:0}.ditari-nav .ant-tabs-tab-active+.ant-tabs-tab .tab-dividers::before{opacity:0}.ditari-nav .ant-tabs-nav-wrap{padding:4px 8px 0}.ditari-nav .ant-tabs-tab::before,.ditari-nav .ant-tabs-tab::after{position:absolute;bottom:0;content:"";width:20px;height:20px;border-radius:100%;box-shadow:0 0 0 40px rgba(0,0,0,0)}.ditari-nav .ant-tabs-tab::before{left:-20px;clip-path:inset(50% -10px 0 50%)}.ditari-nav .ant-tabs-tab::after{right:-20px;clip-path:inset(50% 50% 0 -10px)}.ditari-nav .ant-tabs-tab:hover::before,.ditari-nav .ant-tabs-tab:hover::after{box-shadow:0 0 0 30px #065de1}.ditari-nav .ant-tabs-tab.ant-tabs-tab-active::before,.ditari-nav .ant-tabs-tab.ant-tabs-tab-active::after{z-index:10;box-shadow:0 0 0 30px #fff}.ditari-nav .tab-dividers{position:absolute;z-index:0;height:14px;top:50%;left:0;margin-top:-7px}.ditari-nav .tab-dividers::before{content:"";display:block;position:absolute;top:0;left:1px;bottom:0;width:1px;opacity:1;background-color:#fff;transition:opacity .2s ease,background-color .3s}
|
|
1
|
+
.ditari-bsui-nav{display:flex;background:linear-gradient(270deg, #019cfe 0%, #0165fe 100%)}.ditari-bsui-nav .ant-tabs-nav{margin:0}.ditari-bsui-nav .ant-tabs-content-holder{display:none}.ditari-bsui-nav .ant-tabs-tab{position:relative;margin-left:0 !important;border:0 !important;transition:none !important;border-radius:10px 10px 0 0 !important;color:#fff}.ditari-bsui-nav .ant-tabs-tab:first-child .tab-dividers::before,.ditari-bsui-nav .ant-tabs-tab.ant-tabs-tab-active .tab-dividers::before{opacity:0}.ditari-bsui-nav .ant-tabs-tab.ant-tabs-tab-active .tab-item{color:#0065b3}.ditari-bsui-nav .ant-tabs-tab:not(.ant-tabs-tab-active){background:rgba(0,0,0,0)}.ditari-bsui-nav .ant-tabs-tab:hover:not(.ant-tabs-tab-active){background:#065de1}.ditari-bsui-nav .ant-tabs-tab:hover:not(.ant-tabs-tab-active) .tab-dividers::before{opacity:0}.ditari-bsui-nav .ant-tabs-tab:hover:not(.ant-tabs-tab-active)+.ant-tabs-tab .tab-dividers::before{opacity:0}.ditari-bsui-nav .ant-tabs-tab .ant-tabs-tab-btn{display:flex;align-items:center}.ditari-bsui-nav .ant-tabs-tab .tab-close{padding:4px;margin-left:10px;display:flex;align-items:center;justify-content:center;border-radius:50%}.ditari-bsui-nav .ant-tabs-tab .tab-close:hover{background-color:#63aeff;color:#fff}.ditari-bsui-nav .ant-tabs-tab .tab-close .anticon{margin:0}.ditari-bsui-nav .ant-tabs-tab-active+.ant-tabs-tab .tab-dividers::before{opacity:0}.ditari-bsui-nav .ant-tabs-nav-wrap{padding:4px 8px 0}.ditari-bsui-nav .ant-tabs-nav::before{border-bottom-width:0}.ditari-bsui-nav .ant-tabs-tab::before,.ditari-bsui-nav .ant-tabs-tab::after{position:absolute;bottom:0;content:"";width:20px;height:20px;border-radius:100%;box-shadow:0 0 0 40px rgba(0,0,0,0)}.ditari-bsui-nav .ant-tabs-tab::before{left:-20px;clip-path:inset(50% -10px 0 50%)}.ditari-bsui-nav .ant-tabs-tab::after{right:-20px;clip-path:inset(50% 50% 0 -10px)}.ditari-bsui-nav .ant-tabs-tab:hover::before,.ditari-bsui-nav .ant-tabs-tab:hover::after{box-shadow:0 0 0 30px #065de1}.ditari-bsui-nav .ant-tabs-tab.ant-tabs-tab-active::before,.ditari-bsui-nav .ant-tabs-tab.ant-tabs-tab-active::after{z-index:10;box-shadow:0 0 0 30px #fff}.ditari-bsui-nav .tab-dividers{position:absolute;z-index:0;height:14px;top:50%;left:0;margin-top:-7px}.ditari-bsui-nav .tab-dividers::before{content:"";display:block;position:absolute;top:0;left:1px;bottom:0;width:1px;opacity:1;background-color:#fff;transition:opacity .2s ease,background-color .3s}
|
|
@@ -20,7 +20,7 @@ const r = c, f = function(e, i) {
|
|
|
20
20
|
n({
|
|
21
21
|
storage: sessionStorage
|
|
22
22
|
})
|
|
23
|
-
), e.use(o), e.directive("trim", a), e.provide("menuIcon", i.menuIcon);
|
|
23
|
+
), e.use(o), e.directive("trim", a), e.provide("menuIcon", i.menuIcon || {});
|
|
24
24
|
}, x = {
|
|
25
25
|
install: f
|
|
26
26
|
};
|
|
@@ -1,34 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useBreadcrumbStore as
|
|
3
|
-
|
|
1
|
+
import { defineComponent as d, computed as i, resolveComponent as p, openBlock as e, createElementBlock as t, normalizeClass as _, createElementVNode as b, createVNode as f, TransitionGroup as k, withCtx as a, Fragment as h, renderList as B, unref as n, createBlock as C, createTextVNode as x, toDisplayString as s } from "vue";
|
|
2
|
+
import { useBreadcrumbStore as N } from "../../store/modules/Breadcrumb.esm.js";
|
|
3
|
+
import { prefixName as g } from "../theme/index.esm.js";
|
|
4
|
+
const v = { class: "breadcrumb" }, y = {
|
|
4
5
|
key: 1,
|
|
5
6
|
class: "breadcrumb-link"
|
|
6
|
-
},
|
|
7
|
+
}, V = {
|
|
7
8
|
name: "DBreadcrumb"
|
|
8
|
-
},
|
|
9
|
-
...
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
return (
|
|
13
|
-
const
|
|
14
|
-
return e(),
|
|
15
|
-
_(
|
|
16
|
-
|
|
9
|
+
}, F = /* @__PURE__ */ d({
|
|
10
|
+
...V,
|
|
11
|
+
setup(D) {
|
|
12
|
+
const c = N(), o = i(() => c.getBreadcrumb), l = `${g}-breadcrumb`;
|
|
13
|
+
return (E, S) => {
|
|
14
|
+
const m = p("router-link");
|
|
15
|
+
return e(), t("div", {
|
|
16
|
+
class: _(l)
|
|
17
|
+
}, [
|
|
18
|
+
b("div", v, [
|
|
19
|
+
f(k, { name: "breadcrumb" }, {
|
|
17
20
|
default: a(() => [
|
|
18
|
-
(e(!0),
|
|
21
|
+
(e(!0), t(h, null, B(n(o), (r, u) => (e(), t("div", {
|
|
19
22
|
class: "breadcrumb-item",
|
|
20
|
-
key:
|
|
23
|
+
key: r.path
|
|
21
24
|
}, [
|
|
22
|
-
u + 1 !== n(o).length ? (e(),
|
|
25
|
+
u + 1 !== n(o).length ? (e(), C(m, {
|
|
23
26
|
key: 0,
|
|
24
27
|
class: "breadcrumb-link",
|
|
25
|
-
to: { path:
|
|
28
|
+
to: { path: r.path }
|
|
26
29
|
}, {
|
|
27
30
|
default: a(() => [
|
|
28
|
-
|
|
31
|
+
x(s(r.title), 1)
|
|
29
32
|
]),
|
|
30
33
|
_: 2
|
|
31
|
-
}, 1032, ["to"])) : (e(),
|
|
34
|
+
}, 1032, ["to"])) : (e(), t("span", y, s(r.title), 1))
|
|
32
35
|
]))), 128))
|
|
33
36
|
]),
|
|
34
37
|
_: 1
|
|
@@ -39,5 +42,5 @@ const v = { class: "ditari-breadcrumb" }, x = { class: "breadcrumb" }, y = {
|
|
|
39
42
|
}
|
|
40
43
|
});
|
|
41
44
|
export {
|
|
42
|
-
|
|
45
|
+
F as default
|
|
43
46
|
};
|
|
@@ -1,69 +1,72 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
import { CloseOutlined as
|
|
4
|
-
import { storeToRefs as
|
|
5
|
-
import { useNavTabsStore as
|
|
6
|
-
import { useKeepAliveStore as
|
|
7
|
-
import { useMenuStore as
|
|
8
|
-
|
|
1
|
+
import { defineComponent as x, computed as P, ref as w, watchEffect as A, watch as B, resolveComponent as d, openBlock as l, createElementBlock as p, normalizeClass as _, createVNode as h, withCtx as b, Fragment as E, renderList as R, unref as C, createBlock as V, createElementVNode as k, toDisplayString as q, createCommentVNode as D } from "vue";
|
|
2
|
+
import { useRoute as L, useRouter as M } from "vue-router";
|
|
3
|
+
import { CloseOutlined as O } from "@ant-design/icons-vue";
|
|
4
|
+
import { storeToRefs as z } from "pinia";
|
|
5
|
+
import { useNavTabsStore as F } from "../../store/modules/NavTab.esm.js";
|
|
6
|
+
import { useKeepAliveStore as U } from "../../store/modules/KeepAlive.esm.js";
|
|
7
|
+
import { useMenuStore as $ } from "../../store/modules/Menu.esm.js";
|
|
8
|
+
import { prefixName as j } from "../theme/index.esm.js";
|
|
9
|
+
const G = /* @__PURE__ */ k("div", { class: "tab-dividers" }, null, -1), H = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "tab-close"
|
|
11
12
|
}, I = {
|
|
12
13
|
name: "DNavTabs"
|
|
13
|
-
},
|
|
14
|
+
}, oe = /* @__PURE__ */ x({
|
|
14
15
|
...I,
|
|
15
16
|
setup(J) {
|
|
16
|
-
const n =
|
|
17
|
-
|
|
17
|
+
const n = L(), m = M(), c = F(), v = U(), y = $(), N = `${j}-nav`, o = P(() => c.getList), { selectedMenuKeys: u } = z(y), r = w("");
|
|
18
|
+
A(() => {
|
|
18
19
|
r.value = u.value.length > 0 ? u.value[0] : "";
|
|
19
|
-
}),
|
|
20
|
+
}), f(), B(
|
|
20
21
|
() => n.path,
|
|
21
22
|
() => {
|
|
22
|
-
|
|
23
|
+
f();
|
|
23
24
|
}
|
|
24
25
|
);
|
|
25
|
-
function
|
|
26
|
-
c.save(n), u.value = [n.path],
|
|
26
|
+
function f() {
|
|
27
|
+
c.save(n), u.value = [n.path], v.save(n);
|
|
27
28
|
}
|
|
28
|
-
const
|
|
29
|
+
const S = (t) => {
|
|
29
30
|
if (t !== n.path) {
|
|
30
31
|
const e = o.value.filter((s) => s.path === t)[0];
|
|
31
|
-
|
|
32
|
+
m.push({
|
|
32
33
|
path: e.path,
|
|
33
34
|
query: e.query,
|
|
34
35
|
params: e.params
|
|
35
36
|
});
|
|
36
37
|
}
|
|
37
|
-
},
|
|
38
|
+
}, g = (t, e) => {
|
|
38
39
|
const s = o.value.find((i) => i.fullPath === e);
|
|
39
|
-
t.stopPropagation(), c.deleteTabs(e),
|
|
40
|
-
},
|
|
40
|
+
t.stopPropagation(), c.deleteTabs(e), m.push(o.value[o.value.length - 1].fullPath), s.name && v.deleteKeepAlive(s.name);
|
|
41
|
+
}, K = (t) => {
|
|
41
42
|
var e;
|
|
42
|
-
return
|
|
43
|
+
return (e = t.meta) != null && e.keepOpen ? !1 : o.value.length !== 1;
|
|
43
44
|
};
|
|
44
45
|
return (t, e) => {
|
|
45
|
-
const s =
|
|
46
|
-
return l(), p("div",
|
|
47
|
-
_(
|
|
46
|
+
const s = d("a-tab-pane"), i = d("a-tabs");
|
|
47
|
+
return l(), p("div", {
|
|
48
|
+
class: _(N)
|
|
49
|
+
}, [
|
|
50
|
+
h(i, {
|
|
48
51
|
activeKey: r.value,
|
|
49
52
|
"onUpdate:activeKey": e[0] || (e[0] = (a) => r.value = a),
|
|
50
53
|
type: "card",
|
|
51
|
-
onTabClick:
|
|
54
|
+
onTabClick: S
|
|
52
55
|
}, {
|
|
53
|
-
default:
|
|
54
|
-
(l(!0), p(
|
|
56
|
+
default: b(() => [
|
|
57
|
+
(l(!0), p(E, null, R(C(o), (a) => (l(), V(s, {
|
|
55
58
|
key: a.path
|
|
56
59
|
}, {
|
|
57
|
-
tab:
|
|
60
|
+
tab: b(() => [
|
|
58
61
|
G,
|
|
59
|
-
|
|
60
|
-
class:
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
onClick: (
|
|
62
|
+
k("div", {
|
|
63
|
+
class: _(["tab-item", { active: r.value === a.path }])
|
|
64
|
+
}, q(a.meta.title), 3),
|
|
65
|
+
K(a) ? (l(), p("div", H, [
|
|
66
|
+
h(C(O), {
|
|
67
|
+
onClick: (T) => g(T, a.fullPath)
|
|
65
68
|
}, null, 8, ["onClick"])
|
|
66
|
-
])) :
|
|
69
|
+
])) : D("", !0)
|
|
67
70
|
]),
|
|
68
71
|
_: 2
|
|
69
72
|
}, 1024))), 128))
|
|
@@ -75,5 +78,5 @@ const j = { class: "ditari-nav" }, G = /* @__PURE__ */ C("div", { class: "tab-di
|
|
|
75
78
|
}
|
|
76
79
|
});
|
|
77
80
|
export {
|
|
78
|
-
|
|
81
|
+
oe as default
|
|
79
82
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
1
|
+
import { defineComponent as j, inject as k, watchEffect as N, createVNode as r, Fragment as c, resolveComponent as i, isVNode as I, withDirectives as R, vShow as D, h as H } from "vue";
|
|
2
|
+
import { useRouter as O, useRoute as P } from "vue-router";
|
|
3
3
|
import { storeToRefs as v } from "pinia";
|
|
4
4
|
import { useMenuStore as T } from "../../store/modules/Menu.esm.js";
|
|
5
5
|
import { useSettingsStore as V } from "../../store/modules/Settings.esm.js";
|
|
6
6
|
function _(l) {
|
|
7
|
-
return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !
|
|
7
|
+
return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !I(l);
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const $ = /* @__PURE__ */ j({
|
|
10
10
|
name: "DMenu",
|
|
11
11
|
setup() {
|
|
12
|
-
const l =
|
|
12
|
+
const l = O(), m = P(), {
|
|
13
13
|
componentName: a,
|
|
14
|
-
prop:
|
|
15
|
-
} =
|
|
14
|
+
prop: g
|
|
15
|
+
} = k("menuIcon"), S = T(), {
|
|
16
16
|
list: d,
|
|
17
17
|
openMenusKeys: s,
|
|
18
18
|
selectedMenuKeys: o
|
|
19
|
-
} = v(
|
|
20
|
-
getCollapsed:
|
|
21
|
-
} = v(
|
|
22
|
-
|
|
19
|
+
} = v(S), y = V(), {
|
|
20
|
+
getCollapsed: M
|
|
21
|
+
} = v(y);
|
|
22
|
+
N(() => {
|
|
23
23
|
const e = o.value.length > 0 ? o.value[0] : "", t = p(d.value, e);
|
|
24
24
|
s.value = t || [];
|
|
25
25
|
});
|
|
@@ -35,33 +35,33 @@ const q = /* @__PURE__ */ w({
|
|
|
35
35
|
}
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const b = ({
|
|
39
39
|
item: e,
|
|
40
40
|
key: t,
|
|
41
41
|
keyPath: n
|
|
42
42
|
}) => {
|
|
43
43
|
s.value = n, o.value = [t], m.path !== t && l.push(t).then((u) => u ? console.warn(u) : null);
|
|
44
|
-
},
|
|
44
|
+
}, C = (e) => r(c, null, [r(i("a-menu-item"), {
|
|
45
45
|
key: e.url
|
|
46
46
|
}, {
|
|
47
47
|
icon: () => f(e),
|
|
48
48
|
default: () => e.title
|
|
49
|
-
})]),
|
|
50
|
-
className:
|
|
51
|
-
}, [e.title.substring(0, 1)]), [[
|
|
49
|
+
})]), K = ["anticon", "anticon-menu", "ant-menu-item-icon"], f = (e) => r(c, null, [e.icon ? U(e.icon) : R(r("div", {
|
|
50
|
+
className: K
|
|
51
|
+
}, [e.title.substring(0, 1)]), [[D, M.value]])]), U = (e) => a === "nativeHtml" ? r("span", {
|
|
52
52
|
innerHTML: e
|
|
53
|
-
}, null) :
|
|
54
|
-
|
|
53
|
+
}, null) : H(i(a), {
|
|
54
|
+
[`${g}`]: e
|
|
55
55
|
}), h = (e) => r(c, null, [r(i("a-sub-menu"), {
|
|
56
56
|
key: e.url
|
|
57
57
|
}, {
|
|
58
58
|
title: () => e.title,
|
|
59
59
|
icon: () => f(e),
|
|
60
60
|
default: () => e.children.map(
|
|
61
|
-
(t) => !t.children || t.children.length === 0 ?
|
|
61
|
+
(t) => !t.children || t.children.length === 0 ? w(t) : h(t)
|
|
62
62
|
// 递归调用
|
|
63
63
|
)
|
|
64
|
-
})]),
|
|
64
|
+
})]), w = (e) => r(c, null, [r(i("a-menu-item"), {
|
|
65
65
|
key: e.url
|
|
66
66
|
}, {
|
|
67
67
|
default: () => e.title
|
|
@@ -75,10 +75,10 @@ const q = /* @__PURE__ */ w({
|
|
|
75
75
|
"onUpdate:openKeys": (t) => s.value = t,
|
|
76
76
|
selectedKeys: o.value,
|
|
77
77
|
"onUpdate:selectedKeys": (t) => o.value = t,
|
|
78
|
-
onClick:
|
|
78
|
+
onClick: b
|
|
79
79
|
}, _(e = d.value.map((t) => {
|
|
80
80
|
var n;
|
|
81
|
-
return !t.children || ((n = t.children) == null ? void 0 : n.length) === 0 ?
|
|
81
|
+
return !t.children || ((n = t.children) == null ? void 0 : n.length) === 0 ? C(t) : h(t);
|
|
82
82
|
})) ? e : {
|
|
83
83
|
default: () => [e]
|
|
84
84
|
})]);
|
|
@@ -86,5 +86,5 @@ const q = /* @__PURE__ */ w({
|
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
export {
|
|
89
|
-
|
|
89
|
+
$ as default
|
|
90
90
|
};
|
|
@@ -24,7 +24,7 @@ const n = a(l, {
|
|
|
24
24
|
* @param route
|
|
25
25
|
*/
|
|
26
26
|
save(t) {
|
|
27
|
-
if (this.list.some((
|
|
27
|
+
if (!t.meta.title || this.list.some((s) => s.path === t.path))
|
|
28
28
|
return;
|
|
29
29
|
const e = {
|
|
30
30
|
path: t.path,
|
|
@@ -42,7 +42,7 @@ const n = a(l, {
|
|
|
42
42
|
*/
|
|
43
43
|
deleteTabs(t) {
|
|
44
44
|
this.list.splice(
|
|
45
|
-
this.list.findIndex((
|
|
45
|
+
this.list.findIndex((i) => i.fullPath === t),
|
|
46
46
|
1
|
|
47
47
|
);
|
|
48
48
|
},
|
|
@@ -51,9 +51,9 @@ const n = a(l, {
|
|
|
51
51
|
* @param title 标题
|
|
52
52
|
* @param path url
|
|
53
53
|
*/
|
|
54
|
-
setNavTitle(t,
|
|
54
|
+
setNavTitle(t, i) {
|
|
55
55
|
for (let e = 0; e < this.list.length; e++)
|
|
56
|
-
if (this.list[e].fullPath ===
|
|
56
|
+
if (this.list[e].fullPath === i) {
|
|
57
57
|
this.list[e].meta.title = t;
|
|
58
58
|
break;
|
|
59
59
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
@import "../../theme/variable.scss";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
.#{$prefix-name}-breadcrumb {
|
|
4
3
|
.ant-breadcrumb-separator {
|
|
5
4
|
display: none;
|
|
6
5
|
}
|
|
7
6
|
.breadcrumb {
|
|
8
7
|
display: flex;
|
|
9
|
-
|
|
10
8
|
.breadcrumb-item {
|
|
9
|
+
color: $bread-txt-color;
|
|
11
10
|
&:first-child {
|
|
12
11
|
.breadcrumb-link {
|
|
13
12
|
border-radius: 6px 0 0 6px;
|
|
@@ -21,10 +20,10 @@
|
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
&:last-child {
|
|
24
|
-
&:not(:
|
|
23
|
+
&:not(:first-child) {
|
|
25
24
|
.breadcrumb-link {
|
|
26
25
|
border-radius: 0 6px 6px 0;
|
|
27
|
-
clip-path: polygon(0 0,
|
|
26
|
+
clip-path: polygon(0 0,100% 0,100% 100%,0 100%,8px 50%);
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
29
|
}
|
|
@@ -44,6 +43,11 @@
|
|
|
44
43
|
8px 50%
|
|
45
44
|
);
|
|
46
45
|
}
|
|
46
|
+
a{
|
|
47
|
+
&.breadcrumb-link{
|
|
48
|
+
color: $bread-link-txt-color;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
.breadcrumb-enter-active {
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
.#{$prefix-name}-nav {
|
|
13
|
+
display: flex;
|
|
13
14
|
background: $nav-tab-bg-color;
|
|
14
15
|
.ant-tabs-nav {
|
|
15
16
|
margin: 0;
|
|
@@ -31,7 +32,15 @@
|
|
|
31
32
|
opacity: 0;
|
|
32
33
|
}
|
|
33
34
|
}
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.ant-tabs-tab-active {
|
|
39
|
+
.tab-item{
|
|
40
|
+
color: $nav-tab-active-txt-color;
|
|
41
|
+
}
|
|
34
42
|
}
|
|
43
|
+
|
|
35
44
|
&:not(.ant-tabs-tab-active) {
|
|
36
45
|
background: transparent;
|
|
37
46
|
}
|
|
@@ -44,7 +53,6 @@
|
|
|
44
53
|
}
|
|
45
54
|
}
|
|
46
55
|
}
|
|
47
|
-
|
|
48
56
|
.ant-tabs-tab-btn {
|
|
49
57
|
display: flex;
|
|
50
58
|
align-items: center;
|
|
@@ -56,9 +64,10 @@
|
|
|
56
64
|
align-items: center;
|
|
57
65
|
justify-content: center;
|
|
58
66
|
border-radius: 50%;
|
|
67
|
+
|
|
59
68
|
&:hover {
|
|
60
|
-
background-color:
|
|
61
|
-
color:
|
|
69
|
+
background-color: $nav-tab-close-hover-bg-color;
|
|
70
|
+
color: $nav-tab-close-hover-color;
|
|
62
71
|
}
|
|
63
72
|
.anticon {
|
|
64
73
|
margin: 0;
|
|
@@ -73,6 +82,11 @@
|
|
|
73
82
|
padding: 4px 8px 0;
|
|
74
83
|
}
|
|
75
84
|
|
|
85
|
+
// 去除下边框
|
|
86
|
+
.ant-tabs-nav::before{
|
|
87
|
+
border-bottom-width: 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
76
90
|
.ant-tabs-tab::before,
|
|
77
91
|
.ant-tabs-tab::after {
|
|
78
92
|
position: absolute;
|
|
@@ -21,7 +21,6 @@ $gird-error-display: block !default;
|
|
|
21
21
|
|
|
22
22
|
/******======左侧菜单======******/
|
|
23
23
|
// 左侧菜单
|
|
24
|
-
|
|
25
24
|
$logo-height: 40px !default;
|
|
26
25
|
//左侧菜单北京颜色
|
|
27
26
|
$side-bg-color: #162157 !default;
|
|
@@ -29,6 +28,7 @@ $side-bg-color: #162157 !default;
|
|
|
29
28
|
$side-menu-sub-bg-color: #101847 !default;
|
|
30
29
|
|
|
31
30
|
/******======多标签======******/
|
|
31
|
+
// 背景色
|
|
32
32
|
$nav-tab-bg-color: linear-gradient(270deg, #019cfe 0%, #0165fe 100%) !default;
|
|
33
33
|
//分割符颜色
|
|
34
34
|
$nav-tab-dividers-color: #fff !default;
|
|
@@ -36,9 +36,24 @@ $nav-tab-dividers-color: #fff !default;
|
|
|
36
36
|
$nav-tab-text-color: #fff !default;
|
|
37
37
|
// 悬浮的背景色
|
|
38
38
|
$nav-tab-hover-bg-color: #065de1 !default;
|
|
39
|
-
|
|
39
|
+
// 激活时的字体颜色
|
|
40
|
+
$nav-tab-active-txt-color: #0065b3!default;
|
|
41
|
+
// 关闭按钮悬浮背景色
|
|
42
|
+
$nav-tab-close-hover-bg-color: #63aeff!default;
|
|
43
|
+
// 关闭按钮悬浮时候的字体颜色
|
|
44
|
+
$nav-tab-close-hover-color: #fff!default;
|
|
45
|
+
// 关闭按钮颜色
|
|
46
|
+
$nav-tab-close-color: #fff!default;;
|
|
40
47
|
|
|
41
48
|
/******======详情页,返回导航距离======******/
|
|
42
49
|
$show-header-top: 84px!default;
|
|
43
50
|
// show头部阴影
|
|
44
|
-
$box-shadow-color: #e0e0e0 !default;
|
|
51
|
+
$box-shadow-color: #e0e0e0 !default;
|
|
52
|
+
|
|
53
|
+
/******======面包屑======******/
|
|
54
|
+
// 背景色
|
|
55
|
+
$bread-bg-color: #f0f2f5!default;
|
|
56
|
+
// 链接字体颜色
|
|
57
|
+
$bread-link-txt-color: #2589ff!default;
|
|
58
|
+
// 面包屑文本颜色
|
|
59
|
+
$bread-txt-color: #333;
|
package/package.json
CHANGED
package/src/components/index.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface MenuIcon {
|
|
|
13
13
|
}
|
|
14
14
|
export interface Options {
|
|
15
15
|
menuIcon: MenuIcon;
|
|
16
|
-
prop
|
|
16
|
+
prop?: string;
|
|
17
17
|
}
|
|
18
18
|
const c: any = components;
|
|
19
19
|
export const install = function (app: App, opts: Options) {
|
|
@@ -33,7 +33,7 @@ export const install = function (app: App, opts: Options) {
|
|
|
33
33
|
);
|
|
34
34
|
app.use(pinia);
|
|
35
35
|
app.directive("trim", vTrim);
|
|
36
|
-
app.provide("menuIcon", opts.menuIcon);
|
|
36
|
+
app.provide("menuIcon", opts.menuIcon || {});
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export default {
|
|
@@ -5,9 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { useBreadcrumbStore } from "../../store/modules/Breadcrumb";
|
|
8
|
+
import { prefixName } from "../theme";
|
|
8
9
|
|
|
9
10
|
const store = useBreadcrumbStore();
|
|
10
11
|
const breadCrumbs = computed(() => store.getBreadcrumb);
|
|
12
|
+
//class名称
|
|
13
|
+
const baseClassName = `${prefixName}-breadcrumb`;
|
|
11
14
|
</script>
|
|
12
15
|
<script lang="ts">
|
|
13
16
|
export default {
|
|
@@ -15,7 +18,7 @@ export default {
|
|
|
15
18
|
};
|
|
16
19
|
</script>
|
|
17
20
|
<template>
|
|
18
|
-
<div class="
|
|
21
|
+
<div :class="baseClassName">
|
|
19
22
|
<div class="breadcrumb">
|
|
20
23
|
<transition-group name="breadcrumb">
|
|
21
24
|
<div
|
|
@@ -11,6 +11,7 @@ import { useNavTabsStore } from "../../store/modules/NavTab";
|
|
|
11
11
|
import { useKeepAliveStore } from "../../store/modules/KeepAlive";
|
|
12
12
|
import { useMenuStore } from "../../store/modules/Menu";
|
|
13
13
|
import type { INavTab } from "../../store/modules/NavTab";
|
|
14
|
+
import { prefixName } from "../theme";
|
|
14
15
|
|
|
15
16
|
const route = useRoute();
|
|
16
17
|
const router = useRouter();
|
|
@@ -19,6 +20,9 @@ const navStore = useNavTabsStore();
|
|
|
19
20
|
const keepAliveStore = useKeepAliveStore();
|
|
20
21
|
const menuStore = useMenuStore();
|
|
21
22
|
|
|
23
|
+
//class名称
|
|
24
|
+
const baseClassName = `${prefixName}-nav`;
|
|
25
|
+
|
|
22
26
|
//标签列表
|
|
23
27
|
const navTabs: Ref<INavTab[]> = computed(() => navStore.getList);
|
|
24
28
|
// 被选中的菜单
|
|
@@ -94,7 +98,12 @@ const onClose = ($event: any, key: string) => {
|
|
|
94
98
|
*/
|
|
95
99
|
const closeStatus = (item: INavTab) => {
|
|
96
100
|
// 如果meta有设置keepOpen或者当前打开的标签只有一个的话不显示关闭按钮
|
|
97
|
-
|
|
101
|
+
if (item.meta?.keepOpen) {
|
|
102
|
+
return false;
|
|
103
|
+
} else {
|
|
104
|
+
// 如果只有一个标签,则隐藏关闭按钮
|
|
105
|
+
return navTabs.value.length === 1 ? false : true;
|
|
106
|
+
}
|
|
98
107
|
};
|
|
99
108
|
</script>
|
|
100
109
|
<script lang="ts">
|
|
@@ -103,7 +112,7 @@ export default {
|
|
|
103
112
|
};
|
|
104
113
|
</script>
|
|
105
114
|
<template>
|
|
106
|
-
<div class="
|
|
115
|
+
<div :class="baseClassName">
|
|
107
116
|
<a-tabs v-model:activeKey="activeKey" type="card" @tabClick="onClick">
|
|
108
117
|
<a-tab-pane v-for="item in navTabs" :key="item.path">
|
|
109
118
|
<template #tab>
|
|
@@ -111,7 +120,7 @@ export default {
|
|
|
111
120
|
<div class="tab-item" :class="{ active: activeKey === item.path }">
|
|
112
121
|
{{ item.meta.title }}
|
|
113
122
|
</div>
|
|
114
|
-
<div
|
|
123
|
+
<div v-if="closeStatus(item)" class="tab-close">
|
|
115
124
|
<CloseOutlined @click="onClose($event, item.fullPath)" />
|
|
116
125
|
</div>
|
|
117
126
|
</template>
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
@import "../../theme/variable.scss";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
.#{$prefix-name}-breadcrumb {
|
|
4
3
|
.ant-breadcrumb-separator {
|
|
5
4
|
display: none;
|
|
6
5
|
}
|
|
7
6
|
.breadcrumb {
|
|
8
7
|
display: flex;
|
|
9
|
-
|
|
10
8
|
.breadcrumb-item {
|
|
9
|
+
color: $bread-txt-color;
|
|
11
10
|
&:first-child {
|
|
12
11
|
.breadcrumb-link {
|
|
13
12
|
border-radius: 6px 0 0 6px;
|
|
@@ -21,10 +20,10 @@
|
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
&:last-child {
|
|
24
|
-
&:not(:
|
|
23
|
+
&:not(:first-child) {
|
|
25
24
|
.breadcrumb-link {
|
|
26
25
|
border-radius: 0 6px 6px 0;
|
|
27
|
-
clip-path: polygon(0 0,
|
|
26
|
+
clip-path: polygon(0 0,100% 0,100% 100%,0 100%,8px 50%);
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
29
|
}
|
|
@@ -44,6 +43,11 @@
|
|
|
44
43
|
8px 50%
|
|
45
44
|
);
|
|
46
45
|
}
|
|
46
|
+
a{
|
|
47
|
+
&.breadcrumb-link{
|
|
48
|
+
color: $bread-link-txt-color;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
.breadcrumb-enter-active {
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
.#{$prefix-name}-nav {
|
|
13
|
+
display: flex;
|
|
13
14
|
background: $nav-tab-bg-color;
|
|
14
15
|
.ant-tabs-nav {
|
|
15
16
|
margin: 0;
|
|
@@ -31,7 +32,15 @@
|
|
|
31
32
|
opacity: 0;
|
|
32
33
|
}
|
|
33
34
|
}
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.ant-tabs-tab-active {
|
|
39
|
+
.tab-item{
|
|
40
|
+
color: $nav-tab-active-txt-color;
|
|
41
|
+
}
|
|
34
42
|
}
|
|
43
|
+
|
|
35
44
|
&:not(.ant-tabs-tab-active) {
|
|
36
45
|
background: transparent;
|
|
37
46
|
}
|
|
@@ -44,7 +53,6 @@
|
|
|
44
53
|
}
|
|
45
54
|
}
|
|
46
55
|
}
|
|
47
|
-
|
|
48
56
|
.ant-tabs-tab-btn {
|
|
49
57
|
display: flex;
|
|
50
58
|
align-items: center;
|
|
@@ -56,9 +64,10 @@
|
|
|
56
64
|
align-items: center;
|
|
57
65
|
justify-content: center;
|
|
58
66
|
border-radius: 50%;
|
|
67
|
+
|
|
59
68
|
&:hover {
|
|
60
|
-
background-color:
|
|
61
|
-
color:
|
|
69
|
+
background-color: $nav-tab-close-hover-bg-color;
|
|
70
|
+
color: $nav-tab-close-hover-color;
|
|
62
71
|
}
|
|
63
72
|
.anticon {
|
|
64
73
|
margin: 0;
|
|
@@ -73,6 +82,11 @@
|
|
|
73
82
|
padding: 4px 8px 0;
|
|
74
83
|
}
|
|
75
84
|
|
|
85
|
+
// 去除下边框
|
|
86
|
+
.ant-tabs-nav::before{
|
|
87
|
+
border-bottom-width: 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
76
90
|
.ant-tabs-tab::before,
|
|
77
91
|
.ant-tabs-tab::after {
|
|
78
92
|
position: absolute;
|
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
defineComponent,
|
|
3
3
|
h,
|
|
4
4
|
inject,
|
|
5
|
-
ref,
|
|
6
5
|
resolveComponent,
|
|
7
6
|
watchEffect
|
|
8
7
|
} from "vue";
|
|
@@ -18,7 +17,7 @@ export default defineComponent({
|
|
|
18
17
|
setup() {
|
|
19
18
|
const router = useRouter();
|
|
20
19
|
const route = useRoute();
|
|
21
|
-
const { componentName, prop } = inject("menuIcon");
|
|
20
|
+
const { componentName, prop: menuProp } = inject("menuIcon");
|
|
22
21
|
// 菜单store
|
|
23
22
|
const menuStore = useMenuStore();
|
|
24
23
|
const { list, openMenusKeys, selectedMenuKeys } = storeToRefs(menuStore);
|
|
@@ -112,7 +111,7 @@ export default defineComponent({
|
|
|
112
111
|
return <span v-html={icon}></span>;
|
|
113
112
|
} else {
|
|
114
113
|
return h(resolveComponent(componentName), {
|
|
115
|
-
|
|
114
|
+
[`${menuProp}`]: icon
|
|
116
115
|
});
|
|
117
116
|
}
|
|
118
117
|
};
|
|
@@ -21,7 +21,6 @@ $gird-error-display: block !default;
|
|
|
21
21
|
|
|
22
22
|
/******======左侧菜单======******/
|
|
23
23
|
// 左侧菜单
|
|
24
|
-
|
|
25
24
|
$logo-height: 40px !default;
|
|
26
25
|
//左侧菜单北京颜色
|
|
27
26
|
$side-bg-color: #162157 !default;
|
|
@@ -29,6 +28,7 @@ $side-bg-color: #162157 !default;
|
|
|
29
28
|
$side-menu-sub-bg-color: #101847 !default;
|
|
30
29
|
|
|
31
30
|
/******======多标签======******/
|
|
31
|
+
// 背景色
|
|
32
32
|
$nav-tab-bg-color: linear-gradient(270deg, #019cfe 0%, #0165fe 100%) !default;
|
|
33
33
|
//分割符颜色
|
|
34
34
|
$nav-tab-dividers-color: #fff !default;
|
|
@@ -36,9 +36,24 @@ $nav-tab-dividers-color: #fff !default;
|
|
|
36
36
|
$nav-tab-text-color: #fff !default;
|
|
37
37
|
// 悬浮的背景色
|
|
38
38
|
$nav-tab-hover-bg-color: #065de1 !default;
|
|
39
|
-
|
|
39
|
+
// 激活时的字体颜色
|
|
40
|
+
$nav-tab-active-txt-color: #0065b3!default;
|
|
41
|
+
// 关闭按钮悬浮背景色
|
|
42
|
+
$nav-tab-close-hover-bg-color: #63aeff!default;
|
|
43
|
+
// 关闭按钮悬浮时候的字体颜色
|
|
44
|
+
$nav-tab-close-hover-color: #fff!default;
|
|
45
|
+
// 关闭按钮颜色
|
|
46
|
+
$nav-tab-close-color: #fff!default;;
|
|
40
47
|
|
|
41
48
|
/******======详情页,返回导航距离======******/
|
|
42
49
|
$show-header-top: 84px!default;
|
|
43
50
|
// show头部阴影
|
|
44
|
-
$box-shadow-color: #e0e0e0 !default;
|
|
51
|
+
$box-shadow-color: #e0e0e0 !default;
|
|
52
|
+
|
|
53
|
+
/******======面包屑======******/
|
|
54
|
+
// 背景色
|
|
55
|
+
$bread-bg-color: #f0f2f5!default;
|
|
56
|
+
// 链接字体颜色
|
|
57
|
+
$bread-link-txt-color: #2589ff!default;
|
|
58
|
+
// 面包屑文本颜色
|
|
59
|
+
$bread-txt-color: #333;
|
package/src/hooks/route/index.ts
CHANGED
|
@@ -70,76 +70,6 @@ export const useDitariRoute = () => {
|
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
-
// export const useDitariRoute = (routes: RouteRecordRaw[]) => {
|
|
74
|
-
// const { saveBreadcrumb } = useBreadcrumbStore();
|
|
75
|
-
// // 路由匹配器
|
|
76
|
-
// const routerMatcher = ref<RouterMatcher | null>(null);
|
|
77
|
-
// // 匹配到的路由数据
|
|
78
|
-
// const matched = ref<RouteLocationMatched[]>([]);
|
|
79
|
-
// //创建匹配器
|
|
80
|
-
// routerMatcher.value = createRouterMatcher(routes, {});
|
|
81
|
-
// // 保存打平后的路由
|
|
82
|
-
// const flatRoutes = flattenRoutes(routes, null);
|
|
83
|
-
//
|
|
84
|
-
// /**
|
|
85
|
-
// * 进行匹配
|
|
86
|
-
// * @param to
|
|
87
|
-
// * @param from
|
|
88
|
-
// */
|
|
89
|
-
// const setMatched = (
|
|
90
|
-
// to: RouteLocationNormalized,
|
|
91
|
-
// from: RouteLocationNormalized
|
|
92
|
-
// ) => {
|
|
93
|
-
// try {
|
|
94
|
-
// const rs = routerMatcher.value?.resolve(to, from).matched ?? [];
|
|
95
|
-
// matched.value = rs.reduce((preValue: any[], curValue) => {
|
|
96
|
-
// const flag = preValue.some(
|
|
97
|
-
// (item: RouteRecord) => item.path === curValue.path
|
|
98
|
-
// );
|
|
99
|
-
// if (!flag) {
|
|
100
|
-
// preValue.push({
|
|
101
|
-
// path: curValue.path,
|
|
102
|
-
// title: curValue.meta?.title ?? "未设置标题"
|
|
103
|
-
// });
|
|
104
|
-
// }
|
|
105
|
-
// return preValue;
|
|
106
|
-
// }, []);
|
|
107
|
-
// } catch (e) {
|
|
108
|
-
// console.log(e);
|
|
109
|
-
// matched.value = [];
|
|
110
|
-
// }
|
|
111
|
-
// // 匹配到的数据保存到route store
|
|
112
|
-
// saveBreadcrumb(matched.value);
|
|
113
|
-
// };
|
|
114
|
-
//
|
|
115
|
-
// return {
|
|
116
|
-
// flatRoutes,
|
|
117
|
-
// setMatched
|
|
118
|
-
// };
|
|
119
|
-
// };
|
|
120
|
-
|
|
121
|
-
// function flattenRoutes(
|
|
122
|
-
// routes: RouteRecordRaw[],
|
|
123
|
-
// parentRoute: RouteRecordRaw | null
|
|
124
|
-
// ) {
|
|
125
|
-
// return routes.reduce((acc: any[], route) => {
|
|
126
|
-
// if (route.children) {
|
|
127
|
-
// acc.push(...flattenRoutes(route.children, route));
|
|
128
|
-
// }
|
|
129
|
-
// // 只有有组件的route才加入数组
|
|
130
|
-
// if (route.component) {
|
|
131
|
-
// // 路径 如果当前路径为空,则说明是父组件重定向的地址 则追加为""空字符串
|
|
132
|
-
// const path =
|
|
133
|
-
// `${parentRoute?.path}` + (route.path ? "/" + route.path : "");
|
|
134
|
-
// acc.push({
|
|
135
|
-
// ...route,
|
|
136
|
-
// path: path
|
|
137
|
-
// });
|
|
138
|
-
// }
|
|
139
|
-
// return acc;
|
|
140
|
-
// }, []);
|
|
141
|
-
// }
|
|
142
|
-
|
|
143
73
|
function flattenRoutes(routes: any[], parentPath = ""): any {
|
|
144
74
|
const result = [];
|
|
145
75
|
for (const route of routes) {
|
|
@@ -50,6 +50,10 @@ export const useNavTabsStore = defineStore(NAV_TAB_ID, {
|
|
|
50
50
|
* @param route
|
|
51
51
|
*/
|
|
52
52
|
save(route: RouteLocationNormalized) {
|
|
53
|
+
if (!route.meta.title) {
|
|
54
|
+
// 没有设置title,则不进入缓存
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
53
57
|
const flag = this.list.some((item: INavTab) => item.path === route.path);
|
|
54
58
|
if (flag) {
|
|
55
59
|
return;
|