added ignoring formatting of API

This commit is contained in:
minicx 2023-03-04 19:32:33 +03:00
parent d591f85509
commit 34946a278e
3 changed files with 35 additions and 20 deletions

1
.prettierignore Normal file
View File

@ -0,0 +1 @@
/src/api

View File

@ -75,7 +75,12 @@ onUnmounted(() => {
<div class="modalTop">
<div class="modalTopInfo">
<h1>Создание елемента в {{ store.state.parent }}</h1>
<button type="button" class="btn-close" aria-label="Close" @click="close"></button>
<button
type="button"
class="btn-close"
aria-label="Close"
@click="close"
></button>
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="basic-addon1">Название</span>

View File

@ -4,30 +4,39 @@ import markdownModal from './markdownModal.vue';
import { store } from '../main.js';
import { ref, onMounted } from 'vue';
import { api } from '../main.js';
const addElement = (evt) =>{
store.commit('setVisible')
store.commit('getParent',evt.target.getAttribute('parent'))
console.log(store.state.parent)
}
let linkers = ref()
const addElement = (evt) => {
store.commit('setVisible');
store.commit('getParent', evt.target.getAttribute('parent'));
console.log(store.state.parent);
};
let linkers = ref();
onMounted(async()=>{
linkers = await api.getLinkers()
})
onMounted(async () => {
linkers = await api.getLinkers();
});
</script>
<template>
<div class="dropdown">
<button class="dropbtn">ГЛАВНАЯ</button>
<div class="dropdown-content" @click="addElement">Создать</div>
</div>
<div class="dropdown" v-for="title in linkers?.filter((parent) => parent===null).title">
<button class="dropbtn">{{title}}</button>
<div class="dropdown-content">
{{linkers && linkers.filter((linker)=>linker.title === title) }}
<div class="add" parent="сведения об образовательной организации" @click = addElement><Icon icon="ic:baseline-add-circle"/>Добавить</div>
</div>
<div class="dropdown">
<button class="dropbtn">ГЛАВНАЯ</button>
<div class="dropdown-content" @click="addElement">Создать</div>
</div>
<div
class="dropdown"
v-for="title in linkers?.filter((parent) => parent === null).title"
>
<button class="dropbtn">{{ title }}</button>
<div class="dropdown-content">
{{ linkers && linkers.filter((linker) => linker.title === title) }}
<div
class="add"
parent="сведения об образовательной организации"
@click="addElement"
>
<Icon icon="ic:baseline-add-circle" />Добавить
</div>
</div>
</div>
</template>
<style scoped>