uniapp中引入公共组件


1、在目录component中写了一个组件
Footer.vue

<template>
    <view class="footer">
    </view>
</template>

 

2、在index.vue中引入Footer组件 并在实例中注册

import Footer from '../components/footer.vue' 
components:{  
     Footer
}

页面中引用

<view class="content">      
    <view class="icon">
    </view>
    <Footer></Footer>
</view>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM