diff --git a/pictureBed/preload.js b/pictureBed/preload.js index 51884c4..204bb8d 100644 --- a/pictureBed/preload.js +++ b/pictureBed/preload.js @@ -200,4 +200,6 @@ function portUsed(port) { } }); }); -} \ No newline at end of file +} + +window.onPluginReady = utools.onPluginReady ? utools.onPluginReady : (callback) => { callback() }; \ No newline at end of file diff --git a/picturebed-vue/src/views/index.vue b/picturebed-vue/src/views/index.vue index e41f4c9..48cc2f7 100644 --- a/picturebed-vue/src/views/index.vue +++ b/picturebed-vue/src/views/index.vue @@ -114,7 +114,7 @@ export default { }, created () { // eslint-disable-next-line no-undef - utools.onPluginReady(() => { + window.onPluginReady(() => { // 版本检查 uToolsUtils.isNewVersion() // 数据读入