怎样使用

方法一:

单独引用某个特定的组件(注:地址需根据自身放置的位置修改)

import yileAvatar from "@/yile-ui/yile-avatar/yile-avatar.vue" 
export default {
    components:{
        yileAvatar   
    }
}


方法二:

传统vue组件,需要安装、引用、注册,三个步骤后才能使用组件。easycom将其精简为一步。只要组件安装在项目的components目录下,并符合components/组件名称/组件名称.vue目录结构。就可以不用引用、注册,直接在页面中使用。如下:

在 pages.json 中 添加配置:
"easycom": {
        "autoscan": true,
        "custom": {
            "yile-(.*)": "@/yile-ui/components/yile-$1/yile-$1.vue"
        }
}