[Refactor][UI]Add a back button when viewing an error file (#13354)

Co-authored-by: imizao <lai.jinwen@vpclub.cn>
This commit is contained in:
imizao 2023-01-30 10:06:56 +08:00 committed by GitHub
parent 802bf4a2e0
commit 23c7363f64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 3 deletions

View File

@ -72,9 +72,9 @@ const err = (err: AxiosError): Promise<AxiosError> => {
}
service.interceptors.request.use((config: AxiosRequestConfig<any>) => {
config.headers && (config.headers.sessionId = userStore.getSessionId)
const language = cookies.get('language')
config.headers = config.headers || {}
config.headers.sessionId = userStore.getSessionId
const language = cookies.get('language')
if (language) config.headers.language = language
return config

View File

@ -109,7 +109,21 @@ export default defineComponent({
</div>
) : (
<NSpace justify='center'>
<NSpin show={true} />
<NSpace vertical>
<NSpin show={true} />
<NSpace>
<NButton
type='info'
size='small'
text
style={{ marginRight: '15px' }}
onClick={this.handleReturn}
class='btn-cancel'
>
{t('resource.file.return')}
</NButton>
</NSpace>
</NSpace>
</NSpace>
)}
</Card>