chore: fix typo
This commit is contained in:
parent
a3f6c45866
commit
8d2f240381
@ -3,8 +3,8 @@ import type { TableResponseData } from "@@/apis/table/type"
|
|||||||
import type { ElMessageBoxOptions } from "element-plus"
|
import type { ElMessageBoxOptions } from "element-plus"
|
||||||
import type { VxeFormInstance, VxeFormProps, VxeGridInstance, VxeGridProps, VxeModalInstance, VxeModalProps } from "vxe-table"
|
import type { VxeFormInstance, VxeFormProps, VxeGridInstance, VxeGridProps, VxeModalInstance, VxeModalProps } from "vxe-table"
|
||||||
import { deleteTableDataApi, getTableDataApi } from "@@/apis/table"
|
import { deleteTableDataApi, getTableDataApi } from "@@/apis/table"
|
||||||
import { RoleColumnSolts } from "./tsx/RoleColumnSolts"
|
import { RoleColumnSlots } from "./tsx/RoleColumnSlots"
|
||||||
import { StatusColumnSolts } from "./tsx/StatusColumnSolts"
|
import { StatusColumnSlots } from "./tsx/StatusColumnSlots"
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
// 命名当前组件
|
// 命名当前组件
|
||||||
@ -103,7 +103,7 @@ const xGridOpt: VxeGridProps = reactive({
|
|||||||
field: "roles",
|
field: "roles",
|
||||||
title: "角色",
|
title: "角色",
|
||||||
/** 自定义列与 type: "html" 的列一起使用,会产生错误,所以采用 TSX 实现 */
|
/** 自定义列与 type: "html" 的列一起使用,会产生错误,所以采用 TSX 实现 */
|
||||||
slots: RoleColumnSolts
|
slots: RoleColumnSlots
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "phone",
|
field: "phone",
|
||||||
@ -116,7 +116,7 @@ const xGridOpt: VxeGridProps = reactive({
|
|||||||
{
|
{
|
||||||
field: "status",
|
field: "status",
|
||||||
title: "状态",
|
title: "状态",
|
||||||
slots: StatusColumnSolts
|
slots: StatusColumnSlots
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "createTime",
|
field: "createTime",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import type { VxeColumnPropTypes } from "vxe-table/types/column"
|
import type { VxeColumnPropTypes } from "vxe-table/types/column"
|
||||||
|
|
||||||
export const RoleColumnSolts: VxeColumnPropTypes.Slots = {
|
export const RoleColumnSlots: VxeColumnPropTypes.Slots = {
|
||||||
default: ({ row, column }) => {
|
default: ({ row, column }) => {
|
||||||
const cellValue = row[column.field]
|
const cellValue = row[column.field]
|
||||||
const type = cellValue === "admin" ? "primary" : "warning"
|
const type = cellValue === "admin" ? "primary" : "warning"
|
@ -1,6 +1,6 @@
|
|||||||
import type { VxeColumnPropTypes } from "vxe-table/types/column"
|
import type { VxeColumnPropTypes } from "vxe-table/types/column"
|
||||||
|
|
||||||
export const StatusColumnSolts: VxeColumnPropTypes.Slots = {
|
export const StatusColumnSlots: VxeColumnPropTypes.Slots = {
|
||||||
default: ({ row, column }) => {
|
default: ({ row, column }) => {
|
||||||
const cellValue = row[column.field]
|
const cellValue = row[column.field]
|
||||||
const [type, value] = cellValue ? ["success", "启用"] : ["danger", "禁用"]
|
const [type, value] = cellValue ? ["success", "启用"] : ["danger", "禁用"]
|
Loading…
x
Reference in New Issue
Block a user