mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-18 15:36:37 +08:00
21 lines
421 B
JavaScript
21 lines
421 B
JavaScript
|
|
/**
|
||
|
|
* plugins/app.js
|
||
|
|
*
|
||
|
|
* Automatically loads and bootstraps files
|
||
|
|
* in the `./src/components/` folder.
|
||
|
|
*/
|
||
|
|
|
||
|
|
// Imports
|
||
|
|
import Vue from 'vue'
|
||
|
|
|
||
|
|
const requireComponent = require.context('@/components', true, /\.vue$/)
|
||
|
|
|
||
|
|
for (const file of requireComponent.keys()) {
|
||
|
|
const componentConfig = requireComponent(file)
|
||
|
|
|
||
|
|
Vue.component(
|
||
|
|
componentConfig.default.name,
|
||
|
|
componentConfig.default || componentConfig,
|
||
|
|
)
|
||
|
|
}
|