feat: multi diagrams

This commit is contained in:
2026-04-06 16:35:11 +08:00
parent 42a879e961
commit d19b770ef4
8 changed files with 98 additions and 16 deletions

View File

@@ -101,12 +101,27 @@ class TerminalResource extends Resource
Forms\Components\Section::make('组态配置')
->schema([
Forms\Components\TextInput::make('diagram_url')
Forms\Components\Repeater::make('diagram_urls')
->label('组态界面地址')
->url()
->maxLength(500)
->placeholder('https://example.com/diagram.png')
->helperText('组态界面的访问地址'),
->schema([
Forms\Components\TextInput::make('title')
->label('标题')
->required()
->maxLength(100)
->placeholder('例如: 主组态'),
Forms\Components\TextInput::make('url')
->label('地址')
->required()
->url()
->maxLength(500)
->placeholder('https://example.com/diagram.html'),
])
->columns(2)
->defaultItems(0)
->addActionLabel('添加组态地址')
->itemLabel(fn (array $state): ?string => $state['title'] ?? null)
->collapsible()
->reorderable(),
]),
Forms\Components\Section::make('网关配置')