New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
source.addMissingImports auto import props field #2304
Comments
Same here, it keep trying to add the import even though there is already a prop defined with the same name Edit: This issue is in version Volar 1.0.24, and downgrading the extension to 1.0.22 fixes it for me |
I am also running into this for globally registered components in a Old behavior is a template like this works just fine without automatically adding imports: <script setup lang="ts">
import AppMain from '@/components/AppMain.vue';
import AppMainHeader from '@/components/AppMainHeader.vue';
</script>
<template>
<AppMain>
<AppMainHeader class="mb-6" />
<v-card>
<router-view />
</v-card>
</AppMain>
</template> New behavior is after saving it looks like this: <script setup lang="ts">
import AppMain from '@/components/AppMain.vue';
import AppMainHeader from '@/components/AppMainHeader.vue';
import { RouterView } from 'vue-router'; // automatically added
import { VCard } from 'vuetify/lib'; // automatically added
</script>
<template>
<AppMain>
<AppMainHeader class="mb-6" />
<v-card>
<router-view />
</v-card>
</AppMain>
</template> I found that I can work around this by defining |
Since |
enable takeover mode: yes
vscode settings:
2023-01-10.16.27.49.mov
The text was updated successfully, but these errors were encountered: