mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-16 23:54:19 +08:00
🐛 修复超级面板设置bug
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
"code": "installed",
|
||||
"explain": "已安装插件",
|
||||
"cmds":[
|
||||
"已安装插件"
|
||||
"已安装插件", "installed"
|
||||
]
|
||||
},{
|
||||
"code": "settings",
|
||||
|
||||
@@ -108,6 +108,7 @@ const changeMenu = (key: any) => {
|
||||
};
|
||||
|
||||
window.rubick.onPluginEnter(({ code }: { code: string }) => {
|
||||
code = code === '已安装插件' ? 'installed' : code;
|
||||
changeMenu(code);
|
||||
store.commit('commonUpdate', {active: [code]})
|
||||
});
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user