This commit is contained in:
Vanessa 2024-05-21 00:24:54 +08:00
parent 8db6015709
commit 358047dea0
6 changed files with 11 additions and 20 deletions

View file

@ -574,12 +574,12 @@ export const updateCellsValue = (protyle: IProtyle, nodeElement: HTMLElement, va
let link = protyle.lute.GetLinkDest(value);
let name = "";
if (html) {
const tempElement = document.createElement("template")
tempElement.innerHTML = html
const aElement = tempElement.content.querySelector('[data-type~="a"]')
const tempElement = document.createElement("template");
tempElement.innerHTML = html;
const aElement = tempElement.content.querySelector('[data-type~="a"]');
if (aElement) {
link = aElement.getAttribute("data-href");
name = aElement.textContent
name = aElement.textContent;
}
}
if (!link && !name) {

View file

@ -583,7 +583,7 @@ export const mergeAddOption = (column: IAVColumn, cellValue: IAVCellValue, avID:
}
});
if (!needAdd) {
const newColor = ((column.options?.length || 0) % 13 + 1).toString()
const newColor = ((column.options?.length || 0) % 13 + 1).toString();
column.options.push({
name: item.content,
color: newColor
@ -594,7 +594,7 @@ export const mergeAddOption = (column: IAVColumn, cellValue: IAVCellValue, avID:
id: column.id,
avID,
data: column.options
})
});
undoOperations.push({
action: "removeAttrViewColOption",
id: column.id,
@ -607,4 +607,4 @@ export const mergeAddOption = (column: IAVColumn, cellValue: IAVCellValue, avID:
doOperations,
undoOperations
};
}
};