用户管理:资金变动按钮整合为3个(钻石/H币/赊尼券变动)
This commit is contained in:
parent
4cb752ba8c
commit
12c28e4a79
|
|
@ -121,14 +121,13 @@ const formRules = computed<FormRules>(() => ({
|
|||
|
||||
// 类型标签
|
||||
const typeLabel = computed(() => {
|
||||
const labels: Record<number, string> = { 1: '余额', 2: '积分', 3: '钻石' }
|
||||
return labels[props.type] || '余额'
|
||||
const labels: Record<number, string> = { 1: '钻石', 2: 'H币', 3: '赊尼券' }
|
||||
return labels[props.type] || '钻石'
|
||||
})
|
||||
|
||||
// 对话框标题
|
||||
const dialogTitle = computed(() => {
|
||||
const actionLabel = props.action === 'add' ? '充值' : '扣除'
|
||||
return `${actionLabel}${typeLabel.value}`
|
||||
return `${typeLabel.value}变动`
|
||||
})
|
||||
|
||||
// 当前值标签
|
||||
|
|
|
|||
|
|
@ -94,12 +94,9 @@
|
|||
</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="money:add">充值余额</el-dropdown-item>
|
||||
<el-dropdown-item command="money:sub">扣除余额</el-dropdown-item>
|
||||
<el-dropdown-item command="integral:add">充值积分</el-dropdown-item>
|
||||
<el-dropdown-item command="integral:sub">扣除积分</el-dropdown-item>
|
||||
<el-dropdown-item command="diamond:add">充值钻石</el-dropdown-item>
|
||||
<el-dropdown-item command="diamond:sub">扣除钻石</el-dropdown-item>
|
||||
<el-dropdown-item command="money:change">钻石变动</el-dropdown-item>
|
||||
<el-dropdown-item command="integral:change">H币变动</el-dropdown-item>
|
||||
<el-dropdown-item command="diamond:change">赊尼券变动</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
|
|
|
|||
|
|
@ -227,7 +227,8 @@ const handleCommand = async (command: string, row: UserListItem) => {
|
|||
const typeMap: Record<string, number> = { money: 1, integral: 2, diamond: 3 }
|
||||
|
||||
moneyDialogType.value = typeMap[typeStr]
|
||||
moneyDialogAction.value = action as 'add' | 'sub'
|
||||
// change 命令默认为充值,弹窗内可切换
|
||||
moneyDialogAction.value = action === 'sub' ? 'sub' : 'add'
|
||||
moneyDialogVisible.value = true
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user