[增添]添加了datasource的setting数据库以及默认值
This commit is contained in:
54
vendor/filament/tables/resources/views/columns/summaries/icon-count.blade.php
vendored
Normal file
54
vendor/filament/tables/resources/views/columns/summaries/icon-count.blade.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
<div
|
||||
{{
|
||||
$attributes
|
||||
->merge($getExtraAttributes(), escape: false)
|
||||
->class(['fi-ta-icon-count-summary grid gap-y-1.5 px-3 py-4'])
|
||||
}}
|
||||
>
|
||||
@if (filled($label = $getLabel()))
|
||||
<p class="text-sm font-medium text-gray-950 dark:text-white">
|
||||
{{ $label }}
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@if ($state = $getState())
|
||||
<div class="grid gap-y-1.5">
|
||||
@foreach ($state as $color => $icons)
|
||||
@php
|
||||
$color = json_decode($color);
|
||||
@endphp
|
||||
|
||||
@foreach ($icons as $icon => $count)
|
||||
@if (filled($icon))
|
||||
<div class="flex items-center justify-end gap-x-1.5">
|
||||
<span
|
||||
class="text-sm text-gray-500 dark:text-gray-400"
|
||||
>
|
||||
{{ $count }}
|
||||
</span>
|
||||
|
||||
<x-filament::icon
|
||||
:icon="$icon"
|
||||
@class([
|
||||
'fi-ta-icon-count-summary-icon h-6 w-6',
|
||||
match ($color) {
|
||||
'gray' => 'text-gray-400 dark:text-gray-500',
|
||||
default => 'fi-color-custom text-custom-500 dark:text-custom-400',
|
||||
},
|
||||
is_string($color) ? 'fi-color-' . $color : null,
|
||||
])
|
||||
@style([
|
||||
\Filament\Support\get_color_css_variables(
|
||||
$color,
|
||||
shades: [400, 500],
|
||||
alias: 'tables::columns.summaries.icon-count.icon',
|
||||
) => $color !== 'gray',
|
||||
])
|
||||
/>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
31
vendor/filament/tables/resources/views/columns/summaries/range.blade.php
vendored
Normal file
31
vendor/filament/tables/resources/views/columns/summaries/range.blade.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<div
|
||||
{{
|
||||
$attributes
|
||||
->merge($getExtraAttributes(), escape: false)
|
||||
->class(['fi-ta-range-summary grid gap-y-1 px-3 py-4'])
|
||||
}}
|
||||
>
|
||||
@php
|
||||
$state = $formatState($getState());
|
||||
$from = $state[0] ?? null;
|
||||
$to = $state[1] ?? null;
|
||||
@endphp
|
||||
|
||||
@if (filled($label = $getLabel()))
|
||||
<span class="text-sm font-medium text-gray-950 dark:text-white">
|
||||
{{ $label }}
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if (filled($from) || filled($to))
|
||||
<span class="text-sm text-gray-500 dark:text-gray-400">
|
||||
{{ $from }}
|
||||
|
||||
@if (filled($from) && filled($to))
|
||||
-
|
||||
@endif
|
||||
|
||||
{{ $to }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
17
vendor/filament/tables/resources/views/columns/summaries/text.blade.php
vendored
Normal file
17
vendor/filament/tables/resources/views/columns/summaries/text.blade.php
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<div
|
||||
{{
|
||||
$attributes
|
||||
->merge($getExtraAttributes(), escape: false)
|
||||
->class(['fi-ta-text-summary grid gap-y-1 px-3 py-4'])
|
||||
}}
|
||||
>
|
||||
@if (filled($label = $getLabel()))
|
||||
<span class="text-sm font-medium text-gray-950 dark:text-white">
|
||||
{{ $label }}
|
||||
</span>
|
||||
@endif
|
||||
|
||||
<span class="text-sm text-gray-500 dark:text-gray-400">
|
||||
{{ $formatState($getState()) }}
|
||||
</span>
|
||||
</div>
|
||||
27
vendor/filament/tables/resources/views/columns/summaries/values.blade.php
vendored
Normal file
27
vendor/filament/tables/resources/views/columns/summaries/values.blade.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<div
|
||||
{{
|
||||
$attributes
|
||||
->merge($getExtraAttributes(), escape: false)
|
||||
->class(['fi-ta-values-summary grid gap-y-1 px-3 py-4'])
|
||||
}}
|
||||
>
|
||||
@if (filled($label = $getLabel()))
|
||||
<span class="text-sm font-medium text-gray-950 dark:text-white">
|
||||
{{ $label }}
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if ($state = $getState())
|
||||
<ul
|
||||
@class([
|
||||
'list-inside list-disc' => $isBulleted(),
|
||||
])
|
||||
>
|
||||
@foreach ($state as $stateItem)
|
||||
<li class="text-sm text-gray-500 dark:text-gray-400">
|
||||
{{ $formatState($stateItem) }}
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</div>
|
||||
Reference in New Issue
Block a user