Vanessa 2023-04-28 22:08:57 +08:00
parent 0cd68fe571
commit e94a534b02
9 changed files with 111 additions and 114 deletions

View file

@ -11,7 +11,7 @@ import {fullscreen} from "../protyle/breadcrumb/action";
import {MenuItem} from "../menus/Menu";
import {escapeHtml} from "../util/escape";
/// #if !MOBILE
import {newCardTab} from "./newCardTab";
import {openFile} from "../editor/util";
/// #endif
import {getDisplayName, movePathTo} from "../util/pathName";
@ -203,10 +203,13 @@ export const bindCardEvent = (options: {
/// #if !MOBILE
const sticktabElement = hasClosestByAttribute(target, "data-type", "sticktab");
if (sticktabElement) {
newCardTab({
cardType: filterElement.getAttribute("data-cardtype") as TCardType,
id: filterElement.getAttribute("data-id"),
title: options.title
openFile({
position: "right",
customData:{
cardType: filterElement.getAttribute("data-cardtype") as TCardType,
id: filterElement.getAttribute("data-id"),
title: options.title
}
});
if (options.dialog) {
options.dialog.destroy();