在Vue3组合式API中,以下代码片段执行后,点击按钮会出现什么结果?代码:<script setup> import { ref } from 'vue'; const count = ref(0); const increment = () => { count = count + 1; }; </script> <template> <button @click="increment">{{ count }}</button> </template>
点击按钮后count变为1,模板同步更新
点击按钮时触发错误,无法修改count的引用
点击按钮后count变为1,但模板不更新
代码编译报错,count不能与数字直接相加