mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-23 07:24:07 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
e8774ab643
4 changed files with 55 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ export const exportAsset = (src: string) => {
|
|||
properties: ["showOverwriteConfirmation"],
|
||||
}).then((result: SaveDialogReturnValue) => {
|
||||
if (!result.canceled) {
|
||||
fetchPost("/api/file/saveAs", {src, targe: result.filePath})
|
||||
fetchPost("/api/file/copyFile", {src, dest: result.filePath})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,14 @@ export class Preview {
|
|||
previewElement.addEventListener("click", (event: MouseEvent & { target: HTMLElement }) => {
|
||||
if (event.target.tagName === "A") {
|
||||
const linkAddress = event.target.getAttribute("href");
|
||||
if (linkAddress.startsWith("#")) {
|
||||
// 导出预览模式点击块引转换后的脚注跳转不正确 https://github.com/siyuan-note/siyuan/issues/5700
|
||||
// 对于超链接锚点不做任何处理
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
return
|
||||
}
|
||||
|
||||
if (isMobile()) {
|
||||
openByMobile(linkAddress);
|
||||
event.stopPropagation();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue