Skip to content

Commit

Permalink
fix: typescript warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacharyBear committed Apr 2, 2024
1 parent 91317d2 commit ee9074b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "glassmorphism",
"version": "1.1.2",
"version": "1.1.3",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
"preview": "vite preview",
"start": "build && serve ./dist"
},
"dependencies": {
"@types/node": "^14.18.34",
Expand Down
7 changes: 4 additions & 3 deletions src/views/global/GlHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@
import GgSubMenu from '@/components/GgSubMenu.vue'
import i18n, { langs } from '@/assets/lang/index';
type Lang = 'zh' | 'en'
const isLang = (lang: string): lang is Lang => !!langs.find(option => option.value === lang)
const toggleLang = (lang: string) => {
if (!isLang(lang)) return
i18n.global.locale = lang;
localStorage.setItem('lang', lang);
};
Expand Down Expand Up @@ -129,9 +133,6 @@ header {
}
}
}
&:hover ul {
// display: block;
}
}
}
&:hover {
Expand Down

0 comments on commit ee9074b

Please sign in to comment.