[增添]添加了datasource的setting数据库以及默认值

This commit is contained in:
makotocc0107
2024-08-27 09:57:44 +08:00
parent d111dfaea4
commit 72eb990970
10955 changed files with 978898 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
<x-filament-tables::cell
:attributes="
\Filament\Support\prepare_inherited_attributes($attributes)
->class(['fi-ta-selection-cell w-1'])
"
>
<div class="px-3 py-4">
{{ $slot }}
</div>
</x-filament-tables::cell>

View File

@@ -0,0 +1,21 @@
@props([
'label' => null,
])
<label class="flex">
<x-filament::input.checkbox
:attributes="
\Filament\Support\prepare_inherited_attributes($attributes)
->merge([
'wire:loading.attr' => 'disabled',
'wire:target' => implode(',', \Filament\Tables\Table::LOADING_TARGETS),
], escape: false)
"
/>
@if (filled($label))
<span class="sr-only">
{{ $label }}
</span>
@endif
</label>

View File

@@ -0,0 +1,10 @@
<x-filament-tables::cell
:attributes="
\Filament\Support\prepare_inherited_attributes($attributes)
->class(['fi-ta-group-selection-cell bg-gray-50 dark:bg-white/5 w-1'])
"
>
<div class="px-3">
{{ $slot }}
</div>
</x-filament-tables::cell>

View File

@@ -0,0 +1,26 @@
@props([
'key',
'page' => null,
'title',
])
{{-- format-ignore-start --}}
<x-filament-tables::selection.checkbox
:wire:key="$this->getId() . 'table.bulk_select_group.checkbox.' . $page"
:label="__('filament-tables::table.fields.bulk_select_group.label', ['title' => $title])"
:x-bind:checked="'
const recordsInGroup = getRecordsInGroupOnPage(' . \Illuminate\Support\Js::from($key) . ')
if (recordsInGroup.length && areRecordsSelected(recordsInGroup)) {
$el.checked = true
return \'checked\'
}
$el.checked = false
return null
'"
:x-on:click="'toggleSelectRecordsInGroup(' . \Illuminate\Support\Js::from($key) . ')'"
/>
{{-- format-ignore-end --}}

View File

@@ -0,0 +1,68 @@
@props([
'allSelectableRecordsCount',
'deselectAllRecordsAction' => 'deselectAllRecords',
'end' => null,
'page' => null,
'selectAllRecordsAction' => 'selectAllRecords',
'selectCurrentPageOnly' => false,
'selectedRecordsCount',
'selectedRecordsPropertyName' => 'selectedRecords',
])
<div
x-cloak
{{
$attributes
->merge([
'wire:key' => "{$this->getId()}.table.selection.indicator",
], escape: false)
->class([
'fi-ta-selection-indicator flex flex-col justify-between gap-y-1 bg-gray-50 px-3 py-2 dark:bg-white/5 sm:flex-row sm:items-center sm:px-6 sm:py-1.5',
])
}}
>
<div class="flex gap-x-3">
<x-filament::loading-indicator
x-show="isLoading"
class="h-5 w-5 text-gray-400 dark:text-gray-500"
/>
<span
x-text="
window.pluralize(@js(__('filament-tables::table.selection_indicator.selected_count')), {{ $selectedRecordsPropertyName }}.length, {
count: {{ $selectedRecordsPropertyName }}.length,
})
"
class="text-sm font-medium leading-6 text-gray-700 dark:text-gray-200"
></span>
</div>
<div class="flex gap-x-3">
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::SELECTION_INDICATOR_ACTIONS_BEFORE, scopes: static::class) }}
<div class="flex gap-x-3">
<x-filament::link
color="primary"
tag="button"
:x-on:click="$selectAllRecordsAction"
:x-show="$selectCurrentPageOnly ? '! areRecordsSelected(getRecordsOnPage())' : $allSelectableRecordsCount . ' !== ' . $selectedRecordsPropertyName . '.length'"
{{-- Make sure the Alpine attributes get re-evaluated after a Livewire request: --}}
:wire:key="$this->getId() . 'table.selection.indicator.actions.select-all.' . $allSelectableRecordsCount . '.' . $page"
>
{{ trans_choice('filament-tables::table.selection_indicator.actions.select_all.label', $allSelectableRecordsCount) }}
</x-filament::link>
<x-filament::link
color="danger"
tag="button"
:x-on:click="$deselectAllRecordsAction"
>
{{ __('filament-tables::table.selection_indicator.actions.deselect_all.label') }}
</x-filament::link>
</div>
{{ \Filament\Support\Facades\FilamentView::renderHook(\Filament\Tables\View\TablesRenderHook::SELECTION_INDICATOR_ACTIONS_AFTER, scopes: static::class) }}
{{ $end }}
</div>
</div>