diff --git a/template/framework-admin/components/sidebar.vue b/template/framework-admin/components/sidebar.vue index 8c17715..fcf1f54 100644 --- a/template/framework-admin/components/sidebar.vue +++ b/template/framework-admin/components/sidebar.vue @@ -68,31 +68,31 @@ export default { flex-direction: column; justify-content: space-between; - .el-menu { + > .el-menu { box-sizing: border-box; padding-top: 12px; flex: 1; border: none; height: calc(100vh - @--footer-height - @--header-height); width: 100% !important; + } - .el-menu-item { - &:hover { - color: @menu-active-text-color !important; - background-color: transparent !important; - } - - &.is-active { - background-color: @--color-primary !important; - } + .el-menu-item { + &:hover { + color: @menu-active-text-color !important; + background-color: transparent !important; } - [class*='icon'] { - font-size: 14px; - margin-right: 5px; + &.is-active { + background-color: @--color-primary !important; } } + [class*='icon'] { + font-size: 14px; + margin-right: 5px; + } + .fix-btn-wrap { height: @--footer-height; diff --git a/template/framework-admin/store/index.js b/template/framework-admin/store/index.js index 5dced3a..1305c00 100644 --- a/template/framework-admin/store/index.js +++ b/template/framework-admin/store/index.js @@ -5,7 +5,7 @@ const cookieConfig = { get domain() { const {hostname} = location // 本地环境 - if (/^(127\.0\.0\.1|localhost)|(netlify\.com)$/.test(hostname)) + if (!(/deepexi\.(com|top)$/.test(hostname))) return hostname // 线上环境 const s = hostname.indexOf('.') @@ -17,12 +17,19 @@ const cookieConfig = { }, } -const createMenuItem = ({name = '', id = '', pathUrl = '/', iconUrl}) => { +const createMenuItem = ({ + name = '', + id = '', + pathUrl = '/', + iconUrl, + children = [], +}) => { return { url: pathUrl, id: id, name: name, icon: iconUrl, + children: children?.length ? children.map(createMenuItem) : null, } }