Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/9486

Vanessac2cb4d0a25eb
diff --git a/app/src/protyle/render/av/date.ts b/app/src/protyle/render/av/date.ts
index 21e1629176..b209d6c93d 100644
--- a/app/src/protyle/render/av/date.ts
+++ b/app/src/protyle/render/av/date.ts
@@ -35,8 +35,8 @@ export const getDateHTML = (data: IAVTable, cellElements: HTMLElement[]) => {
}
return `<div class="b3-menu__items">
<div>
- <input type="${cellValue.value.date.isNotTime ? "date" : "datetime-local"}" value="${value}" data-value="${value ? dayjs(cellValue.value.date.content).format("YYYY-MM-DD HH:mm") : ""}" class="b3-text-field fn__size200"><br>
- <input type="${cellValue.value.date.isNotTime ? "date" : "datetime-local"}" value="${value2}" data-value="${value2 ? dayjs(cellValue.value.date.content2).format("YYYY-MM-DD HH:mm") : ""}" style="margin-top: 8px" class="b3-text-field fn__size200${hasEndDate ? "" : " fn__none"}">
+ <input type="${(!cellValue || cellValue?.value?.date?.isNotTime) ? "date" : "datetime-local"}" value="${value}" data-value="${value ? dayjs(cellValue.value.date.content).format("YYYY-MM-DD HH:mm") : ""}" class="b3-text-field fn__size200"><br>
+ <input type="${(!cellValue || cellValue?.value?.date?.isNotTime) ? "date" : "datetime-local"}" value="${value2}" data-value="${value2 ? dayjs(cellValue.value.date.content2).format("YYYY-MM-DD HH:mm") : ""}" style="margin-top: 8px" class="b3-text-field fn__size200${hasEndDate ? "" : " fn__none"}">
<button class="b3-menu__separator"></button>
<label class="b3-menu__item">
<span>${window.siyuan.languages.endDate}</span>
@@ -46,7 +46,7 @@ export const getDateHTML = (data: IAVTable, cellElements: HTMLElement[]) => {
<label class="b3-menu__item">
<span>${window.siyuan.languages.includeTime}</span>
<span class="fn__space fn__flex-1"></span>
- <input type="checkbox" class="b3-switch fn__flex-center"${cellValue.value.date.isNotTime ? "" : " checked"}>
+ <input type="checkbox" class="b3-switch fn__flex-center"${(!cellValue || cellValue?.value?.date?.isNotTime) ? "" : " checked"}>
</label>
<button class="b3-menu__separator"></button>
<button class="b3-menu__item" data-type="clearDate">
diff --git a/app/src/protyle/render/av/row.ts b/app/src/protyle/render/av/row.ts
index 12163d375b..77aa7eae05 100644
--- a/app/src/protyle/render/av/row.ts
+++ b/app/src/protyle/render/av/row.ts
@@ -62,7 +62,7 @@ export const insertAttrViewBlockAnimation = (blockElement: Element, size: number
const previousElement = blockElement.querySelector(`.av__row[data-id="${previousId}"]`) || blockElement.querySelector(".av__row--header");
let colHTML = "";
previousElement.querySelectorAll(".av__cell").forEach((item: HTMLElement) => {
- colHTML += `<div class="av__cell" style="width: ${item.style.width}" ${item.getAttribute("data-block-id") ? ' data-detached="true"' : ""}><span class="av__pulse"></span></div>`;
+ colHTML += `<div class="av__cell" style="width: ${item.style.width}" ${(item.getAttribute("data-block-id") || item.dataset.dtype === "block") ? ' data-detached="true"' : ""}><span class="av__pulse"></span></div>`;
});
let html = "";