mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-24 07:54:07 +01:00
🚨
This commit is contained in:
parent
4b56408095
commit
7cff7ce704
9 changed files with 21 additions and 22 deletions
|
|
@ -79,7 +79,7 @@ export const genCellValueByElement = (colType: TAVCol, cellElement: HTMLElement)
|
|||
if (colType === "block" && textElement.dataset.id) {
|
||||
cellValue.block.id = textElement.dataset.id;
|
||||
if (textElement.previousElementSibling?.classList.contains("b3-menu__avemoji")) {
|
||||
const unicode = textElement.previousElementSibling.getAttribute("data-unicode")
|
||||
const unicode = textElement.previousElementSibling.getAttribute("data-unicode");
|
||||
if (unicode) {
|
||||
cellValue.block.icon = unicode;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,12 +205,12 @@ export const bindAVPanelKeydown = (event: KeyboardEvent) => {
|
|||
if (avPanelElement && window.siyuan.menus.menu.element.classList.contains("fn__none")) {
|
||||
if ((avPanelElement.querySelector('[data-type="goSearchRollupCol"]') && !avPanelElement.querySelector(".b3-text-field")) ||
|
||||
avPanelElement.querySelector('[data-type="addAssetExist"]')) {
|
||||
const menuElement = avPanelElement.querySelector(".b3-menu__items")
|
||||
const menuElement = avPanelElement.querySelector(".b3-menu__items");
|
||||
if (event.key === "Enter") {
|
||||
const currentElement = menuElement.querySelector(".b3-menu__item--current");
|
||||
if (currentElement) {
|
||||
const editElement = currentElement.querySelector('[data-type="editAssetItem"]')
|
||||
const uploadElement = currentElement.querySelector(".b3-form__upload")
|
||||
const editElement = currentElement.querySelector('[data-type="editAssetItem"]');
|
||||
const uploadElement = currentElement.querySelector(".b3-form__upload");
|
||||
if (editElement) {
|
||||
avPanelElement.dispatchEvent(new CustomEvent("click", {
|
||||
detail: {
|
||||
|
|
@ -219,7 +219,7 @@ export const bindAVPanelKeydown = (event: KeyboardEvent) => {
|
|||
}
|
||||
}));
|
||||
} else if (uploadElement) {
|
||||
uploadElement.dispatchEvent(new MouseEvent('click', {bubbles: true}));
|
||||
uploadElement.dispatchEvent(new MouseEvent("click", {bubbles: true}));
|
||||
} else {
|
||||
avPanelElement.dispatchEvent(new CustomEvent("click", {
|
||||
detail: {
|
||||
|
|
@ -232,10 +232,10 @@ export const bindAVPanelKeydown = (event: KeyboardEvent) => {
|
|||
} else if (event.key === "Escape") {
|
||||
avPanelElement.dispatchEvent(new CustomEvent("click", {detail: "close"}));
|
||||
} else {
|
||||
upDownHint(menuElement, event, "b3-menu__item--current", menuElement.firstElementChild)
|
||||
upDownHint(menuElement, event, "b3-menu__item--current", menuElement.firstElementChild);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export const chartRender = (element: Element, cdn = Constants.PROTYLE_CDN) => {
|
|||
}
|
||||
const renderElement = e.firstElementChild.nextElementSibling as HTMLElement;
|
||||
try {
|
||||
const chartInstance = window.echarts.getInstanceById(renderElement.getAttribute("_echarts_instance_"))
|
||||
const chartInstance = window.echarts.getInstanceById(renderElement.getAttribute("_echarts_instance_"));
|
||||
const option = await looseJsonParse(Lute.UnEscapeHTMLStr(e.getAttribute("data-content")));
|
||||
if (chartInstance && chartInstance.getOption().series[0]?.type !== option.series[0]?.type) {
|
||||
chartInstance.clear();
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export const genRenderFrame = (renderElement: Element) => {
|
|||
} else if (type==="NodeMathBlock") {
|
||||
renderElement.firstElementChild.innerHTML = `<span></span><span class="protyle-cursor">${Constants.ZWSP}</span>`;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const processClonePHElement = (item: Element) => {
|
||||
if (item.getAttribute("data-type") === "NodeHTMLBlock") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue