acdr/ruoyi-vue-pro/yudao-ui/yudao-ui-mall-uniapp/sheep/api/migration/index.js
2024-09-02 07:40:26 +08:00

10 lines
229 B
JavaScript

const files = import.meta.glob('./*.js', { eager: true });
let api = {};
Object.keys(files).forEach((key) => {
api = {
...api,
[key.replace(/(.*\/)*([^.]+).*/gi, '$2')]: files[key].default,
};
});
export default api;