// Сначала, как обычно сортируем по статусу
if (a.status > b.status) return 1;
if (a.status < b.status) return -1;
// Потом, если статусы равны, - по дате
if (a.date > b.date) return 1;
if (a.date < b.date) return -1;
return 0;
arr.sort((a,b) => {
if (a.status === b.status) {
if (a.date === b.date) return 0;
return a.date > b.date ? 1 : -1;
}
return a.status > b.status ? 1 : -1;
})
scroll
Overflow content is clipped at the element's padding box, and overflow content can be scrolled into view using scroll bars. User agents display scroll bars in both horizontal and vertical directions if only one value is set, whether or not any content is overflowing or clipped. The use of this keyword, therefore, can prevent scroll bars from appearing and disappearing as content changes.
$tel = '79000000000';
$formatted = preg_replace(
'/(\d)(\d{3})(\d{3})(\d{2})(\d{2})/',
'+$1 ($2) ***-**-$5',
$tel
);
var_dump($formatted);
$formatted = preg_replace(
'/(\d)(\d{3})(\d{5})(\d{2})/',
'+$1 ($2) ***-**-$4',
$tel
);
$formatted = preg_replace(
'/^(\d)(\d{3})\d+(\d{2})$/',
'+$1 ($2) ***-**-$3',
$tel
);
<tr v-for="chunk in chunks">
<td v-for="td in chunk">
<div clsas=grid>
<div v-for="spisok in receipt">
<div>№ ID {{ spisok.id }}</div>
<div> Наименование {{ spisok.name }}</div>
<div>Номер {{ spisok.number }}</div>
</div>
</div>
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
}