2022-06-24 14:55:50 +08:00
|
|
|
import Layout from "./App.vue";
|
|
|
|
import { App, createApp as _createApp } from "vue";
|
|
|
|
import { createRouter } from "./src/router/index";
|
|
|
|
import { Router } from "vue-router";
|
|
|
|
import LayCode from "./src/components/LayCode.vue";
|
|
|
|
import Children1 from "./src/components/Children1.vue";
|
|
|
|
import Children2 from "./src/components/Children2.vue";
|
|
|
|
import "./src/assets/css/index.css";
|
2022-06-24 11:48:14 +08:00
|
|
|
|
|
|
|
export function createApp(): {
|
2022-06-24 14:55:50 +08:00
|
|
|
app: App<Element>;
|
|
|
|
router: Router;
|
2022-06-24 11:48:14 +08:00
|
|
|
} {
|
|
|
|
const app = _createApp(Layout);
|
|
|
|
const router = createRouter();
|
|
|
|
|
2022-06-24 14:55:50 +08:00
|
|
|
app
|
|
|
|
.use(router)
|
|
|
|
.component("LayCode", LayCode)
|
|
|
|
.component("Children1", Children1)
|
|
|
|
.component("Children2", Children2);
|
2022-06-24 11:48:14 +08:00
|
|
|
|
2022-06-24 14:55:50 +08:00
|
|
|
return { app, router };
|
|
|
|
}
|