随笔分类 -  学习笔记

摘要:1、defineProps 父传子 defineProps({ 参数名:{ type: 参数类型, default:'默认值' } }) const prpos = defineProps({ 参数名:{ type: 参数类型, default:'默认值' } }) 2、ts defineProps 阅读全文
posted @ 2023-04-20 15:59 小学生丶Ray 阅读(47) 评论(0) 推荐(0)
摘要:import { onBeforeMount, onMounted, onBeforeUpdate, onUpdated, onBeforeUnmount, onUnmounted} from "vue" 1、onBeforeMount创建 onBeforeMount(()=>{ // 创建之前 } 阅读全文
posted @ 2023-04-20 15:55 小学生丶Ray 阅读(37) 评论(0) 推荐(0)
摘要:import {watch, watchEffect} from "vue" 1、watch 监听属性 let message = ref({ foo:{ bar:{ name:'aaa' } } }) watch(message,(newVal,oldVal)=>{ console.log(new 阅读全文
posted @ 2023-04-20 15:54 小学生丶Ray 阅读(39) 评论(0) 推荐(0)
摘要:import {computed} from "vue" 1、computed 例: const name = computed(()=>{ return aaa }) 阅读全文
posted @ 2023-04-20 15:53 小学生丶Ray 阅读(27) 评论(0) 推荐(0)
摘要:import { ref, reactive, isRef, shallowRef, shallowReactive, toRef, toRefs, toRaw, readonly, triggerRef, customRef} from "vue" 1、ref 全家桶 ref: 深层数据响应 全类 阅读全文
posted @ 2023-04-20 15:49 小学生丶Ray 阅读(38) 评论(0) 推荐(0)