feat: 插件加载提示只在第一次加载时弹出(后面插件会缓存下来)

This commit is contained in:
539943419 committed 2024-09-05 00:12:35 +08:00
1 parent ec4ed10afd
commit b0cf5b312a
1 file changed
+6 -3
+6 -3
View File
@@ -67,12 +67,15 @@ export default class PluginCenter {
return;
}
const setAlertTip = key !== 'miaoDirectory' && this.globalAlertTip(`加载 ${name} 插件中`);
if (_component === undefined) _component = await getComponent();
setAlertTip && setAlertTip(`加载 ${name} 插件完成`, {
if (_component === undefined) {
const setAlertTip = key !== "miaoDirectory" && this.globalAlertTip(`加载 ${name} 插件中`);
_component = await getComponent();
setAlertTip &&
setAlertTip(`加载 ${name} 插件完成`, {
type: "success",
timeout: 2000
});
}
views.push(_component, VDirectories, VFiles, {
VirtualPageOption: {
exitConfirm