data: () => ({
sortOptions: [
{ value: 'PriceMinMax', text: 'сначала дешевле' },
{ value: 'PriceMaxMin', text: 'сначала дороже' },
],
...
}),
<ul>
<li
v-for="n in sortOptions"
v-text="n.text"
:class="{ active: sortBy === n.value }"
@click="sortBy = n.value"
></li>
</ul>
li.active {
color: red;
}
if (strpos($dir, 'treatment')) {
if (!empty($treatment)) {
echo ($treatment);
}
} else if (strpos($dir, 'programs-and-services')) {
if (!empty($programsAndServies)) {
echo ($programsAndServies);
}
} else if (strpos($dir, 'doctors')) {
if (!empty($doctors)) {
echo ($doctors);
}
} else if (strpos($dir, 'questions')) {
if (!empty($questions)) {
echo ($questions);
}
} else {
echo ("Нет");
}
[[+title:lcase]]