案例
<template>
<div v-for="(item, index) in list">{{item.name}}</div>
</template>
<script>
import { reactive } from '@vue/reactivity'
export default {
setup(){
let list = reactive([
{name: 1},
{name: 2},
{name: 3},
{name: 4},
{name: 5},
])
return {
list
}
}
}
</script>
网友评论