-
-
Notifications
You must be signed in to change notification settings - Fork 484
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Hi there!
In recent versions of volar, I'm getting an error `Cannot find name '<variable_from_script_setup>'.ts(2304) on any prop variable used in templates.
Bug seems to be introduced in 0.26.1
Code:
<template lang="pug">
li(class="py-1")
router-link(:to="to") // Cannot find name 'to'.ts(2304)
span(class="Icon")
component(:is="iconComponents[icon]") // Cannot find name 'icon'.ts(2304)
span {{ text }} // Cannot find name 'text'.ts(2304)
</template>
<script setup>
import { defineProps } from 'vue'
import IconUsers from '/@/components/icons/Users.vue'
const iconComponents = {
'users': IconUsers
}
defineProps({
to: {
type: String,
default: '/'
},
icon: {
type: String,
default: ''
},
text: {
type: String,
default: ''
}
})
</script>
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working