mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
28 lines
881 B
TypeScript
28 lines
881 B
TypeScript
import { defineAsyncComponent } from 'vue'
|
|
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
|
|
|
export const feeds: CustomNavbarItemInit = {
|
|
name: 'feeds',
|
|
displayName: '动态',
|
|
content: '动态',
|
|
|
|
href: 'https://t.bilibili.com/',
|
|
touch: true,
|
|
active: document.URL.replace(window.location.search, '') === 'https://t.bilibili.com/',
|
|
contentMounted: async item => {
|
|
const { getNotifyCount } = await import('@/components/feeds/notify')
|
|
const updateCount = async () => {
|
|
const count = await getNotifyCount()
|
|
item.notifyCount = count
|
|
}
|
|
await updateCount()
|
|
// 弹窗里还没实现实时刷新, 这里先不更新数字
|
|
// setInterval(() => updateCount(), updateInterval)
|
|
},
|
|
loginRequired: true,
|
|
|
|
popupContent: defineAsyncComponent(() => import('./NavbarFeeds.vue')),
|
|
boundingWidth: 300,
|
|
noPopupPadding: true,
|
|
}
|