perf: 优化查看任务修改历史

This commit is contained in:
kuaifan 2024-04-30 16:39:39 +08:00
parent 199fd4462e
commit dabe1376c3
3 changed files with 36 additions and 4 deletions

View File

@ -181,12 +181,43 @@ export default {
}
}
if ($A.isJson(record.link)) {
let {title, url} = record.link
const {title, url} = record.link
vNode.push(h('span', ': '))
vNode.push(h('a', {
attrs: {
href: $A.mainUrl(url),
href: url,
target: '_blank'
},
on: {
click: e => {
e.preventDefault()
const path = `/${url}`
if (this.$Electron) {
this.$store.dispatch('openChildWindow', {
name: `project-log-${record.id}`,
path: path,
force: false,
config: {
title: this.$L(title),
parent: null,
width: Math.min(window.screen.availWidth, 1440),
height: Math.min(window.screen.availHeight, 900),
},
});
} else if (this.$isEEUiApp) {
this.$store.dispatch('openAppChildPage', {
pageType: 'app',
pageTitle: this.$L(title),
url: 'web.js',
params: {
allowAccess: true,
url: $A.rightDelete(window.location.href, window.location.hash) + `#${path}`
},
})
} else {
window.open($A.mainUrl(path.substring(1)))
}
}
}
}, this.$L(title)))
}

View File

@ -3,7 +3,7 @@
<PageTitle :title="pageName"/>
<Loading v-if="loadIng > 0"/>
<div v-else-if="info" class="file-preview">
<div class="edit-header">
<div v-if="showHeader" class="edit-header">
<div class="header-title">
<div class="title-name">{{pageName}}</div>
<Tag color="default">{{$L('只读')}}</Tag>
@ -28,6 +28,7 @@ export default {
return {
loadIng: 0,
info: null,
showHeader: !$A.isEEUiApp,
}
},
mounted() {

@ -1 +1 @@
Subproject commit e56789580f38834d6124b17d06b2be1e050c9f5c
Subproject commit 4c0793188cc01a2ce4371924089bf9cc9fa4876e