修复打包前端报错
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
v-permission="'dice:player:index:update'"
|
||||
:model-value="row.status === 1"
|
||||
:loading="row._statusLoading"
|
||||
@change="(v: boolean) => handleStatusChange(row, v ? 1 : 0)"
|
||||
@change="(v: string | number | boolean) => handleStatusChange(row, v ? 1 : 0)"
|
||||
/>
|
||||
</template>
|
||||
<!-- 平台币:tag 展示 -->
|
||||
@@ -105,13 +105,23 @@
|
||||
getData()
|
||||
}
|
||||
|
||||
// 权重列带 % 的 formatter
|
||||
const weightFormatter = (_row: any, _column: any, cellValue: unknown) =>
|
||||
cellValue != null && cellValue !== '' ? `${cellValue}%` : '-'
|
||||
// 权重列带 % 的 formatter(ColumnOption.formatter 仅接收 row)
|
||||
const weightFormatter = (prop: string) => (row: any) => {
|
||||
const cellValue = row[prop]
|
||||
return cellValue != null && cellValue !== '' ? `${cellValue}%` : '-'
|
||||
}
|
||||
|
||||
// 倍率列展示:0=正常 1=强制杀猪 2=T1高倍率
|
||||
const isUpFormatter = (_row: any, _column: any, cellValue: unknown) =>
|
||||
cellValue === 0 ? '正常' : cellValue === 1 ? '强制杀猪' : cellValue === 2 ? 'T1高倍率' : '-'
|
||||
const isUpFormatter = (row: any) => {
|
||||
const cellValue = row.is_up
|
||||
return cellValue === 0
|
||||
? '正常'
|
||||
: cellValue === 1
|
||||
? '强制杀猪'
|
||||
: cellValue === 2
|
||||
? 'T1高倍率'
|
||||
: '-'
|
||||
}
|
||||
|
||||
// 表格配置
|
||||
const {
|
||||
@@ -137,11 +147,11 @@
|
||||
{ prop: 'status', label: '状态', width: 88, useSlot: true },
|
||||
{ prop: 'coin', label: '平台币', width: 100, useSlot: true },
|
||||
{ prop: 'is_up', label: '倍率', width: 80, formatter: isUpFormatter },
|
||||
{ prop: 't1_wight', label: 'T1池权重', width: 100, formatter: weightFormatter },
|
||||
{ prop: 't2_wight', label: 'T2池权重', width: 100, formatter: weightFormatter },
|
||||
{ prop: 't3_wight', label: 'T3池权重', width: 100, formatter: weightFormatter },
|
||||
{ prop: 't4_wight', label: 'T4池权重', width: 100, formatter: weightFormatter },
|
||||
{ prop: 't5_wight', label: 'T5池权重', width: 100, formatter: weightFormatter },
|
||||
{ prop: 't1_wight', label: 'T1池权重', width: 100, formatter: weightFormatter('t1_wight') },
|
||||
{ prop: 't2_wight', label: 'T2池权重', width: 100, formatter: weightFormatter('t2_wight') },
|
||||
{ prop: 't3_wight', label: 'T3池权重', width: 100, formatter: weightFormatter('t3_wight') },
|
||||
{ prop: 't4_wight', label: 'T4池权重', width: 100, formatter: weightFormatter('t4_wight') },
|
||||
{ prop: 't5_wight', label: 'T5池权重', width: 100, formatter: weightFormatter('t5_wight') },
|
||||
{ prop: 'total_draw_count', label: '总抽奖次数' },
|
||||
{ prop: 'paid_draw_count', label: '购买抽奖次数' },
|
||||
{ prop: 'free_draw_count', label: '赠送抽奖次数' },
|
||||
|
||||
Reference in New Issue
Block a user