Skip to content

Commit

Permalink
feat: add default theme
Browse files Browse the repository at this point in the history
  • Loading branch information
xsf0105 committed Jun 8, 2023
1 parent 05c624a commit ee76d89
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ class MyComponent extends QuarkElement {
localStorage.setItem('language', 'en-US')
}

// 默认设置主题
if(!localStorage.getItem('theme')) {
localStorage.setItem('theme', 'light')
}

// 菜单是否激活
if(location.hash.indexOf('guide') > -1) {
this.activeNav = 'guide'
Expand Down

0 comments on commit ee76d89

Please sign in to comment.