2024-11-18 19:40:44 +08:00
|
|
|
import type { VxeColumnPropTypes } from "vxe-table/types/column"
|
2022-10-25 17:29:28 +08:00
|
|
|
|
2024-11-25 17:42:52 +08:00
|
|
|
export const StatusColumnSolts: VxeColumnPropTypes.Slots = {
|
2022-10-25 17:29:28 +08:00
|
|
|
default: ({ row, column }) => {
|
|
|
|
const cellValue = row[column.field]
|
2023-06-20 09:13:47 +08:00
|
|
|
const [type, value] = cellValue ? ["success", "启用"] : ["danger", "禁用"]
|
2022-10-25 17:29:28 +08:00
|
|
|
return [<span class={`el-tag el-tag--${type} el-tag--plain`}>{value}</span>]
|
|
|
|
}
|
|
|
|
}
|