index.js
678 Bytes
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-02-08 17:44:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-02-08 17:54:40
* @FilePath: \h5Demo\src\components\KnowledgeSports\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import Vue from "vue";
const componentsFiles = require.context(`./`, false, /.vue$/);
componentsFiles.keys().forEach((path) => {
const component = componentsFiles(path).default;
console.log(component.name, component.name);
Vue.component(component.name, component);
});