layui/package/document-layer/main.ts
2022-06-25 20:10:12 +08:00

25 lines
682 B
TypeScript

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";
export function createApp(): {
app: App<Element>;
router: Router;
} {
const app = _createApp(Layout);
const router = createRouter();
app
.use(router)
.component("LayCode", LayCode)
.component("Children1", Children1)
.component("Children2", Children2);
return { app, router };
}