随笔分类 - 学习笔记
摘要:1、defineProps 父传子 defineProps({ 参数名:{ type: 参数类型, default:'默认值' } }) const prpos = defineProps({ 参数名:{ type: 参数类型, default:'默认值' } }) 2、ts defineProps
阅读全文
摘要:import { onBeforeMount, onMounted, onBeforeUpdate, onUpdated, onBeforeUnmount, onUnmounted} from "vue" 1、onBeforeMount创建 onBeforeMount(()=>{ // 创建之前 }
阅读全文
摘要:import {watch, watchEffect} from "vue" 1、watch 监听属性 let message = ref({ foo:{ bar:{ name:'aaa' } } }) watch(message,(newVal,oldVal)=>{ console.log(new
阅读全文
摘要:import {computed} from "vue" 1、computed 例: const name = computed(()=>{ return aaa })
阅读全文
摘要:import { ref, reactive, isRef, shallowRef, shallowReactive, toRef, toRefs, toRaw, readonly, triggerRef, customRef} from "vue" 1、ref 全家桶 ref: 深层数据响应 全类
阅读全文
浙公网安备 33010602011771号