Merge pull request #59 from chaoXxxxx/v2.0

修复一些语法错误
This commit is contained in:
孟帅 2023-10-17 16:30:53 +08:00 committed by GitHub
commit 80fb2e7f87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -10,7 +10,7 @@
<h2 v-show="!collapsed" class="title">HotGo</h2> <h2 v-show="!collapsed" class="title">HotGo</h2>
</div> </div>
<AsideMenu <AsideMenu
v-model:collapsed="collapsed" @update:collapsed="updateMenu"
v-model:location="getMenuLocation" v-model:location="getMenuLocation"
:inverted="getInverted" :inverted="getInverted"
mode="horizontal" mode="horizontal"
@ -216,7 +216,7 @@
type: Boolean, type: Boolean,
}, },
}, },
setup(props) { setup(props, { emit }) {
const userStore = useUserStore(); const userStore = useUserStore();
const notificationStore = notificationStoreWidthOut(); const notificationStore = notificationStoreWidthOut();
const useLockscreen = useLockscreenStore(); const useLockscreen = useLockscreenStore();
@ -473,6 +473,10 @@
{ immediate: true, deep: true } { immediate: true, deep: true }
); );
const updateMenu = () => {
emit('update:collapsed', !props.collapsed);
};
onMounted(() => { onMounted(() => {
if (notificationStore.getUnreadCount() === 0) { if (notificationStore.getUnreadCount() === 0) {
notificationStore.pullMessages(); notificationStore.pullMessages();
@ -500,6 +504,7 @@
notificationStore, notificationStore,
getIsMobile, getIsMobile,
userStore, userStore,
updateMenu,
}; };
}, },
}); });

View File

@ -82,6 +82,7 @@
page: 1, page: 1,
pageSize: 5, pageSize: 5,
pageCount: 1, pageCount: 1,
totalCount: 0,
list: [], list: [],
}); });