Skip to content

Commit

Permalink
fix: 修复导航作品栏,修复.eslintrc.js规则文件
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohaodu committed Nov 17, 2024
1 parent d754ca1 commit 557a0dd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
rules: {
'vue/multi-word-component-names': 'off',
'vue/no-multiple-template-root': 'off',
'vue/attribute-hyphenation': 'ignore',
'vue/attribute-hyphenation': 'off',
'vue/attributes-order': 'off',
},
},
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ dist
.DS_Store
.vscode
.vercel
.output.zip
.output.zip
.idea
17 changes: 12 additions & 5 deletions components/navigation.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<client-only>
<el-menu
:default-active="activeIndex"
id="nav"
ref="refMenu"
:default-active="activeIndex"
mode="horizontal"
:ellipsis="false"
:background-color="themeStyle.backgroundColor"
Expand All @@ -26,11 +26,18 @@
<el-menu-item index="/game/knifehit">小李飞刀</el-menu-item>
<el-menu-item index="/game/breakout">打砖块</el-menu-item>
</el-sub-menu>
<el-sub-menu index="/works">
<template #title>作品</template>
<el-menu-item>
<a href="https://os.mayuan.work/" target="_blank">点餐系统(课设)</a>
</el-menu-item>
<el-menu-item>
<a href="https://bq.mayuan.work/books" target="_blank">期末试题</a>
</el-menu-item>
</el-sub-menu>
<div style="padding: auto 2vw">
<Switch></Switch>
</div>
<a href="https://bq.mayuan.work/books" target="_blank">期末试题</a>
<a href="https://os.mayuan.work/" target="_blank">点餐系统(课设)</a>
<div style="flex-grow: 1"></div>
<el-menu-item
:key="router.currentRoute.value.fullPath"
Expand All @@ -54,7 +61,7 @@
"
alt="Github授权登录"
/>
<span v-text="isLogin ? githubUser!.name : 'Github授权登录'" class="text-xs leading-5">
<span class="text-xs leading-5" v-text="isLogin ? githubUser!.name : 'Github授权登录'">
</span>
</nuxt-link>
</el-menu-item>
Expand Down Expand Up @@ -136,7 +143,7 @@ onMounted(async () => {
a {
display: flex;
cursor: pointer;
margin: auto 2vw;
margin: auto 1vw;
text-decoration: none;
overflow: hidden;
white-space: nowrap;
Expand Down
6 changes: 3 additions & 3 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default defineNuxtConfig({
minify: 'terser',
terserOptions: {
compress: {
//生产环境时移除console.log()
// 生产环境时移除console.log()
drop_console: true,
drop_debugger: true,
},
Expand All @@ -34,12 +34,12 @@ export default defineNuxtConfig({
content:
'width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, shrink-to-fit=no',
},
{ name: 'baidu-site-verification', content: 'codeva-JXLMMF0sXP' }, //百度快速收录
{ name: 'baidu-site-verification', content: 'codeva-JXLMMF0sXP' }, // 百度快速收录
{ name: 'referrer', content: 'strict-origin-when-cross-origin' },
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
script: [
{ src: '/baidu-analytics.js' }, //添加百度分析
{ src: '/baidu-analytics.js' }, // 添加百度分析
],
},
},
Expand Down

0 comments on commit 557a0dd

Please sign in to comment.