Vanessa 2025-11-26 18:58:24 +08:00
parent 7ecde05c20
commit 5ab1a93aa3

View file

@ -606,14 +606,16 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
}
Object.keys(data.old).forEach(key => {
item.removeAttribute(key);
if (key === "custom-avs") {
item.removeAttribute("av-names");
}
});
if (data.new.style && data.new[Constants.CUSTOM_RIFF_DECKS] && data.new[Constants.CUSTOM_RIFF_DECKS] !== data.old[Constants.CUSTOM_RIFF_DECKS]) {
data.new.style += ";animation:addCard 450ms linear";
}
Object.keys(data.new).forEach(key => {
if ("id" === key || "av-names" === key) {
if ("id" === key) {
// 设置属性以后不应该给块元素添加 id 属性 No longer add the `id` attribute to block elements after setting the attribute https://github.com/siyuan-note/siyuan/issues/15327
// av-names 属性仅用于生成角标,不添加到元素
return;
}