🐛 修复超级面板设置bug

This commit is contained in:
muwoo
2023-11-03 11:28:38 +08:00
parent 562a13fdff
commit 4e59294b16
7 changed files with 16 additions and 7 deletions

View File

@@ -185,7 +185,8 @@ const addCmdToSuperPanel = ({ cmd, code }) => {
},
};
superPanelPlugins.value.data.push(plugin);
window.rubick.db.put(toRaw(superPanelPlugins.value));
const { rev } = window.rubick.db.put(JSON.parse(JSON.stringify(superPanelPlugins.value)));
superPanelPlugins.value._rev = rev;
};
const removePluginToSuperPanel = ({ cmd, name }) => {
@@ -195,7 +196,8 @@ const removePluginToSuperPanel = ({ cmd, name }) => {
return item.cmd !== cmd;
}
);
window.rubick.db.put(toRaw(superPanelPlugins.value));
const { rev } = window.rubick.db.put(toRaw(superPanelPlugins.value));
superPanelPlugins.value._rev = rev;
};
const hasAdded = (cmd) => {