@php /** * 通用“工具被阻断提示块”。 * * 用法: * @include('admin.components.tool_blocked_hint', [ * 'dataRole' => 'xxx-blocked-hint', * 'reason' => '提示原因', * // actions: [['label' => '去xxx', 'url' => $url], ...] * 'actions' => [ ... ], * ]) */ $dataRole = (string) ($dataRole ?? ''); $reason = (string) ($reason ?? ''); $actions = (array) ($actions ?? []); @endphp
提示:{{ $reason }}
@if(count($actions) > 0)
@foreach($actions as $a) @php $label = (string) ($a['label'] ?? ''); $url = (string) ($a['url'] ?? ''); @endphp @if($label !== '' && $url !== '') {{ $label }} @endif @endforeach
@endif