Open
Description
使用 setup
的写法, Demo 就会报错了, 好像这种代码会被放到 scriptSetup
属性中, 而不是 script
里面 ?
<noscript type="vue-sfc" component="MyComponent" mount="#app">
<script setup>
import {ref, } from 'vue';
let count = ref(0);
</script>
<template>
<button @click="count++">Count is: {{ count }}</button>
</template>
<style scoped>
button {font-weight: bold;}
</style>
</noscript>
<div id="app"></div>
<script src="https://unpkg.com/noscript-sfc/index.js"></script>
# 错误信息
vue.esm-browser.js:1513 [Vue warn]: Cannot mutate <script setup> binding "count" from Options API.
Metadata
Metadata
Assignees
Labels
No labels