Skip to content

Commit

Permalink
fix: 获取公告失败导致的元素丢失
Browse files Browse the repository at this point in the history
  • Loading branch information
Yingyya committed Aug 14, 2024
1 parent ffe2403 commit c327de0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ watch(visible, (val) => {
<ConfirmPopup></ConfirmPopup>
<AdminLoginDialog />
<ParseVerifyDialog />
<Dialog v-model:visible="visible" modal maximizable :header="systemConfigRef.notice.value.title" :style="{ width: '50rem' }" :breakpoints="{ '1199px': '75vw', '575px': '90vw' }">
<p class="mb-5" v-html="systemConfigRef.notice.value.content"></p>
<Dialog v-model:visible="visible" modal maximizable :header="systemConfigRef.notice.value?.title" :style="{ width: '50rem' }" :breakpoints="{ '1199px': '75vw', '575px': '90vw' }">
<p class="mb-5" v-html="systemConfigRef.notice.value?.content"></p>
</Dialog>
<GithubCorners />
<router-view/>
Expand Down
4 changes: 3 additions & 1 deletion src/store/modules/system-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export const useSystemConfigStore = defineStore('system-config-store', {
// 公告
if (this.notice_id > 0) {
const {data} = await getNotice(this.notice_id);
this.notice = data.data;
if (data.data) {
this.notice = data.data;
}
}
this.isInit = true;
}
Expand Down

0 comments on commit c327de0

Please sign in to comment.