/
45case
/
ptable
Обзор
Документация
Войти
/
45case
/
ptable
Код
Запросы
3
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
dev
src/app/router.ts
48 строк
1 KB
Olya
Страница Электроны + сайдбар с характеритстиками (Степень окисления, Конфигурация, Развёрнутая, Уровни энергии, ВЗМО)
24 июл 2026, 11:54
24 июл 2026, 11:54
3cf1d48
Код
Авторство
О чём код?
import { createRouter, createWebHashHistory, createWebHistory } from "vue-router"; import CompoundPage from "@/pages/compounds/CompoundPage.vue"; import HomePage from "@/pages/home/HomePage.vue"; import IsotopesPage from "@/pages/isotopes/IsotopesPage.vue"; import NotFoundPage from "@/pages/not-found/NotFoundPage.vue"; import PropertiesPage from "@/pages/properties/PropertiesPage.vue"; const isFileProtocol = typeof window !== "undefined" && window.location.protocol === "file:"; export const router = createRouter({ history: isFileProtocol ? createWebHashHistory() : createWebHistory(), routes: [ { path: "/", name: "home", component: HomePage, meta: { workspace: "periodic" }, }, { path: "/properties", name: "properties", component: PropertiesPage, }, { path: "/compounds", name: "compounds", component: CompoundPage, }, { path: "/electrons", name: "electrons", component: HomePage, meta: { workspace: "periodic" }, }, { path: "/isotopes", name: "isotopes", component: IsotopesPage, }, { path: "/:pathMatch(.*)*", name: "not-found", component: NotFoundPage, }, ], });