摘要: <template> <div>{{ obj.name }}</div> <div>{{ obj.age }}</div> </template> <script setup lang="ts"> import { ref, reactive, onBeforeMount, onMounted, o 阅读全文
posted @ 2022-07-15 17:25 银河游鱼 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 1.watchEffect:会自动调用一次,具有惰性; <template> <div>{{ obj.name }}</div> <div>{{ obj.age }}</div> </template> <script setup lang="ts"> import { ref, reactive, 阅读全文
posted @ 2022-07-15 15:38 银河游鱼 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 1.watch的基本使用 <template> <div>{{ obj.name }}</div> <div>{{ obj.age }}</div> <button @click="handleClick">修改</button> </template> <script setup lang="ts 阅读全文
posted @ 2022-07-15 14:59 银河游鱼 阅读(73) 评论(0) 推荐(0) 编辑