<script> and <script setup> must have the same language type.
时间: 2023-12-13 17:05:33 浏览: 309
script language
This error message is displayed in Vue.js when the language type used in `<script>` and `<script setup>` blocks are different.
The `<script>` block is used for declaring component options and writing component logic while the `<script setup>` block is used for setting up reactive variables and props. Both blocks must use the same language type, either JavaScript or TypeScript.
To fix this error, ensure that the language type used in both blocks is consistent. For example, if you are using JavaScript in the `<script>` block, make sure to use JavaScript in the `<script setup>` block as well.
阅读全文