mall-uniapp/sheep/api/index.js

11 lines
218 B
JavaScript
Raw Normal View History

2022-11-22 07:45:36 +00:00
const files = import.meta.globEager('./*.js');
let api = {};
Object.keys(files).forEach((key) => {
api = {
...api,
[key.replace(/(.*\/)*([^.]+).*/gi, '$2')]: files[key].default,
};
});
export default api;