mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Use type Component as vue component in FreshLayoutItem
This commit is contained in:
parent
8c306f37db
commit
cd1410f9bb
@ -1,7 +1,8 @@
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import type { FreshLayoutItem } from '../fresh-layout-item'
|
||||
|
||||
export const areas: FreshLayoutItem = {
|
||||
name: 'areas',
|
||||
displayName: '栏目',
|
||||
component: () => import('./Areas.vue').then(m => m.default),
|
||||
component: defineAsyncComponent(() => import('./Areas.vue')),
|
||||
}
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import type { FreshLayoutItem } from '../fresh-layout-item'
|
||||
|
||||
export const blackboard: FreshLayoutItem = {
|
||||
name: 'blackboard',
|
||||
displayName: '活动',
|
||||
component: () => import('./Blackboard.vue').then(m => m.default),
|
||||
component: defineAsyncComponent(() => import('./Blackboard.vue')),
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import type { Category } from '@/components/utils/categories/data'
|
||||
|
||||
import type { FreshLayoutItem } from '../fresh-layout-item'
|
||||
@ -15,5 +16,5 @@ export const categories: FreshLayoutItem = {
|
||||
name: 'categories',
|
||||
displayName: '分区',
|
||||
grow: true,
|
||||
component: () => import('./Categories.vue').then(m => m.default),
|
||||
component: defineAsyncComponent(() => import('./Categories.vue')),
|
||||
}
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import type { FreshLayoutItem } from '../fresh-layout-item'
|
||||
|
||||
export const feeds: FreshLayoutItem = {
|
||||
name: 'feeds',
|
||||
displayName: '动态',
|
||||
grow: true,
|
||||
component: () => import('./Feeds.vue').then(m => m.default),
|
||||
component: defineAsyncComponent(() => import('./Feeds.vue')),
|
||||
}
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import type { Executable, ImportedVueComponent, WithName } from '@/core/common-types'
|
||||
import type { Component } from 'vue'
|
||||
import type { WithName } from '@/core/common-types'
|
||||
|
||||
export interface FreshLayoutItem extends WithName {
|
||||
component: Executable<ImportedVueComponent>
|
||||
component: Component
|
||||
grow?: boolean
|
||||
}
|
||||
export interface FreshLayoutItemSettings {
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
import type { FreshLayoutItem } from '../fresh-layout-item'
|
||||
|
||||
export const trending: FreshLayoutItem = {
|
||||
name: 'trending',
|
||||
displayName: '热门视频',
|
||||
grow: true,
|
||||
component: () => import('./Trending.vue').then(m => m.default),
|
||||
component: defineAsyncComponent(() => import('./Trending.vue')),
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user