[TS] Fix ts-strict errors in Vue components (Part 4) (#3134)

This commit is contained in:
Chenlei Hu
2025-03-18 20:42:32 -04:00
committed by GitHub
parent 8997ff4b2a
commit db43f587a6
11 changed files with 15 additions and 96 deletions

View File

@@ -131,7 +131,7 @@ const onNodeContentClick = async (
}
emit('nodeClick', node, e)
}
const menu = ref(null)
const menu = ref<InstanceType<typeof ContextMenu> | null>(null)
const menuTargetNode = ref<RenderedTreeExplorerNode | null>(null)
const extraMenuItems = computed(() => {
return menuTargetNode.value?.contextMenuItems

View File

@@ -68,9 +68,9 @@ onMounted(async () => {
await validateUrl(props.modelValue)
})
const handleInput = (value: string) => {
const handleInput = (value: string | undefined) => {
// Update internal value without emitting
internalValue.value = cleanInput(value)
internalValue.value = cleanInput(value ?? '')
// Reset validation state when user types
validationState.value = ValidationState.IDLE
}