vue3 #ref #reactive

阅读 29

2024-02-25

一、ref 函数将简单类型的数据包装为响应式数据

import { ref } from 'vue' 

const count = ref(10)

一、reactive函数将复杂类型的数据包装为响应式数据

import { reactive} from 'vue' 

const obj= reactive({

    name : 'zs',

    age : 18

})

相关推荐

精彩评论(0)

0 0 举报