提交 2091937c 编写于 作者: B big_sun_962464

Thu Jul 4 15:19:00 CST 2024 inscode

上级 b2e8c670
......@@ -24,6 +24,8 @@ const obj={
name:'普通obj'
}
const msg = ref("你好!")
const refMsg = ref({
msg:"欢迎使用VUE3.0"
})
......@@ -31,6 +33,14 @@ const shallowRefMsg = shallowRef({
msg:"欢迎使用VUE3.1"
})
const refObjMsg = ref({
msg:ref({
obj:ref("你好")
})
})
console.log(msg)
const refCom = ref({
name:'Com1',
com:Com1
......@@ -66,9 +76,24 @@ function changeCom(){
}
}
useFeature(refMsg)
const count = ref(0)
const object = {
id:ref(1)
}
const id = object.id
console.log(object,id)
const object1 = ref({
id:ref(1)
})
console.log(object1)
</script>
<template>
<p>{{count + 1}}</p>
<p>{{ object.id +1 }}</p>
<p>{{ id +2 }}</p>
<p>{{ refObjMsg }}</p>
<p>{{ refMsg }}</p>
<button @click="changeMsg">changeMsg</button>
<p>{{ shallowRefMsg }}</p>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册