Solution · code-edit

ref 與 reactive 選擇

對照完整答案、責任邊界與原因。

Solution 要做什麼

對照完整答案、責任邊界與原因。

本主題檔案:files/main.js

定位:先用 isRef/isReactive 檢查容器,再依容器選更新語法。

本階段驗收

頁面不會替你修改檔案;請在實作檔完成後重新整理確認。

目前要處理

query 空字串、form.email 空字串。

預期看到

queryIsRef=true、formIsReactive=true、queryAfter=vue、emailAfter=david@example.com。

const query=ref(''); const form=reactive({email:''}); query.value='vue'; form.email='david@example.com'。

檔案清單

只在本階段資料夾內操作,避免改到其他章節。

證據:queryIsRef/formIsReactive=true,queryAfter/emailAfter 正確

回到主題說明