An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: 日期单元格值设置不上
Vanessae3315a1dd1a1
diff --git a/app/src/protyle/render/av/date.ts b/app/src/protyle/render/av/date.tsindex a36ef6c3d4..5ba718f3ad 100644--- a/app/src/protyle/render/av/date.ts+++ b/app/src/protyle/render/av/date.ts@@ -63,6 +63,7 @@ export const bindDateEvent = (options: {data: options.data,protyle: options.protyle,value: {+ isNotEmpty: inputElements[0].value !== "",content: new Date(inputElements[0].value).getTime()}});@@ -73,6 +74,7 @@ export const bindDateEvent = (options: {data: options.data,protyle: options.protyle,value: {+ isNotEmpty2: inputElements[1].value !== "",content2: new Date(inputElements[1].value).getTime()}});@@ -99,11 +101,7 @@ export const setDateValue = (options: {cellElements: HTMLElement[],data: IAVprotyle: IProtyle,- value: {- content?: number,- content2?: number,- hasEndDate?: boolean- }+ value: IAVCellDateValue}) => {let cellIndex = 0;Array.from(options.cellElements[0].parentElement.querySelectorAll(".av__cell")).find((item: HTMLElement, index) => {diff --git a/app/src/protyle/render/av/filter.ts b/app/src/protyle/render/av/filter.tsindex 3cd93d8582..cf662665a0 100644--- a/app/src/protyle/render/av/filter.ts+++ b/app/src/protyle/render/av/filter.ts@@ -11,7 +11,7 @@ export const getDefaultOperatorByType = (type: TAVCol) => {if (type === "number" || type === "select") {return "=";}- if (type === "text" || type === "mSelect" || type === "url") {+ if (["text", "mSelect", "url", "block"].includes(type)) {return "Contains";}};@@ -133,6 +133,7 @@ export const setFilter = (options: {}});switch (colData.type) {+ case "block":case "text":case "url":selectHTML = `<option ${"=" === options.filter.operator ? "selected" : ""} value="=">${window.siyuan.languages.filterOperatorIs}</option>@@ -208,7 +209,7 @@ export const setFilter = (options: {}});});- } else if (colData.type === "text" || colData.type === "url") {+ } else if (["text", "url", "block"].includes(colData.type)) {menu.addItem({iconHTML: "",label: `<input style="margin: 4px 0" value="${options.filter.value?.text.content || ""}" class="b3-text-field fn__size200">`diff --git a/app/src/protyle/render/av/openMenuPanel.ts b/app/src/protyle/render/av/openMenuPanel.tsindex c80d390845..4107ed64e4 100644--- a/app/src/protyle/render/av/openMenuPanel.ts+++ b/app/src/protyle/render/av/openMenuPanel.ts@@ -621,8 +621,10 @@ export const openMenuPanel = (options: {data,protyle: options.protyle,value: {- content: 0,- content2: 0,+ isNotEmpty2: false,+ isNotEmpty: false,+ content: null,+ content2: null,hasEndDate: false}});diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.tsindex c14f1062f2..fda908a492 100644--- a/app/src/types/index.d.ts+++ b/app/src/types/index.d.ts@@ -937,8 +937,8 @@ interface IAVCellValue {interface IAVCellDateValue {content?: number,- isNotEmpty: boolean+ isNotEmpty?: booleancontent2?: number,- isNotEmpty2: boolean+ isNotEmpty2?: booleanhasEndDate?: boolean}