Huanyuyuehui/pages/index/component/index.js

9 lines
255 B
JavaScript
Raw Normal View History

2024-03-21 18:05:36 +08:00
2024-03-21 17:52:58 +08:00
const path = require('path')
const files = require.context('./', false, /\.vue$/)
const modules = {}
files.keys().forEach(key => {
const name = path.basename(key, '.vue')
modules[name] = files(key).default || files(key)
})
export default modules