feat: calendar & router configs
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { Dialog } from "primevue";
|
||||
import { useErrorStore } from "./stores/error.store";
|
||||
import CommentScheme from "./comment/CommentScheme.vue";
|
||||
import PosttypeScheme from "./posttype/PosttypeScheme.vue";
|
||||
import PostScheme from "./post/PostScheme.vue";
|
||||
import { RouterView, useRoute } from "vue-router";
|
||||
|
||||
const errorStore = useErrorStore();
|
||||
|
||||
const route = useRoute();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -18,6 +18,6 @@ const errorStore = useErrorStore();
|
||||
<h1 class="text-red-500 text-2xl">{{ errorStore.message }}</h1>
|
||||
</Dialog>
|
||||
<main class="w-screen h-screen">
|
||||
<PostScheme></PostScheme>
|
||||
<RouterView />
|
||||
</main>
|
||||
</template>
|
||||
|
||||
20
frontend/src/components/calendar/Calendar.vue
Normal file
20
frontend/src/components/calendar/Calendar.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import { Qalendar } from "qalendar";
|
||||
|
||||
const config = {
|
||||
month: {
|
||||
showTrailingAndLeadingDates: false,
|
||||
},
|
||||
locale: 'ru-RU',
|
||||
defaultMode: 'month',
|
||||
isSilent: true,
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Qalendar :config></Qalendar>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
@import "qalendar/dist/style.css";
|
||||
</style>
|
||||
4
frontend/src/components/calendar/qalendar.d.ts
vendored
Normal file
4
frontend/src/components/calendar/qalendar.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
declare module 'qalendar' {
|
||||
import { DefineComponent } from 'vue';
|
||||
export const Qalendar: DefineComponent<{}, {}, any>;
|
||||
}
|
||||
@@ -6,8 +6,9 @@ import Aura from '@primevue/themes/aura'
|
||||
import 'primeicons/primeicons.css'
|
||||
import { ru } from 'primelocale/js/ru.js'
|
||||
import { createPinia } from 'pinia'
|
||||
import { router } from './router/router'
|
||||
|
||||
createApp(App).use(createPinia()).use(Config, {
|
||||
createApp(App).use(router).use(createPinia()).use(Config, {
|
||||
theme: {
|
||||
preset: Aura,
|
||||
},
|
||||
|
||||
8
frontend/src/pages/Index.vue
Normal file
8
frontend/src/pages/Index.vue
Normal file
@@ -0,0 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import Calendar from '../components/calendar/Calendar.vue';
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Calendar />
|
||||
</template>
|
||||
13
frontend/src/router/router.ts
Normal file
13
frontend/src/router/router.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { createRouter, createWebHistory, type RouteRecordRaw } from "vue-router";
|
||||
import Index from "../pages/Index.vue";
|
||||
|
||||
export const routes: RouteRecordRaw[] = [{
|
||||
path: "/",
|
||||
component: Index,
|
||||
name: 'Главная',
|
||||
}]
|
||||
|
||||
export const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
});
|
||||
Reference in New Issue
Block a user