Skip to content

Commit

Permalink
添加页签openPage支持传递参数
Browse files Browse the repository at this point in the history
  • Loading branch information
yangzongzhuan committed Apr 8, 2022
1 parent 6f7b023 commit f7b7612
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ruoyi-ui/src/plugins/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export default {
return store.dispatch('tagsView/delOthersViews', obj || router.currentRoute);
},
// 添加tab页签
openPage(title, url) {
openPage(title, url, params) {
var obj = { path: url, meta: { title: title } }
store.dispatch('tagsView/addView', obj);
return router.push(url);
return router.push({ path: url, query: params });
},
// 修改tab页签
updatePage(obj) {
Expand Down
4 changes: 3 additions & 1 deletion ruoyi-ui/src/views/tool/gen/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ export default {
/** 修改按钮操作 */
handleEditTable(row) {
const tableId = row.tableId || this.ids[0];
this.$router.push({ path: '/tool/gen-edit/index/' + tableId, query: { pageNum: this.queryParams.pageNum } });
const tableName = row.tableName || this.tableNames[0];
const params = { pageNum: this.queryParams.pageNum };
this.$tab.openPage("修改[" + tableName + "]生成配置", '/tool/gen-edit/index/' + tableId, params);
},
/** 删除按钮操作 */
handleDelete(row) {
Expand Down

0 comments on commit f7b7612

Please sign in to comment.