mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
🎨
This commit is contained in:
parent
406281bb12
commit
3c5749f48f
2 changed files with 14 additions and 6 deletions
|
|
@ -725,11 +725,15 @@ const renderRollup = (cellValue: IAVCellValue) => {
|
||||||
text = cellValue?.number.formattedContent || cellValue?.number.content.toString() || "";
|
text = cellValue?.number.formattedContent || cellValue?.number.content.toString() || "";
|
||||||
} else if (cellValue.type === "date") {
|
} else if (cellValue.type === "date") {
|
||||||
const dataValue = cellValue ? cellValue.date : null;
|
const dataValue = cellValue ? cellValue.date : null;
|
||||||
|
if (dataValue.formattedContent) {
|
||||||
|
text = dataValue.formattedContent
|
||||||
|
} else {
|
||||||
if (dataValue && dataValue.isNotEmpty) {
|
if (dataValue && dataValue.isNotEmpty) {
|
||||||
text += dayjs(dataValue.content).format(dataValue.isNotTime ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm");
|
text = dayjs(dataValue.content).format(dataValue.isNotTime ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm");
|
||||||
}
|
}
|
||||||
if (dataValue && dataValue.hasEndDate && dataValue.isNotEmpty && dataValue.isNotEmpty2) {
|
if (dataValue && dataValue.hasEndDate && dataValue.isNotEmpty && dataValue.isNotEmpty2) {
|
||||||
text += `<svg class="av__cellicon"><use xlink:href="#iconForward"></use></svg>${dayjs(dataValue.content2).format(dataValue.isNotTime ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm")}`;
|
text = `<svg class="av__cellicon"><use xlink:href="#iconForward"></use></svg>${dayjs(dataValue.content2).format(dataValue.isNotTime ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm")}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (text) {
|
if (text) {
|
||||||
text = `<span class="av__celltext">${text}</span>`;
|
text = `<span class="av__celltext">${text}</span>`;
|
||||||
|
|
|
||||||
|
|
@ -887,7 +887,11 @@ export const openMenuPanel = (options: {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
break;
|
break;
|
||||||
} else if (type === "goSearchRollupCalc") {
|
} else if (type === "goSearchRollupCalc") {
|
||||||
openCalcMenu(options.protyle, target, {data, colId: options.colId, blockID});
|
openCalcMenu(options.protyle, target, {
|
||||||
|
data,
|
||||||
|
colId: options.colId || menuElement.querySelector(".b3-menu__item").getAttribute("data-col-id"),
|
||||||
|
blockID
|
||||||
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue