随笔分类 - vue3
vue3 主要学习记录
摘要:获取值let but = ref(null) onMounted(() => { console.log(but.value.innerHTML); // <div ref="but">小猪课堂</div> }); 获取href console.log(but.value.getAttribute(
阅读全文
摘要:<script setup> import { ref,computed,watch } from 'vue' const num = ref(1) const name = ref('ming') const obj = ref({name:'小明',age:30}) //watch 简单类型 /
阅读全文
摘要:<script setup> import { ref,computed } from 'vue' const msg = ref(1) const clickMsg = () =>{ msg.value++; console.log('+++')} const clickMsgjj = () =>
阅读全文
摘要:<script setup> import { ref } from 'vue' const msg = ref(1) const clickMsg = () =>{ msg.value++; console.log('+++')} const clickMsgjj = () =>{ msg.val
阅读全文
摘要:<script setup> const msg = '信息详情' const clickMsg = () =>{ console.log(2223323)} </script> <template> <div>{{ msg }}</div><br> <button @click="clickMsg
阅读全文