📖 文章摘要
Composition API 核心 Vue 3 的 Composition API 提供了更灵活的逻辑复用方式。 ref vs reactive - `ref`: 包装基础类型 -
Composition API 核心
Vue 3 的 Composition API 提供了更灵活的逻辑复用方式。
ref vs reactive
ref: 包装基础类型reactive: 包装对象
<script setup>
const count = ref(0)
const state = reactive({ name: 'test' })
</script>
生命周期
onMounted, onUnmounted 等 hook 替代了选项式的生命周期。
最后更新:2026年6月29日CC BY-NC-SA 4.0
评论
暂无评论,来写第一条吧
