-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Open
Labels
Description
Version
3.2.26
Reproduction link
Steps to reproduce
I created the project with vite and installed @ vitejs / plugin Vue JSX and typescript, vue3 2.26. In < script lang = "TSX" setup >, create an array object with reactive two-way binding. Modify the ‘label’ field of the first object in the code and save the code. However, the web page is not hot updated and needs to be refreshed before it can be updated, but you can use < script lang = "TSX" >
Exports with definecomponent are hot updated. I don't know if there is a problem with my vite configuration or writing method
Woo woo woo~~
The codes that cannot be hot updated are as follows:
{{ columns[0].label }} <script lang="tsx" setup> import { reactive, defineComponent } from 'vue' const columns = reactive([ { prop: 'id', label: 'wsw', align: 'left', fixed: true, minWidth: 105, }, ]) </script> Code that can be hot updated: {{ columns[0].label }} <script lang="tsx"> import { reactive, defineComponent } from 'vue' export default defineComponent({ setup() { const columns = reactive([ { prop: 'id', label: 'wsw', align: 'left', fixed: true, minWidth: 105, }, ]) return { columns, } }, }) </script>What is expected?
It is expected that the label of the array object is modified and the code is saved. The web page should be updated in real time, but < script lang = "TSX" setup > can't, < script lang = "TSX" > can
What is actually happening?
< script lang = "TSX" setup > can't hot update, < script lang = "TSX" > can hot update