2022-10-25 17:29:28 +08:00
|
|
|
import { type VxeColumnPropTypes } from "vxe-table/types/column"
|
|
|
|
|
|
|
|
const solts: VxeColumnPropTypes.Slots = {
|
|
|
|
default: ({ row, column }) => {
|
|
|
|
const cellValue = row[column.field]
|
|
|
|
const type = cellValue === "admin" ? "" : "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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default solts
|