refactor: ♻️ 移除与isDef互斥的isNone (#681)

This commit is contained in:
不如摸鱼去 2024-10-24 22:12:19 +08:00 committed by GitHub
parent 8fffaa646a
commit 4246548552
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 6 deletions

View File

@ -358,10 +358,6 @@ export function isNotUndefined<T>(value: T): value is NotUndefined<T> {
return !isUndefined(value)
}
export function isNone(value: any): value is null | undefined {
return value === null || value === void 0
}
/**
*
* @param value

View File

@ -63,7 +63,7 @@ import { useCell } from '../composables/useCell'
import { useParent } from '../composables/useParent'
import { FORM_KEY } from '../wd-form/types'
import { cellProps } from './types'
import { isNone } from '../common/util'
import { isDef } from '../common/util'
const props = defineProps(cellProps)
const emit = defineEmits(['click'])
@ -71,7 +71,7 @@ const emit = defineEmits(['click'])
const cell = useCell()
const isBorder = computed(() => {
return Boolean(!isNone(props.border) ? props.border : cell.border.value)
return Boolean(isDef(props.border) ? props.border : cell.border.value)
})
const { parent: form } = useParent(FORM_KEY)