Open
Description
`<script setup lang="ts">
import { reactive, isReactive } from "vue"
const state = { count: 1 }
// Objetc.freeze()对 state对象进行密封 state此时为只读属性
Object.freeze(state)
// 再将原始对象传入reactive
函数中 就得到了和原始对象相等的响应式对象
const reactiveState = reactive(state)
/**
- Modify the code so that we can make the output be true.
*/
console.log(reactiveState === state)
/**
- Modify the code so that we can make the output be false.
*/
const info = Object.freeze({ count: 1 })
const reactiveInfo = reactive(info)
console.log(isReactive(reactiveInfo))
</script>{{ reactiveState.count }}