vue-cli中 components插件的应用
Posted lipu12281
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vue-cli中 components插件的应用相关的知识,希望对你有一定的参考价值。
在你要使用插件的页面
import footerT from ‘@/components/footer/index.vue‘;//引入要使用的文件 import headerT from ‘@/components/header/index.vue‘; export default { components:{footerT,headerT}//注册插件名 }
插件传值时首先进行props暴露,data中不用出现你要暴露的值
export default { data() { return { } }, props:["magess"] }
在使用页
<header-t :magess="title"></header-t>//header-t为此处的插件
以上是关于vue-cli中 components插件的应用的主要内容,如果未能解决你的问题,请参考以下文章