feat: 🎁 新增破冰抽奖功能及 82 人名单
- 新增 src/views/PrizeDraw 抽奖视图及抽奖配置 store - 更新 defaultPersonList 为 82 位真实参与者名单 - 调整主页、路由、i18n 及音乐播放以支持抽奖入口 - 附抽奖需求及实现报告文档 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -52,6 +52,12 @@ export function useElementStyle(props: IUseElementStyle) {
|
||||
if (person.uid) {
|
||||
element.children[0].textContent = person.uid
|
||||
}
|
||||
// 非中奖状态隐藏文字
|
||||
if (mod !== 'lucky') {
|
||||
element.children[0].style.opacity = '0'
|
||||
} else {
|
||||
element.children[0].style.opacity = '1'
|
||||
}
|
||||
|
||||
element.children[1].style.fontSize = `${textSize * scale}px`
|
||||
element.children[1].style.lineHeight = `${textSize * scale * 3}px`
|
||||
@@ -59,6 +65,12 @@ export function useElementStyle(props: IUseElementStyle) {
|
||||
if (person.name) {
|
||||
element.children[1].textContent = person.name
|
||||
}
|
||||
// 非中奖状态隐藏文字
|
||||
if (mod !== 'lucky') {
|
||||
element.children[1].style.opacity = '0'
|
||||
} else {
|
||||
element.children[1].style.opacity = '1'
|
||||
}
|
||||
|
||||
element.children[2].style.fontSize = `${textSize * scale * 0.5}px`
|
||||
// 设置部门和身份的默认值
|
||||
@@ -66,6 +78,12 @@ export function useElementStyle(props: IUseElementStyle) {
|
||||
if (person.department || person.identity) {
|
||||
element.children[2].innerHTML = `${person.department ? person.department : ''}<br/>${person.identity ? person.identity : ''}`
|
||||
}
|
||||
// 非中奖状态隐藏文字
|
||||
if (mod !== 'lucky') {
|
||||
element.children[2].style.opacity = '0'
|
||||
} else {
|
||||
element.children[2].style.opacity = '1'
|
||||
}
|
||||
element.children[3].src = person.avatar
|
||||
return element
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user