<template>
<div class="column-s max-width maib-centr-column pannel-list-time">
<span
v-for="(TimeItem, index) in ListsTime"
:key="index"
:class="{'list-time-item': BookedTime.includes(TimeItem)}">
{{ TimeItem }}:00
</span>
</div>
</template>
<script>
export default {
data() {
return {
ListsTime: [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],
BookedTime: [11, 12, 15, 16, 17, 18, 21, 22, 23],
}
},
}
</script>
<style>
.list-time-item {
background-color: #E5E5E5;
}
</style>
declare(strict_types=1);
abstract class StrictArray extends ArrayObject
{
final public function __construct(array $array = []) {
$this->checkArray(
...array_filter(
$array,
static fn(int|string $key): bool => is_string($key),
ARRAY_FILTER_USE_KEY,
),
);
parent::__construct(array: $array);
}
#[Override]
public function append(mixed $value): void
{
// Заглушка для запрета добавления значения в массив
}
#[Override]
public function offsetSet(mixed $key, mixed $value): void
{
// Заглушка для запрета установки значения по ключу
}
}
final class Parameters extends StrictArray
{
protected function checkArray(
int $keyInt,
string $keyString,
bool $keyBool = false,
?DateTimeImmutable $keyDate= null,
): void {
}
}
$parameters = new Parameters([
'keyInt' => 1,
'keyDate' => new DateTimeImmutable('now'),
'keyBool' => true,
'keyString' => 'abc'
]);
Since there is no predefined limit to the length of a payload, recipients MUST anticipate potentially large decimal numerals and prevent parsing errors due to integer conversion overflows.
If the element which supports keyboard input (such as an input element, or any other element that would triggers a virtual keyboard to be shown on focus if a physical keyboard were not present), indicate focus.