-
-
Notifications
You must be signed in to change notification settings - Fork 928
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: pany <[email protected]>
- Loading branch information
Showing
3 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...s/table/vxe-table/tsx/RoleColumnSolts.tsx → ...s/table/vxe-table/tsx/RoleColumnSlots.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { type VxeColumnPropTypes } from "vxe-table/types/column" | ||
|
||
const solts: VxeColumnPropTypes.Slots = { | ||
const slots: VxeColumnPropTypes.Slots = { | ||
default: ({ row, column }) => { | ||
const cellValue = row[column.field] | ||
const type = cellValue === "admin" ? "primary" : "warning" | ||
return [<span class={`el-tag el-tag--${type} el-tag--plain`}>{cellValue}</span>] | ||
} | ||
} | ||
|
||
export default solts | ||
export default slots |
4 changes: 2 additions & 2 deletions
4
...table/vxe-table/tsx/StatusColumnSolts.tsx → ...table/vxe-table/tsx/StatusColumnSlots.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { type VxeColumnPropTypes } from "vxe-table/types/column" | ||
|
||
const solts: VxeColumnPropTypes.Slots = { | ||
const slots: VxeColumnPropTypes.Slots = { | ||
default: ({ row, column }) => { | ||
const cellValue = row[column.field] | ||
const [type, value] = cellValue ? ["success", "启用"] : ["danger", "禁用"] | ||
return [<span class={`el-tag el-tag--${type} el-tag--plain`}>{value}</span>] | ||
} | ||
} | ||
|
||
export default solts | ||
export default slots |