路由变更后建议手动刷新

This commit is contained in:
pixelqm
2019-09-20 18:17:04 +08:00
parent 2733878067
commit bbb6e00a95
2 changed files with 14 additions and 17 deletions
@@ -80,7 +80,6 @@
<script>
import { getMenuList, addBaseMenu, deleteBaseMenu } from '@/api/menu'
import { mapActions } from 'vuex'
export default {
name: 'Menus',
data() {
@@ -104,7 +103,6 @@ export default {
}
},
methods: {
...mapActions('router',['SetAsyncRouter']),
handleSizeChange(val) {
this.pageSize = val
this.getMenuList()
@@ -121,12 +119,13 @@ export default {
})
.then(async () => {
const res = await deleteBaseMenu({ ID })
this.$message({
type: 'success',
message: '删除成功!'
})
this.getMenuList()
this.SetAsyncRouter()
if (res.success) {
this.$message({
type: 'success',
message: '删除成功!'
})
this.getMenuList()
}
})
.catch(() => {
this.$message({