mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-26 00:53:54 +08:00
update:拆分页面
This commit is contained in:
@@ -37,4 +37,32 @@ function get(api, fn) {
|
||||
}
|
||||
fn(data);
|
||||
});
|
||||
}
|
||||
|
||||
// 注册全局组件
|
||||
const AppHeader = {
|
||||
template: `
|
||||
<header class="app-header">
|
||||
<div class="header-logo">AI</div>
|
||||
<slot>xiaozhi-esp32-server</slot>
|
||||
</header>
|
||||
`
|
||||
};
|
||||
|
||||
const AppFooter = {
|
||||
template: `
|
||||
<footer class="app-footer">
|
||||
<slot>© 2025 xiaozhi-esp32-server</slot>
|
||||
</footer>
|
||||
`
|
||||
};
|
||||
|
||||
// 初始化Vue应用的通用配置
|
||||
function createVueApp(options) {
|
||||
const app = Vue.createApp({
|
||||
...options,
|
||||
components: { AppHeader, AppFooter }
|
||||
});
|
||||
app.use(ElementPlus);
|
||||
return app;
|
||||
}
|
||||
Reference in New Issue
Block a user