- 博客(8)
- 收藏
- 关注
原创 vue3组合式api父组件调用子组件xxx is not a function
注意:这个时候我们以为大功告成了,但是却发生了错误xxx.showModal is not a function。1.第一步在子组件(Son.vue)中写一个方法showModal ,用于显示弹窗。3. 在子组件中使用defineExpose()暴露方法。这个时候我们就可以调用子组件中的方法。链获取到的组件的公开实例,的——即通过模板引用或者。4.在son组件中暴露方法。2.在父组件中引入子组件。编译器宏来显式指定在。以下是vue官网的解释。
2024-04-19 11:12:15 369 2
原创 vue3项目如何按需引入ant design vue组件和图标
3.按需引入,新建antDesignVue.js文件。1.下载babel-plugin-import插件。2.在babel.config文件中加入以下代码。完整babel.config文件。4.在mainjs文件组件并注册。
2023-04-25 15:37:03 1522
原创 You are using the runtime-only build of Vue where the template compiler is not available. Either pre
You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
2022-07-25 23:09:26 307
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人