微调
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { isArray } from '@/utils/is'
|
import { isArray, isNumber } from '@/utils/is'
|
||||||
import { FieldNamesProps } from '@/components/ProTable/interface'
|
import { FieldNamesProps } from '@/components/ProTable/interface'
|
||||||
|
|
||||||
const mode = import.meta.env.VITE_ROUTER_MODE
|
const mode = import.meta.env.VITE_ROUTER_MODE
|
||||||
@@ -239,7 +239,8 @@ export function getKeepAliveRouterName(menuList: Menu.MenuOptions[], keepAliveNa
|
|||||||
export function formatTableColumn(row: number, col: number, callValue: any) {
|
export function formatTableColumn(row: number, col: number, callValue: any) {
|
||||||
// 如果当前值为数组,使用 / 拼接(根据需求自定义)
|
// 如果当前值为数组,使用 / 拼接(根据需求自定义)
|
||||||
if (isArray(callValue)) return callValue.length ? callValue.join(' / ') : '/'
|
if (isArray(callValue)) return callValue.length ? callValue.join(' / ') : '/'
|
||||||
return (callValue && callValue.length > 0) ? callValue : '/'
|
if (isNumber(callValue)) return callValue
|
||||||
|
return callValue ?? "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -250,7 +251,8 @@ export function formatTableColumn(row: number, col: number, callValue: any) {
|
|||||||
export function formatValue(callValue: any) {
|
export function formatValue(callValue: any) {
|
||||||
// 如果当前值为数组,使用 / 拼接(根据需求自定义)
|
// 如果当前值为数组,使用 / 拼接(根据需求自定义)
|
||||||
if (isArray(callValue)) return callValue.length ? callValue.join(' / ') : '/'
|
if (isArray(callValue)) return callValue.length ? callValue.join(' / ') : '/'
|
||||||
return (callValue && callValue.length > 0) ? callValue : '/'
|
if (isNumber(callValue)) return callValue
|
||||||
|
return callValue ?? "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user