press-next
Version:
Vue3 组件库,支持 Composition API
68 lines (61 loc) • 1.63 kB
text/typescript
/*
* desc: 选择奖品图弹窗组件 mock 数据
* date: 2025-09-18
* author: alltasxiao
* email: alltasxiao@tencent.com
*/
export interface AwardItem {
id: string | number;
name?: string;
imageUrl: string;
}
export function getMockData() {
// 奖品图标列表
const awardList: AwardItem[] = [
{
id: 1,
name: '金奖杯',
imageUrl:
'https://image-1251917893.file.myqcloud.com/general-match-components/img/match-set-award-popup/icon-champion-cup.png',
},
{
id: 2,
name: '银奖杯',
imageUrl:
'https://image-1251917893.file.myqcloud.com/general-match-components/img/match-set-award-popup/icon-champion-cup.png',
},
{
id: 3,
name: '铜奖杯',
imageUrl:
'https://image-1251917893.file.myqcloud.com/general-match-components/img/match-set-award-popup/icon-champion-cup.png',
},
{
id: 4,
name: '钻石奖杯',
imageUrl:
'https://image-1251917893.file.myqcloud.com/general-match-components/img/match-set-award-popup/icon-champion-cup.png',
},
{
id: 5,
name: '皇冠奖杯',
imageUrl:
'https://image-1251917893.file.myqcloud.com/general-match-components/img/match-set-award-popup/icon-champion-cup.png',
},
];
// 组件属性配置
const componentProps = {
show: false,
title: '选择奖品图',
awardList,
selectedId: 2, // 默认选中银奖杯
confirmText: '确定',
closeOnClickOverlay: true,
zIndex: 100,
};
return componentProps;
}
const DEMO_DATA = {
...getMockData(),
};
export default DEMO_DATA;