diff --git a/.storybook/addons.ts b/.storybook/addons.ts index 06915d6e12..fa8ed5f333 100644 --- a/.storybook/addons.ts +++ b/.storybook/addons.ts @@ -1,3 +1,3 @@ -import '@storybook/addon-actions/register'; +// import '@storybook/addon-actions/register'; import '@storybook/addon-notes/register'; import '@storybook/addon-storysource/register'; diff --git a/.storybook/config.ts b/.storybook/config.ts index 1ba384f5ac..5775ec8e8f 100644 --- a/.storybook/config.ts +++ b/.storybook/config.ts @@ -1,6 +1,6 @@ // tslint:disable-next-line:no-submodule-imports import '!style-loader!css-loader!sass-loader!./iframe.scss'; -import '@storybook/addon-console'; +// import '@storybook/addon-console'; import { addParameters, configure } from '@storybook/react'; import { create } from '@storybook/theming'; diff --git a/package.json b/package.json index 69b30cd336..2b7e5e75a8 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "clean-webpack-plugin": "^0.1.19", "commitizen": "^4.0.3", "copy-webpack-plugin": "^4.5.2", - "core-js": "3", + "core-js": "^3.4.7", "coveralls": "^3.0.7", "cross-env": "^6.0.3", "css-loader": "^3.2.0", diff --git a/packages/core/src/services/scene/SceneService.ts b/packages/core/src/services/scene/SceneService.ts index 0fb1ef9056..5813ed1e3e 100644 --- a/packages/core/src/services/scene/SceneService.ts +++ b/packages/core/src/services/scene/SceneService.ts @@ -151,7 +151,10 @@ export default class Scene extends EventEmitter implements ISceneService { this.$container = $container; if ($container) { await this.rendererService.init($container); - elementResizeEvent(this.$container, this.handleWindowResized); + elementResizeEvent( + this.$container as HTMLDivElement, + this.handleWindowResized, + ); // window.addEventListener('resize', this.handleWindowResized, false); } else { this.logger.error('容器 id 不存在'); @@ -214,7 +217,7 @@ export default class Scene extends EventEmitter implements ISceneService { this.removeAllListeners(); this.rendererService.destroy(); this.map.destroy(); - unbind(this.$container); + unbind(this.$container as HTMLDivElement, this.handleWindowResized); // window.removeEventListener('resize', this.handleWindowResized, false); }