onShow: Refresh too frequently, poor performance
$on, $emit
list page (previous page):
onLoad() {
uni.$on('refreshData', () => {
this.getList();
})
},
Details page (current page): Return to the previous page after modifying the list
this.$refs.uToast.show({
message: "修改成功",
type: "success",
complete() {
uni.$emit('refreshData');
uni.navigateBack(1)
}
})