摘要:
1.ref:接受一个内部值并返回一个响应式且可变的 ref 对象。ref 对象仅有一个 .value property,指向该内部值。 注意:被ref包装之后需要.value 来进行赋值,因为使用ref包装,返回的是一个对象,Ref TS对应的接口 <template> <button @click 阅读全文
摘要:
1.在script标签中声明一个变量:message,可以直接在template模版中直接使用: <template> <div>{{ message }}</div> </template> <script setup lang="ts"> const message = "你好,vue3" </ 阅读全文