added ignoring formatting of API
This commit is contained in:
parent
d591f85509
commit
34946a278e
1
.prettierignore
Normal file
1
.prettierignore
Normal file
|
@ -0,0 +1 @@
|
|||
/src/api
|
|
@ -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>
|
||||
|
|
|
@ -4,16 +4,16 @@ 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>
|
||||
|
@ -21,11 +21,20 @@ onMounted(async()=>{
|
|||
<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"
|
||||
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>
|
||||
{{ linkers && linkers.filter((linker) => linker.title === title) }}
|
||||
<div
|
||||
class="add"
|
||||
parent="сведения об образовательной организации"
|
||||
@click="addElement"
|
||||
>
|
||||
<Icon icon="ic:baseline-add-circle" />Добавить
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Reference in a new issue