mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-15 08:30:42 +08:00
This commit is contained in:
parent
fd94e9df0c
commit
623f30b5fc
@ -337,6 +337,7 @@ export const updateAVName = (protyle: IProtyle, blockElement: Element) => {
|
|||||||
if (newData === nameElement.dataset.title.trim()) {
|
if (newData === nameElement.dataset.title.trim()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const newUpdated = dayjs().format("YYYYMMDDHHmmss")
|
||||||
transaction(protyle, [{
|
transaction(protyle, [{
|
||||||
action: "setAttrViewName",
|
action: "setAttrViewName",
|
||||||
id: avId,
|
id: avId,
|
||||||
@ -344,7 +345,7 @@ export const updateAVName = (protyle: IProtyle, blockElement: Element) => {
|
|||||||
}, {
|
}, {
|
||||||
action: "doUpdateUpdated",
|
action: "doUpdateUpdated",
|
||||||
id,
|
id,
|
||||||
data: dayjs().format("YYYYMMDDHHmmss"),
|
data: newUpdated,
|
||||||
}], [{
|
}], [{
|
||||||
action: "setAttrViewName",
|
action: "setAttrViewName",
|
||||||
id: avId,
|
id: avId,
|
||||||
@ -354,6 +355,7 @@ export const updateAVName = (protyle: IProtyle, blockElement: Element) => {
|
|||||||
id,
|
id,
|
||||||
data: blockElement.getAttribute("updated")
|
data: blockElement.getAttribute("updated")
|
||||||
}]);
|
}]);
|
||||||
|
nameElement.setAttribute("updated", newUpdated);
|
||||||
nameElement.dataset.title = newData;
|
nameElement.dataset.title = newData;
|
||||||
blockElement.querySelector(".layout-tab-bar .item__text").textContent = newData;
|
blockElement.querySelector(".layout-tab-bar .item__text").textContent = newData;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user