初始版本提交

This commit is contained in:
yaoyn
2024-02-05 09:15:37 +08:00
parent b52d4414be
commit 445292105f
1848 changed files with 236859 additions and 75 deletions

View File

@ -0,0 +1,28 @@
import { App } from 'vue';
import VueGridLayout from 'vue-grid-layout';
export function setupDesktop(app: App) {
app.use(VueGridLayout);
const requireComponent = import.meta.glob('../../views/desktop/components/*/*.vue', {
eager: true,
});
Object.keys(requireComponent).forEach((key) => {
if (!requireComponent[key].default.name) return;
if (requireComponent[key].default.__file.includes('config')) {
app.component(
requireComponent[key].default.name.toLowerCase() + '-config',
requireComponent[key].default,
);
} else {
app.component(
requireComponent[key].default.name.toLowerCase() + '-view',
requireComponent[key].default,
);
}
});
console.log(app);
}