![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
composition api
zjnkkl
这个作者很懒,什么都没留下…
展开
-
vue 计算属性和响应式对象
computed <template> <div id="app"> <p>姓名:{{ name }}</p> <p>年龄: <button type="button" @click="changeAge(-1)">-</button> {{ age }} <button type="button" @click="changeAge(1)">+</b原创 2021-09-24 14:31:48 · 517 阅读 · 0 评论 -
vue3 compositionapi初使用
setup函数和响应式对象 setup函数 1.使用composition api的入口 2.在beforecreate之前使用 3.在setup中没有this 4.返回对象中的属性可在模板中使用 ref 函数 1.返回一个响应式引用 2.name是一个响应式对象 <template> <div id="app"> <p>{{ name }}</p> <p>{{ age }} <button type="but原创 2021-09-24 10:11:06 · 56 阅读 · 0 评论