mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
This commit is contained in:
parent
67231dbf6a
commit
a6d3093cfc
2 changed files with 7 additions and 3 deletions
|
|
@ -980,7 +980,7 @@ export const renderCell = (cellValue: IAVCellValue, rowIndex = 0, showIcon = tru
|
||||||
const dataValue = cellValue ? cellValue[cellValue.type as "date"] : null;
|
const dataValue = cellValue ? cellValue[cellValue.type as "date"] : null;
|
||||||
text = `<span class="av__celltext" data-value='${JSON.stringify(dataValue)}'>`;
|
text = `<span class="av__celltext" data-value='${JSON.stringify(dataValue)}'>`;
|
||||||
if (dataValue && dataValue.isNotEmpty) {
|
if (dataValue && dataValue.isNotEmpty) {
|
||||||
text += dayjs(dataValue.content).format("YYYY-MM-DD HH:mm");
|
text += dataValue.formattedContent;
|
||||||
}
|
}
|
||||||
text += "</span>";
|
text += "</span>";
|
||||||
} else if (["lineNumber"].includes(cellValue.type)) {
|
} else if (["lineNumber"].includes(cellValue.type)) {
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ export const getEditHTML = (options: {
|
||||||
<label class="b3-menu__item">
|
<label class="b3-menu__item">
|
||||||
<span class="fn__flex-center">${window.siyuan.languages.includeTime}</span>
|
<span class="fn__flex-center">${window.siyuan.languages.includeTime}</span>
|
||||||
<span class="fn__space fn__flex-1"></span>
|
<span class="fn__space fn__flex-1"></span>
|
||||||
<input data-type="includeTime" type="checkbox" class="b3-switch b3-switch--menu" ${colData[colData.type as "updated"]?.includeTime ? "checked" : ""}>
|
<input data-type="includeTime" type="checkbox" class="b3-switch b3-switch--menu" ${(!colData[colData.type as "updated"] || colData[colData.type as "updated"].includeTime) ? "checked" : ""}>
|
||||||
</label>`;
|
</label>`;
|
||||||
}
|
}
|
||||||
html += `<button class="b3-menu__separator" data-id="separator_3"></button>
|
html += `<button class="b3-menu__separator" data-id="separator_3"></button>
|
||||||
|
|
@ -386,7 +386,11 @@ export const bindEditEvent = (options: {
|
||||||
avID,
|
avID,
|
||||||
data: !includeTimeElement.checked,
|
data: !includeTimeElement.checked,
|
||||||
}]);
|
}]);
|
||||||
colData[colData.type as "updated"].includeTime = includeTimeElement.checked;
|
if (colData[colData.type as "updated"]) {
|
||||||
|
colData[colData.type as "updated"].includeTime = includeTimeElement.checked;
|
||||||
|
} else {
|
||||||
|
colData[colData.type as "updated"] = {includeTime: includeTimeElement.checked};
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue