Starter 要做什麼
先看見缺口,再完成一個小修改。
本主題檔案:files/main.js
定位:先用 Vue.isRef(count) 與 count.value 證明目前拿到的是 ref。
Starter · code-edit
先看見缺口,再完成一個小修改。
先看見缺口,再完成一個小修改。
本主題檔案:files/main.js
定位:先用 Vue.isRef(count) 與 count.value 證明目前拿到的是 ref。
頁面不會替你修改檔案;請在實作檔完成後重新整理確認。
count ref=1,template 顯示 1。
before=1、after=2、templateText=2、isRef=true。
const count=Vue.ref(1); count.value++; template 使用 {{ count }}。只在本階段資料夾內操作,避免改到其他章節。
index.htmlstyle.cssmain.js證據:isRef=true、before=1、after=2、templateText=2
前往 Checkpoint →