mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-08 00:04:21 +01:00
🎨 移动端块标
This commit is contained in:
parent
0b439c7228
commit
a17f8bbcb6
1 changed files with 3 additions and 2 deletions
|
|
@ -184,7 +184,8 @@ export const initUI = (protyle: IProtyle) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
let overAttr = false;
|
let overAttr = false;
|
||||||
protyle.element.addEventListener(isTouchDevice() ? "touchend" : "mouseover", (event: KeyboardEvent & {
|
const isTouch = isTouchDevice();
|
||||||
|
protyle.element.addEventListener(isTouch ? "touchend" : "mouseover", (event: KeyboardEvent & {
|
||||||
target: HTMLElement
|
target: HTMLElement
|
||||||
}) => {
|
}) => {
|
||||||
// attr
|
// attr
|
||||||
|
|
@ -222,7 +223,7 @@ export const initUI = (protyle: IProtyle) => {
|
||||||
|
|
||||||
// gutter
|
// gutter
|
||||||
const buttonElement = hasClosestByTag(event.target, "BUTTON");
|
const buttonElement = hasClosestByTag(event.target, "BUTTON");
|
||||||
if (buttonElement && buttonElement.parentElement.classList.contains("protyle-gutters")) {
|
if (!isTouch && buttonElement && buttonElement.parentElement.classList.contains("protyle-gutters")) {
|
||||||
const type = buttonElement.getAttribute("data-type");
|
const type = buttonElement.getAttribute("data-type");
|
||||||
if (type === "fold" || type === "NodeAttributeViewRow") {
|
if (type === "fold" || type === "NodeAttributeViewRow") {
|
||||||
Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--hl, .av__row--hl")).forEach(item => {
|
Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--hl, .av__row--hl")).forEach(item => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue