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 RoleColumnSolts: VxeColumnPropTypes.Slots = {
|
2022-10-25 17:29:28 +08:00
|
|
|
default: ({ row, column }) => {
|
|
|
|
const cellValue = row[column.field]
|
2024-03-29 21:14:11 +08:00
|
|
|
const type = cellValue === "admin" ? "primary" : "warning"
|
2022-10-25 18:36:41 +08:00
|
|
|
return [<span class={`el-tag el-tag--${type} el-tag--plain`}>{cellValue}</span>]
|
2022-10-25 17:29:28 +08:00
|
|
|
}
|
|
|
|
}
|