You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vue.autoInsert.dotValue incorrectly inserts .value in Vue template #6272
After updating VS Code or the Vue (Official) extension, the vue.autoInsert.dotValue setting appears to insert .value in both <script setup> and <template> sections.
Previously, automatic .value insertion worked in the script section only, which was the expected behavior for my workflow.
In Vue 3 templates, top-level refs declared in<script setup> are automatically unwrapped, so adding .value unnecessarily can cause incorrect code and TypeScript errors.
package.json dependencies
Steps to reproduce
Install the Vue (Official) extension.
Set "vue.autoInsert.dotValue": true.
Create a Vue 3 Single File Component using <script setup lang="ts">.
Declare a ref, for example const userArr = ref([]).
Type userArr in the script section and then in the template section.
What is expected?
In <script setup>, typing a ref variable should automatically insert .value.
In , typing the same ref variable should not automatically insert .value.
What is actually happening?
Automatic .value insertion also occurs in the template section.
Activity