var viewedPlan = new Plan ()
import App from './App.vue'
export default {
install: function () {
App.viewedPlan = viewedPlan
}
}
<div class='category-div__list'
:class='[!$store.state.mobile ? "category-div__list_desktop" : "category-div__list_mobile"]'
v-show="showList"
>
<span class='category-div__span'
:key="cat.id"
v-for='cat of categoryList'
@click="
$store.dispatch('bodySwitchScrolling', 1),
$store.dispatch('menuСategoryHider', 1),
$store.dispatch('getNews', {category: cat})"
>{{ cat }}</span>
<button class='category-div__close' value='Закрыть'>Закрыть</button>
</div>
.category-div__list{
display: grid;
grid-template-rows: min-content;
padding: 1vmin;
background-color: white;
border-width: 1px 1px 1px 1px;
border-color: black;
border-style: solid;
}
.category-div__list:nth-child(2n){
background-color: rgb(245, 245, 245);
}
.category-div__list_desktop{
position: absolute;
top: 100%;
left: -25%;
grid-gap: 1vmin;
}