fix: 在任务新窗口使用显示文件窗口错误的情况

This commit is contained in:
kuaifan 2023-08-10 20:18:42 +08:00
parent d7620bf4ff
commit c768395094
2 changed files with 21 additions and 4 deletions

View File

@ -2468,10 +2468,7 @@ export default {
break;
case 'filepos':
if (this.windowPortrait) {
this.$store.dispatch("openDialog", 0);
}
this.goForward({name: 'manage-file', params: value});
this.$store.dispatch("filePos", value);
break;
case 'link':

View File

@ -257,6 +257,7 @@ export default {
} else {
reject({ret: -1, data: {}, msg: "System error"})
}
console.error(xhr, status);
}
// WebSocket
if (params.websocket === true) {
@ -410,6 +411,25 @@ export default {
}
},
/**
* 显示文件打开文件所在位置
* @param state
* @param dispatch
* @param params
*/
filePos({state, dispatch}, params) {
if ($A.isSubElectron) {
$A.execMainDispatch("filePos", params)
$A.Electron.sendMessage('mainWindowActive');
return
}
dispatch('openTask', 0)
if (state.windowPortrait) {
dispatch("openDialog", 0);
}
$A.goForward({name: 'manage-file', params});
},
/**
* 切换面板变量
* @param state