引入组件

  1. 组件文件写好后,将其在html中引用。
    <div>
        //组件文件名
        <shopList></shopList>
    </div>

     

  2. 在js中引入。
    import shopList from '@/components/publicCom/shopList';

     

  3. 定义组件。
    export default{
        components:{
            shopList
        }
    }

     

posted @ 2020-08-21 15:36  WillaWilla  阅读(178)  评论(0编辑  收藏  举报