vue2 组件使用setup语法糖编写 并打包发布 项目中引用时报错 #12504
Replies: 1 comment 1 reply
-
这个语法糖貌似是3.0引入的 https://github.com/vuejs/core/releases/tag/v3.0.0 Experimental Features 处说明 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
vue2.7版本 当我使用setup语法 编写公共组件库 并且打包后发布都私有仓库时 在别的项目引用时会报错:
[Vue warn]: onUnmounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().
但是当我将编译好的文件直接放到项目中引用时就可以正常运行
组件内容如下:
Beta Was this translation helpful? Give feedback.
All reactions