refactor(type): remove useless any (#5200)

Signed-off-by: Sepush <sepush@outlook.com>
This commit is contained in:
Artea 2023-12-18 19:09:24 +08:00 committed by GitHub
parent 853ed177b3
commit dda96f3d06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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())
}

View File

@ -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
}
}

View File

@ -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 (