This commit is contained in:
parent
4c8c567058
commit
baadad6119
3 changed files with 6 additions and 3 deletions
|
@ -542,7 +542,8 @@ export const updateCellsValue = (protyle: IProtyle, nodeElement: HTMLElement, va
|
|||
return;
|
||||
}
|
||||
if (!nodeElement.contains(item)) {
|
||||
item = cellElements[elementIndex] = nodeElement.querySelector(`.av__row[data-id="${rowElement.dataset.id}"] .av__cell[data-col-id="${item.dataset.colId}"]`) as HTMLElement;
|
||||
item = cellElements[elementIndex] = (nodeElement.querySelector(`.av__row[data-id="${rowElement.dataset.id}"] .av__cell[data-col-id="${item.dataset.colId}"]`) ||
|
||||
nodeElement.querySelector(`.fn__flex-1[data-col-id="${item.dataset.colId}"]`)) as HTMLElement;
|
||||
}
|
||||
if (!item) {
|
||||
// 兼容新增行后台隐藏
|
||||
|
|
|
@ -352,7 +352,8 @@ export const setRelationCell = (protyle: IProtyle, nodeElement: HTMLElement, tar
|
|||
return;
|
||||
}
|
||||
if (!nodeElement.contains(cellElements[0])) {
|
||||
cellElements[0] = nodeElement.querySelector(`.av__row[data-id="${rowElement.dataset.id}"] .av__cell[data-col-id="${cellElements[0].dataset.colId}"]`) as HTMLElement;
|
||||
cellElements[0] = (nodeElement.querySelector(`.av__row[data-id="${rowElement.dataset.id}"] .av__cell[data-col-id="${cellElements[0].dataset.colId}"]`) ||
|
||||
nodeElement.querySelector(`.fn__flex-1[data-col-id="${cellElements[0].dataset.colId}"]`) ) as HTMLElement;
|
||||
}
|
||||
const newValue: IAVCellRelationValue = {blockIDs: [], contents: []};
|
||||
menuElement.querySelectorAll('[draggable="true"]').forEach(item => {
|
||||
|
|
|
@ -449,7 +449,8 @@ export const addColOptionOrCell = (protyle: IProtyle, data: IAV, cellElements: H
|
|||
cellElements.forEach((item, index) => {
|
||||
const rowElement = hasClosestByClassName(item, "av__row");
|
||||
if (rowElement) {
|
||||
cellElements[index] = blockElement.querySelector(`.av__row[data-id="${rowElement.dataset.id}"] .av__cell[data-col-id="${item.dataset.colId}"]`) as HTMLElement;
|
||||
cellElements[index] = (blockElement.querySelector(`.av__row[data-id="${rowElement.dataset.id}"] .av__cell[data-col-id="${item.dataset.colId}"]`) ||
|
||||
blockElement.querySelector(`.fn__flex-1[data-col-id="${item.dataset.colId}"]`) ) as HTMLElement;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue