Commit 0af197059fa3bd183280c1f155a77c0b800a2dff
1 parent
54059564
v3.8.3 添加页签openPage支持传递参数
Showing
2 changed files
with
5 additions
and
3 deletions
yudao-ui-admin/src/plugins/tab.js
| @@ -55,10 +55,10 @@ export default { | @@ -55,10 +55,10 @@ export default { | ||
| 55 | return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute); | 55 | return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute); |
| 56 | }, | 56 | }, |
| 57 | // 添加tab页签 | 57 | // 添加tab页签 |
| 58 | - openPage(title, url) { | 58 | + openPage(title, url, params) { |
| 59 | var obj = { path: url, meta: { title: title } } | 59 | var obj = { path: url, meta: { title: title } } |
| 60 | store.dispatch('tagsView/addView', obj); | 60 | store.dispatch('tagsView/addView', obj); |
| 61 | - return router.push(url); | 61 | + return router.push({ path: url, query: params }); |
| 62 | }, | 62 | }, |
| 63 | // 修改tab页签 | 63 | // 修改tab页签 |
| 64 | updatePage(obj) { | 64 | updatePage(obj) { |
yudao-ui-admin/src/views/infra/codegen/index.vue
| @@ -292,7 +292,9 @@ export default { | @@ -292,7 +292,9 @@ export default { | ||
| 292 | /** 修改按钮操作 */ | 292 | /** 修改按钮操作 */ |
| 293 | handleEditTable(row) { | 293 | handleEditTable(row) { |
| 294 | const tableId = row.id; | 294 | const tableId = row.id; |
| 295 | - this.$router.push("/codegen/edit/" + tableId); | 295 | + const tableName = row.tableName || this.tableNames[0]; |
| 296 | + const params = { pageNum: this.queryParams.pageNum }; | ||
| 297 | + this.$tab.openPage("修改[" + tableName + "]生成配置", '/codegen/edit/' + tableId, params); | ||
| 296 | }, | 298 | }, |
| 297 | /** 删除按钮操作 */ | 299 | /** 删除按钮操作 */ |
| 298 | handleDelete(row) { | 300 | handleDelete(row) { |