<template>
<div class='box'>
{{ abc[0] }}
</div>
</template>
<script lang='ts' setup>
import { ref, reactive, computed, onMounted, nextTick, PropType } from 'vue';
const abc = reactive(['a', 'b', 'c', 'd', 'e'])
setTimeout(() => {
abc[0] = 'kslfjlskfdjs'
}, 2000)
</script>
<style lang='scss' scoped></style>
结论
经测试通过数组索引修改数组字内容,可以响应式
前端工程师、程序员