main.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import ui from "@nuxt/ui/vue-plugin"
  2. import { createApp } from "vue"
  3. import { createRouter, createWebHistory } from "vue-router"
  4. import App from "~/App.vue"
  5. import BasicEditing from "~/pages/basic-editing.vue"
  6. import Blockquotes from "~/pages/blockquotes.vue"
  7. import CodeBlocks from "~/pages/code-blocks.vue"
  8. import EditorShell from "~/pages/editor-shell.vue"
  9. import IndexPage from "~/pages/index.vue"
  10. import InlineMarks from "~/pages/inline-marks.vue"
  11. import Links from "~/pages/links.vue"
  12. import MathPage from "~/pages/math.vue"
  13. import Properties from "~/pages/properties.vue"
  14. import RefsTags from "~/pages/refs-tags.vue"
  15. import Tasks from "~/pages/tasks.vue"
  16. import ToolbarPage from "~/pages/toolbar.vue"
  17. import "~/style.css"
  18. const routes = [
  19. { path: "/", component: IndexPage },
  20. { path: "/editor-shell", component: EditorShell },
  21. { path: "/basic-editing", component: BasicEditing },
  22. { path: "/inline-marks", component: InlineMarks },
  23. { path: "/tasks", component: Tasks },
  24. { path: "/blockquotes", component: Blockquotes },
  25. { path: "/links", component: Links },
  26. { path: "/refs-tags", component: RefsTags },
  27. { path: "/code-blocks", component: CodeBlocks },
  28. { path: "/properties", component: Properties },
  29. { path: "/math", component: MathPage },
  30. { path: "/toolbar", component: ToolbarPage },
  31. ]
  32. const app = createApp(App)
  33. const router = createRouter({
  34. history: createWebHistory(import.meta.env.BASE_URL),
  35. routes,
  36. })
  37. app.use(router)
  38. app.use(ui)
  39. app.mount("#app")