出現原因: 在生成的頁面數據中,刪除其中一個;
解決方法: 頁面中的數據是使用vue -》 v-for 綁定的;
使用的方法為
methods: {
dt(index, planDetail) {
var a = confirm("確認刪除此任務?");
if(a == true){
this.plan.splice(this.plan.indexOf(planDetail),1);
}
}
}
其中,一定要確認plan 和 planDetail的數據是否正確;