press-next
Version:
Vue3 组件库,支持 Composition API
66 lines (59 loc) • 1.14 kB
text/typescript
/*
* desc: 观战列表组件模拟数据
* date: 2025-09-17
* author: alltasxiao
* email: alltasxiao@tencent.com
*/
export interface WatchItem {
id: string | number;
groupName: string;
watchText?: string;
}
export function getMockData() {
// 观战列表数据
const watchList: WatchItem[] = [
{
id: 1,
groupName: '第 1 组',
watchText: '前往观战',
},
{
id: 2,
groupName: '第 2 组',
watchText: '前往观战',
},
{
id: 3,
groupName: '第 3 组',
watchText: '前往观战',
},
{
id: 4,
groupName: '第 4 组',
watchText: '前往观战',
},
{
id: 5,
groupName: '第 5 组',
watchText: '前往观战',
},
{
id: 6,
groupName: '第 6 组',
watchText: '前往观战',
},
];
// 组件属性配置
const componentProps = {
list: watchList,
loading: false,
finished: true,
emptyText: '暂无观战数据',
finishText: '没有更多了',
};
return componentProps;
}
const DEMO_DATA = {
...getMockData(),
};
export default DEMO_DATA;