icetalker/filament-table-repeatable-entry

以表格形式显示 Filament RepeatableEntry

v1.0.3 2024-08-28 14:15 UTC

This package is auto-updated.

Last update: 2024-08-28 14:16:48 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

这是一个 Filament Infolists 组件,用于以表格形式显示 RepetableEntry。如果您正在使用 TableRepeater 而不是 RelationManager。

安装

您可以通过 composer 安装此包

composer require icetalker/filament-table-repeatable-entry

使用方法

namespace Icetalker\FilamentTableRepeater\Forms\Components;

TableRepeatableEntry::make('items')
    ->schema([
        Infolists\Components\TextEntry::make('product'),
        Infolists\Components\TextEntry::make('quantity'),
        Infolists\Components\TextEntry::make('price'),
    ])
    ->columnSpan(2),

条纹行

要启用条纹表格行,您可以使用 striped() 方法

namespace Icetalker\FilamentTableRepeater\Forms\Components;

TableRepeatableEntry::make('items')
    ->schema([
        Infolists\Components\TextEntry::make('product'),
        Infolists\Components\TextEntry::make('quantity'),
        Infolists\Components\TextEntry::make('price'),
    ])
    ->striped()
    ->columnSpan(2),

显示索引

要显示表格行索引,请使用 showIncdex()

namespace Icetalker\FilamentTableRepeater\Forms\Components;

TableRepeatableEntry::make('items')
    ->schema([
        Infolists\Components\TextEntry::make('product'),
        Infolists\Components\TextEntry::make('quantity'),
        Infolists\Components\TextEntry::make('price'),
    ])
    ->striped()
    ->columnSpan(2),

变更日志

请参阅 变更日志 了解最近的变化。

贡献

请参阅 贡献指南 了解详情。

安全漏洞

请审查 我们的安全策略 了解如何报告安全漏洞。

致谢

许可

MIT 许可证 (MIT)。请参阅 许可文件 了解更多信息。