mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-11-21 01:13:16 +08:00
refactor(type): remove useless any (#5200)
Signed-off-by: Sepush <sepush@outlook.com>
This commit is contained in:
parent
853ed177b3
commit
dda96f3d06
@ -63,7 +63,7 @@ export default function useFormItem<T extends AllowedSize = FormItemSize> (
|
||||
mergedSize
|
||||
? () => mergedSize(NFormItem)
|
||||
: () => {
|
||||
const { size } = props as any
|
||||
const { size } = props
|
||||
if (size) return size
|
||||
if (NFormItem) {
|
||||
const { mergedSize } = NFormItem
|
||||
|
@ -222,7 +222,7 @@ export default defineComponent({
|
||||
const { labelField } = props
|
||||
return (pattern: string, node: TreeSelectOption): boolean => {
|
||||
if (!pattern.length) return true
|
||||
return ((node as any)[labelField] as string)
|
||||
return (node[labelField] as string)
|
||||
.toLowerCase()
|
||||
.includes(pattern.toLowerCase())
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ export function treeOption2SelectOption (
|
||||
const { rawNode } = tmNode
|
||||
return {
|
||||
...rawNode,
|
||||
label: (rawNode as any)[labelField] as string,
|
||||
label: rawNode[labelField] as string,
|
||||
value: tmNode.key
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ export function useMergedCheckStrategy (props: {
|
||||
}
|
||||
|
||||
export function isNodeDisabled (node: TmNode, disabledField: string): boolean {
|
||||
return !!(node.rawNode as any)[disabledField]
|
||||
return !!node.rawNode[disabledField]
|
||||
}
|
||||
|
||||
function traverse (
|
||||
|
Loading…
Reference in New Issue
Block a user