feat: multi diagrams
This commit is contained in:
@@ -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('网关配置')
|
||||
|
||||
Reference in New Issue
Block a user