12 lines
351 B
TypeScript
Raw Normal View History

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>]
}
}
export default solts