Vanessa 2024-01-20 00:18:54 +08:00
parent 84323004e0
commit 7b4ead5e8a
2 changed files with 5 additions and 1 deletions

View File

@ -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;

View File

@ -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>