mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-08 05:32:33 +01:00
This commit is contained in:
parent
73e2ce44e9
commit
c6d2d629e8
16 changed files with 98 additions and 78 deletions
|
|
@ -4,7 +4,7 @@ import {Constants} from "../../../constants";
|
|||
import {addDragFill, renderCell} from "./cell";
|
||||
import {unicode2Emoji} from "../../../emoji";
|
||||
import {focusBlock} from "../../util/selection";
|
||||
import {hasClosestBlock, hasClosestByAttribute, hasClosestByClassName} from "../../util/hasClosest";
|
||||
import {hasClosestBlock, hasClosestByClassName, isInEmbedBlock} from "../../util/hasClosest";
|
||||
import {stickyRow, updateHeader} from "./row";
|
||||
import {getCalcValue} from "./calc";
|
||||
import {renderAVAttribute} from "./blockAttr";
|
||||
|
|
@ -206,7 +206,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)}
|
|||
let avBackground = "--av-background:var(--b3-theme-background)";
|
||||
if (e.style.backgroundColor) {
|
||||
avBackground = "--av-background:" + e.style.backgroundColor;
|
||||
} else if (hasClosestByAttribute(e, "data-type", "NodeBlockQueryEmbed")) {
|
||||
} else if (isInEmbedBlock(e)) {
|
||||
avBackground = "--av-background:var(--b3-theme-surface)";
|
||||
}
|
||||
e.firstElementChild.outerHTML = `<div class="av__container" style="${avBackground}">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {hasClosestByAttribute, hasTopClosestByClassName} from "../util/hasClosest";
|
||||
import {hasClosestByAttribute, hasTopClosestByClassName, isInEmbedBlock} from "../util/hasClosest";
|
||||
import {fetchPost, fetchSyncPost} from "../../util/fetch";
|
||||
import {processRender} from "../util/processCode";
|
||||
import {highlightRender} from "./highlightRender";
|
||||
|
|
@ -24,7 +24,7 @@ export const blockRender = (protyle: IProtyle, element: Element, top?: number) =
|
|||
// 需置于请求返回前,否则快速滚动会导致重复加载 https://ld246.com/article/1666857862494?r=88250
|
||||
item.setAttribute("data-render", "true");
|
||||
item.style.height = (item.clientHeight - 8) + "px"; // 减少抖动 https://ld246.com/article/1668669380171
|
||||
item.innerHTML = `<div class="protyle-icons${hasClosestByAttribute(item.parentElement, "data-type", "NodeBlockQueryEmbed") ? " fn__none" : ""}">
|
||||
item.innerHTML = `<div class="protyle-icons${isInEmbedBlock(item) ? " fn__none" : ""}">
|
||||
<span aria-label="${window.siyuan.languages.refresh}" class="b3-tooltips__nw b3-tooltips protyle-icon protyle-action__reload protyle-icon--first"><svg class="fn__rotate"><use xlink:href="#iconRefresh"></use></svg></span>
|
||||
<span aria-label="${window.siyuan.languages.update} SQL" class="b3-tooltips__nw b3-tooltips protyle-icon protyle-action__edit"><svg><use xlink:href="#iconEdit"></use></svg></span>
|
||||
<span aria-label="${window.siyuan.languages.more}" class="b3-tooltips__nw b3-tooltips protyle-icon protyle-action__menu protyle-icon--last"><svg><use xlink:href="#iconMore"></use></svg></span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue