摘要:
1 // 还是这2个数据源 2 const firstName = ref<string>('Bill') 3 const lastName = ref<string>('Gates') 4 5 // 这里我们配合setter的需要,改成了另外一种写法 6 const fullName = comp 阅读全文
posted @ 2022-07-09 10:10
googlegis
阅读(1506)
评论(0)
推荐(0)
摘要:
1 // 不要忘了导入要用的 API 2 import { defineComponent, reactive, watch } from 'vue' 3 4 export default defineComponent({ 5 setup() { 6 // 定义一个响应式数据 7 const us 阅读全文
posted @ 2022-07-09 09:28
googlegis
阅读(3471)
评论(0)
推荐(1)
摘要:
内容来自于: https://vue3.chengpeiquan.com/component.html#变量的读取与赋值-1 如果你使用常规的重置,会导致这个变量失去响应性: 1 /** 2 * 不推荐使用这种方式 3 * 异步添加数据后,模板不会响应更新 4 */ 5 let uids: numb 阅读全文
posted @ 2022-07-09 09:05
googlegis
阅读(2471)
评论(0)
推荐(0)