我想在保存实体车辆后重新加载路线“sw.vehicles.list”,该怎么做?我用过window.reload()
,但是不起作用!你能帮帮我吗?
methods: {
async onStartProcess(e) {
this.isLoading = true;
this.sw_vehicles = this.repository.create(Shopware.Context.api);
if(data[i]['name']) this.sw_vehicles.vehicleName= data[i]['name'];
if(data[i]['type']) this.sw_vehicles.vehicleType = data[i]['type'];
this.repository.save(this.sw_vehicles, Shopware.Context.api).then(() => {
this.isLoading = false;
this.processSuccess = true;
this.$router.push({ name: 'sw.vehicles.list' });
// reload the page "sw.vehicles.list"
}).catch((exception) => {
this.isLoading = false;
this.createNotificationError({
title: this.$t('sw-vehicles.import.errorTitle'),
message: exception
});
});
}
}
}
},
saveFinish(e) {
this.processSuccess = false;
},
}
1条答案
按热度按时间k0pti3hp1#
理想情况下,您不希望在使用React式框架时重新加载整个页面,但这仍然是一个诀窍:
boolean参数仅用于Firefox中断该高速缓存。