Answer the question
In order to leave comments, you need to log in
How to prevent certain elements from being displayed through VUE if the “no” field is checked in bitrix?
There is an output of elements that outputs ALL elements:
<div class="apartment-search-results" v-if="showedItems.length">
<div class="apartment-search-result" v-for="(item, index) in showedItems" :key="`apart_${item.id}`">
<div class="apartment-search-result__caption"><span>{{ item.roomsCount }}</span><span>{{ getWordByNumber(item.roomsCount, ['комната', 'комнаты', 'комнат']) }}</span>
</div>
<div class="apartment-search-result__image"><img :src="item.image"
:alt="`${item.roomsCount} комнаты`"></div>
<div class="apartment-search-result__params"><span>Общая площадь</span><span class="big-text">{{ item.space }} м²</span>
</div>
<div class="apartment-search-result__params"><span>Цена за м²</span><span class="big">{{ item.costPerMeter }} ₽</span>
</div>
<hr class="block-break">
<div class="apartment-search-result__price">{{ item.fullCost }} ₽</div>
<a class="button button--expanded button--font-bold button--style-orange" :href="item.url">Узнать
подробнее</a>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Head-on option: https://codepen.io/anon/pen/VBdKZN
A circle as a div given an image as background-image.If there is no content inside, and its task is exclusively graphic, then it is better to make it a pseudo-element.
margin-top: -[половина высоты круга]px
To make the image on the background take the circle forum:border-radius: [половина высоты круга]px
You don't need to disable, you only need to output those elements that match the value in the field from the backend
<div class="apartment-search-result" v-for="(item, index) in showedItems" :key="`apart_${item.id}`">
<p v-if="item.sold === 'yes'"> Показывает толкьо проданные</p>
</div>
:key="`apart_${item.id}`"
:key="item.id"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question