UNPKG

press-next

Version:

Vue3 组件库,支持 Composition API

65 lines (58 loc) 1.29 kB
// demo-data/index.ts 标准格式 export interface TeamMember { id?: string | number; name: string; avatar: string; isCaptain?: boolean; [key: string]: any; } export function getMockData() { // 主队成员数据 const members: TeamMember[] = [ { id: '1', name: '队长', avatar: 'https://avatars.githubusercontent.com/u/9064066?v=4', isCaptain: true, }, { id: '2', name: '成员2', avatar: 'https://avatars.githubusercontent.com/u/6128107?v=4', }, { id: '3', name: '成员3', avatar: 'https://avatars.githubusercontent.com/u/499550?v=4', }, { id: '4', name: '成员4', avatar: 'https://avatars.githubusercontent.com/u/6128107?v=4', }, { id: '5', name: '成员5', avatar: 'https://avatars.githubusercontent.com/u/499550?v=4', }, { id: '6', name: '成员6', avatar: 'https://avatars.githubusercontent.com/u/6128107?v=4', }, { id: '7', name: '成员7', avatar: 'https://avatars.githubusercontent.com/u/499550?v=4', }, ]; // 组件属性配置 const componentProps = { members, }; return componentProps; } const DEMO_DATA = { ...getMockData(), }; export default DEMO_DATA;