mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
This commit is contained in:
parent
7ecde05c20
commit
5ab1a93aa3
1 changed files with 4 additions and 2 deletions
|
|
@ -606,14 +606,16 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
|
||||||
}
|
}
|
||||||
Object.keys(data.old).forEach(key => {
|
Object.keys(data.old).forEach(key => {
|
||||||
item.removeAttribute(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]) {
|
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";
|
data.new.style += ";animation:addCard 450ms linear";
|
||||||
}
|
}
|
||||||
Object.keys(data.new).forEach(key => {
|
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
|
// 设置属性以后不应该给块元素添加 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue