mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-26 11:28:49 +01:00
This commit is contained in:
parent
6ab2cea36d
commit
6c5cacabde
2 changed files with 4 additions and 1 deletions
|
|
@ -206,7 +206,7 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone", "block"]
|
|||
innerHTML += `<div class="fn__hr"></div>
|
||||
<button data-type="addColumn" class="b3-button b3-button--cancel"><svg><use xlink:href="#iconAdd"></use></svg>${window.siyuan.languages.newCol}</button>
|
||||
<div class="fn__hr--b"></div><div class="fn__hr--b"></div>`;
|
||||
html += `<div data-av-id="${table.avID}" data-node-id="${id}" data-type="NodeAttributeView">${innerHTML}</div>`;
|
||||
html += `<div data-av-id="${table.avID}" data-av-type="table" data-node-id="${id}" data-type="NodeAttributeView">${innerHTML}</div>`;
|
||||
|
||||
if (element.innerHTML) {
|
||||
// 防止 blockElement 找不到
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ import {insertGalleryItemAnimation} from "./gallery/item";
|
|||
import {clearSelect} from "../../util/clearSelect";
|
||||
|
||||
export const getFieldIdByCellElement = (cellElement: Element, viewType: TAVView): string => {
|
||||
if (hasClosestByClassName(cellElement, "custom-attr")) {
|
||||
return (hasClosestByClassName(cellElement, "av__row") as HTMLElement).dataset.id;
|
||||
}
|
||||
return (hasClosestByClassName(cellElement, viewType === "table" ? "av__row" : "av__gallery-item") as HTMLElement).dataset.id;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue