mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-08 10:08:47 +08:00
refactor: ♻️ 移除与isDef互斥的isNone (#681)
This commit is contained in:
parent
8fffaa646a
commit
4246548552
@ -358,10 +358,6 @@ export function isNotUndefined<T>(value: T): value is NotUndefined<T> {
|
|||||||
return !isUndefined(value)
|
return !isUndefined(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isNone(value: any): value is null | undefined {
|
|
||||||
return value === null || value === void 0
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查给定的值是否为奇数
|
* 检查给定的值是否为奇数
|
||||||
* @param value 要检查的值
|
* @param value 要检查的值
|
||||||
|
|||||||
@ -63,7 +63,7 @@ import { useCell } from '../composables/useCell'
|
|||||||
import { useParent } from '../composables/useParent'
|
import { useParent } from '../composables/useParent'
|
||||||
import { FORM_KEY } from '../wd-form/types'
|
import { FORM_KEY } from '../wd-form/types'
|
||||||
import { cellProps } from './types'
|
import { cellProps } from './types'
|
||||||
import { isNone } from '../common/util'
|
import { isDef } from '../common/util'
|
||||||
|
|
||||||
const props = defineProps(cellProps)
|
const props = defineProps(cellProps)
|
||||||
const emit = defineEmits(['click'])
|
const emit = defineEmits(['click'])
|
||||||
@ -71,7 +71,7 @@ const emit = defineEmits(['click'])
|
|||||||
const cell = useCell()
|
const cell = useCell()
|
||||||
|
|
||||||
const isBorder = computed(() => {
|
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)
|
const { parent: form } = useParent(FORM_KEY)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user