美文网首页
uni-app使用easycom自动引入组件

uni-app使用easycom自动引入组件

作者: Limolovely | 来源:发表于2020-08-06 11:08 被阅读0次

例如 :在components文件夹中以    uni-   开头的组件(规则可以自定)

在pages.json引入

"easycom": {

"autoscan": true, //是否自动扫描组件

"custom": { //自定义扫描规则

"uni-(.*)": "@/components/uni-$1/uni-$1.vue"        //在components文件夹中以   uni-   开头的组件

}

}

相关文章

网友评论

      本文标题:uni-app使用easycom自动引入组件

      本文链接:https://www.haomeiwen.com/subject/pbrzrktx.html