layui/package/document-component/src/main.ts

33 lines
980 B
TypeScript
Raw Normal View History

2022-04-05 10:31:31 +08:00
import Layout from "./App.vue";
import { App, createApp as _createApp } from "vue";
import { createRouter } from "./router/index";
import { Router } from "vue-router";
2022-04-06 00:24:20 +08:00
import Store from "./store";
import layui from "../../component/src/index";
2022-04-05 10:31:31 +08:00
import LayCode from "./components/LayCode.vue";
import LaySearch from "./components/LaySearch.vue";
import LayTableBox from "./components/LayTableBox.vue";
import LayAnchor from "./components/LayAnchor.vue";
import LayContributor from "./components/LayContributor.vue";
2022-04-05 10:31:31 +08:00
import "./assets/css/index.css";
export function createApp(): {
app: App<Element>;
router: Router;
} {
const app = _createApp(Layout);
const router = createRouter();
app
2022-05-23 17:22:17 +08:00
.use(layui)
.use(Store)
2022-06-20 19:06:00 +08:00
.use(router)
2022-05-23 17:22:17 +08:00
.component("LayCode", LayCode)
.component("LaySearch", LaySearch)
.component("LayTableBox", LayTableBox)
.component("LayAnchor", LayAnchor)
.component("LayContributor", LayContributor);
2022-04-05 10:31:31 +08:00
return { app, router };
}