UNPKG

press-next

Version:

Vue3 组件库,支持 Composition API

63 lines (54 loc) 1.1 kB
export interface InformItem { id: string | number; title: string; state: boolean; icon: string; type: string; } export interface InformContent { title: string; time: string; addr: string; items: InformItem[]; } export function getMockData() { // 通知项目数据 const informItems: InformItem[] = [ { id: 1, title: '短信通知', state: true, icon: 'icon-chat', type: 'start', }, { id: 2, title: '和平赛场小程序通知', state: false, icon: 'icon-mp', type: 'result', }, ]; // 通知内容配置 const content: InformContent = { title: '2024年春季电竞联赛决赛', time: '2024年4月15日 14:00-18:00', addr: '腾讯滨海大厦B2层电竞馆', items: informItems, }; // 自定义配置 const customConfig = { activeColor: '#6A36EE', switchSize: '0.4rem', }; // 组件属性配置 const componentProps = { content, ...customConfig, }; return componentProps; } const DEMO_DATA = { ...getMockData(), }; export default DEMO_DATA;