06 2022 档案
摘要:1. 监听基本类型数据 const num= ref(9) watch(num,(newValue,oldValue)=>{ console.log('watch innier', newValue) } ) 2. 监听复杂类型的数据 const list= reactive({ name: '张三
阅读全文
摘要:vue3解决子组件onMounted在父组件之前完成onMounted 在子组件监听props watch( //监听props里面的某个对象users,这里是 () =>{return props.users}的简写, () => props.users, (newValue, oldValue)
阅读全文
摘要:Git 从远程分支拉取代码到本地(合并他人分支) git pull origin '' 创建新分支同时切换到新分支上面 git checkout -b newBranch 拉取代码的时候 将本地分支暂存 git stash 将本地分支从暂存区抛出来 git stash pop 查看stash列表 g
阅读全文
摘要:Vue3 子组件调用父组件方法 //父组件: <video-card @getInitialData="getInitialData"/> // 子组件: //将子组件自己的方法写到emit里面 const emit = defineEmits(["initData"]); const initDa
阅读全文