Files
saasshop/resources/views/admin/components/metric_explain.blade.php

26 lines
995 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@php
$items = $items ?? [];
$title = $title ?? '口径说明';
$collapsible = (bool) ($collapsible ?? true);
@endphp
@if(is_array($items) && count($items) > 0)
@if($collapsible)
<details class="collapsible muted muted-xs" data-role="metric-explain" style="margin-top:4px;">
<summary class="collapsible-summary"><strong>{{ $title }}</strong><span class="muted">(点击展开)</span></summary>
<div class="collapsible-body">
@foreach($items as $i => $text)
<span>{{ $text }}@if($i < count($items) - 1)@endif</span>
@endforeach
</div>
</details>
@else
<div class="muted muted-xs" data-role="metric-explain" style="margin-top:4px;">
<strong>{{ $title }}</strong>
@foreach($items as $i => $text)
<span>{{ $text }}@if($i < count($items) - 1)@endif</span>
@endforeach
</div>
@endif
@endif