UNPKG

press-next

Version:

Vue3 组件库,支持 Composition API

99 lines (92 loc) 2.16 kB
/** * desc: 赛事日程标题组件 Mock 数据 * date: 2025-11-13 * author: alltasxiao * email: alltasxiao@tencent.com */ export interface StatusOption { key: string; label: string; value: string; status: 'champion' | 'runner-up' | 'third-place' | 'reached' | 'advance' | 'not-advance' | 'number-place' | 'placed-finished' | 'none'; statusText?: string; } export function getMockData() { // 各种状态选项 const statusOptions: StatusOption[] = [ { key: 'champion', label: '冠军状态', value: '展示冠军样式(金色)', status: 'champion', }, { key: 'runner-up', label: '亚军状态', value: '展示亚军样式(银色)', status: 'runner-up', }, { key: 'third-place', label: '季军状态', value: '展示季军样式(铜色)', status: 'third-place', }, { key: 'reached', label: '止步xx强', value: '展示止步样式(紫色)', status: 'reached', }, { key: 'advance', label: '晋级状态', value: '展示晋级样式(蓝色)', status: 'advance', }, { key: 'not-advance', label: '未晋级状态', value: '展示未晋级样式(灰色)', status: 'not-advance', }, { key: 'number-place', label: '第xx名', value: '展示排名样式(灰色)', status: 'number-place', }, { key: 'placed-finished', label: '第xx-xx名', value: '展示区间排名样式(灰色)', status: 'placed-finished', }, { key: 'custom', label: '自定义文案', value: '展示自定义文案', status: 'advance', statusText: '自定义文案', }, { key: 'none', label: '无状态', value: '不显示状态标签', status: 'none', }, ]; // 组件属性配置 const componentProps = { status: 'advance' as const, statusText: '', }; return { componentProps, statusOptions, }; } const DEMO_DATA = { ...getMockData().componentProps, }; export default DEMO_DATA;