非响应式案例
作者:互联网
<template>
<div id="app">
<ul>
<li v-for="item in list" :key="item">{{item}}</li>
</ul>
</div>
</template>
<script>
export default {
data(){
return{
list:['1','2','3']
}
},
mounted(){
// this.list[0] = '998';
this.$set(this.list,0,998)
console.log(this.list)
}
}
</script>
标签:set,return,log,响应,list,998,案例,item 来源: https://www.cnblogs.com/Listener-wy/p/15877622.html