//这是vue methods中的一个方法
deleteCarEvent(carID){
    const _this = this;
    console.log('要删除的carID为:' + carID)
    deleteCar(carID).then(function(resolve){
        console.log(resolve)
        //ES6快速删除某条元素的方法
        _this.carList.splice( _this.carList.findIndex(item => item.carID === carID), 1)
    }, reject => {
        Toast('删除失败');
    })
},
Logo

前往低代码交流专区

更多推荐