Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…late into template
  • Loading branch information
yuntian001 committed Sep 22, 2022
2 parents e0e5a4b + af84a4b commit 047af6f
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 17 deletions.
20 changes: 11 additions & 9 deletions src/layout/components/menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,18 @@ const menuTextColor = computed(() => mixColor(themeConfig.menuBg, menuActiveColo
.collapse {
:deep(.layout-menu-content) {
width: calc(var(--el-menu-icon-width) + var(--el-menu-base-level-padding) * 2);
.title {
width: calc(var(--el-menu-icon-width) + var(--el-menu-base-level-padding) * 2);
text-align: center;
margin: 0;
span {
display: none;
}
span {
visibility: hidden;
}
// .title {
// width: calc(var(--el-menu-icon-width) + var(--el-menu-base-level-padding) * 2);
// text-align: center;
// margin: 0;
// span {
// display: none;
// }
// }
}
}
</style>
2 changes: 1 addition & 1 deletion src/locales/lang/en/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { forOwn } from 'lodash-es';
const modules = import.meta.glob('./*.json', { eager: true, import: 'default' });
const modules = import.meta.glob('./**/*.{json,ts}', { eager: true, import: 'default' });
const langs = {} as Record<string, string>;
forOwn(modules, (value) => {
Object.assign(langs, value);
Expand Down
3 changes: 2 additions & 1 deletion src/locales/lang/en/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"多级菜单1": "Multilevel Menu 1",
"多级菜单1-1": "Multilevel Menu 1-1",
"多级菜单1-1-1": "Multilevel Menu 1-1-1",
"多级菜单1-2": "Multilevel Menu 1-2"
"多级菜单1-2": "Multilevel Menu 1-2",
"外链": "Backlinks"
}
2 changes: 1 addition & 1 deletion src/locales/lang/zh-cn/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { forOwn } from 'lodash-es';
const modules = import.meta.glob('./*.json', { eager: true, import: 'default' });
const modules = import.meta.glob('./**/*.{json,ts}', { eager: true, import: 'default' });
const langs = {} as Record<string, string>;
forOwn(modules, (value) => {
Object.assign(langs, value);
Expand Down
11 changes: 6 additions & 5 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ html {
}

//去a标签默认样式
a:hover,
a:visited,
a:link,
a:active {
color: inherit;
a {
color: unset;
text-decoration: none;
}

Expand Down Expand Up @@ -75,3 +72,7 @@ a:active {
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
}
.popover-scrollbar-y {
margin: 0 -12px;
padding: 0 12px;
}
4 changes: 4 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,9 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
},
},
},
optimizeDeps: {
//因为项目中很多用到了自动引入和动态加载,所以vite首次扫描依赖项会扫描不全,这里强制扫描全局。
entries: ['./src/**/*.{ts,vue}'],
},
};
};

0 comments on commit 047af6f

Please sign in to comment.