Jelajahi Sumber

:art: https://github.com/siyuan-note/siyuan/issues/10142

Vanessa 1 tahun lalu
induk
melakukan
7b4ead5e8a
2 mengubah file dengan 5 tambahan dan 1 penghapusan
  1. 4 0
      app/src/dialog/tooltip.ts
  2. 1 1
      app/src/protyle/render/av/blockAttr.ts

+ 4 - 0
app/src/dialog/tooltip.ts

@@ -39,6 +39,10 @@ export const showTooltip = (message: string, target: Element, error = false) =>
         // file tree and outline、backlink
         top = parentRect.top;
         left = parentRect.right + 8;
+    } else if (position === "parentW") {
+        // 数据库属性视图
+        top = parentRect.top + 8;
+        left = parentRect.left - messageElement.clientWidth;
     }
     const topHeight = position === "parentE" ? top : targetRect.top;
     const bottomHeight = window.innerHeight - top;

+ 1 - 1
app/src/protyle/render/av/blockAttr.ts

@@ -162,7 +162,7 @@ export const renderAVAttribute = (element: HTMLElement, id: string, protyle: IPr
             table.keyValues?.forEach(item => {
                 html += `<div class="block__icons av__row" data-id="${id}">
     <div class="block__icon" draggable="true"><svg><use xlink:href="#iconDrag"></use></svg></div>
-    <div class="block__logo ariaLabel" aria-label="${escapeAttr(item.key.name)}"">
+    <div class="block__logo ariaLabel" data-position="parentW" aria-label="${escapeAttr(item.key.name)}"">
         ${item.key.icon ? unicode2Emoji(item.key.icon, "block__logoicon", true) : `<svg class="block__logoicon"><use xlink:href="#${getColIconByType(item.key.type)}"></use></svg>`}
         <span>${item.key.name}</span>
     </div>