Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Jan 3, 2024
1 parent 82454a6 commit 1b426c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ const default_config = {
latest: false,
}
const config = ref(JSON.parse(localStorage.getItem('MP_DASHBOARD') || '{}'))
if (!config.value) {
if (Object.keys(config.value).length === 0) {
config.value = default_config
localStorage.setItem('MP_DASHBOARD', JSON.stringify(config.value))
}
// 弹窗设置项目
// 设置项目
function setDashboardConfig() {
localStorage.setItem('MP_DASHBOARD', JSON.stringify(config.value))
dialog.value = false
Expand Down

0 comments on commit 1b426c5

Please sign in to comment.