Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-20 10:59:21 +08:00

chore: fix typo

This commit is contained in:
pany 2024-12-03 14:51:09 +08:00
parent a3f6c45866
commit 8d2f240381
3 changed files with 6 additions and 6 deletions

View File

@ -3,8 +3,8 @@ import type { TableResponseData } from "@@/apis/table/type"
import type { ElMessageBoxOptions } from "element-plus"
import type { VxeFormInstance, VxeFormProps, VxeGridInstance, VxeGridProps, VxeModalInstance, VxeModalProps } from "vxe-table"
import { deleteTableDataApi, getTableDataApi } from "@@/apis/table"
import { RoleColumnSolts } from "./tsx/RoleColumnSolts"
import { StatusColumnSolts } from "./tsx/StatusColumnSolts"
import { RoleColumnSlots } from "./tsx/RoleColumnSlots"
import { StatusColumnSlots } from "./tsx/StatusColumnSlots"
defineOptions({
//
@ -103,7 +103,7 @@ const xGridOpt: VxeGridProps = reactive({
field: "roles",
title: "角色",
/** 自定义列与 type: "html" 的列一起使用,会产生错误,所以采用 TSX 实现 */
slots: RoleColumnSolts
slots: RoleColumnSlots
},
{
field: "phone",
@ -116,7 +116,7 @@ const xGridOpt: VxeGridProps = reactive({
{
field: "status",
title: "状态",
slots: StatusColumnSolts
slots: StatusColumnSlots
},
{
field: "createTime",

View File

@ -1,6 +1,6 @@
import type { VxeColumnPropTypes } from "vxe-table/types/column"
export const RoleColumnSolts: VxeColumnPropTypes.Slots = {
export const RoleColumnSlots: VxeColumnPropTypes.Slots = {
default: ({ row, column }) => {
const cellValue = row[column.field]
const type = cellValue === "admin" ? "primary" : "warning"

View File

@ -1,6 +1,6 @@
import type { VxeColumnPropTypes } from "vxe-table/types/column"
export const StatusColumnSolts: VxeColumnPropTypes.Slots = {
export const StatusColumnSlots: VxeColumnPropTypes.Slots = {
default: ({ row, column }) => {
const cellValue = row[column.field]
const [type, value] = cellValue ? ["success", "启用"] : ["danger", "禁用"]