mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: bug fix
This commit is contained in:
1 parent
273a0563b3
commit
60820a3e5f
7 files changed
+15
-12
No files matched your search
@@ -7,7 +7,7 @@ const diagnosticsOptions: monaco.languages.typescript.DiagnosticsOptions = {
|
||||
noSyntaxValidation: false,
|
||||
noSuggestionDiagnostics: true,
|
||||
};
|
||||
const compilerOptions = {
|
||||
const compilerOptions: monaco.languages.typescript.CompilerOptions = {
|
||||
target: monaco.languages.typescript.ScriptTarget.ES2020,
|
||||
module: monaco.languages.typescript.ModuleKind.ESNext,
|
||||
allowNonTsExtensions: true,
|
||||
|
||||
@@ -135,7 +135,7 @@ export async function previewFile(ev, type = '') {
|
||||
if (ext === 'pdf') return previewPDF(`${link}${link.includes('?') ? '&' : '?'}noDisposition=1`);
|
||||
Notification.info(i18n('Loading file...'));
|
||||
try {
|
||||
const { url } = await request.get(link);
|
||||
const { url } = await request.get(link, {}, { headers: { 'Do-Not-Cache': 'on' } });
|
||||
if (/^(doc|xls|ppt)x?$/.test(ext)) return previewOffice(link, url);
|
||||
content = await request.get(url, undefined, { dataType: 'text' });
|
||||
} catch (e) {
|
||||
|
||||
Reference in new issue
Block a user