09 2021 档案

摘要:只能是vue响应式中的值(包括ref,reactive定义的值) watch的使用场景: 可以监听ref定义的值,如果ref定义的值为一个基本类型的值 const name=ref<string>('tang') watch(name,()=>{}) const info=ref<{city:str 阅读全文
posted @ 2021-09-20 14:20 comyan 阅读(634) 评论(0) 推荐(0)
摘要:补充:vuex在vue3中使用mutation/actions/state/getters的几种形式说明* 1.在template直接使用,$store在template中不能识别会飘红但是不影响使用,去掉飘红在d.ts的文件中加上declare const $store:any 2.非辅助函数方式 阅读全文
posted @ 2021-09-15 22:39 comyan 阅读(456) 评论(0) 推荐(0)