[增添]添加了datasource的setting数据库以及默认值
This commit is contained in:
33
vendor/filament/forms/docs/04-layout/07-split.md
vendored
Normal file
33
vendor/filament/forms/docs/04-layout/07-split.md
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: Split
|
||||
---
|
||||
import AutoScreenshot from "@components/AutoScreenshot.astro"
|
||||
|
||||
## Overview
|
||||
|
||||
The `Split` component allows you to define layouts with flexible widths, using flexbox.
|
||||
|
||||
```php
|
||||
use Filament\Forms\Components\Section;
|
||||
use Filament\Forms\Components\Split;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
|
||||
Split::make([
|
||||
Section::make([
|
||||
TextInput::make('title'),
|
||||
Textarea::make('content'),
|
||||
]),
|
||||
Section::make([
|
||||
Toggle::make('is_published'),
|
||||
Toggle::make('is_featured'),
|
||||
])->grow(false),
|
||||
])->from('md')
|
||||
```
|
||||
|
||||
In this example, the first section will `grow()` to consume available horizontal space, without affecting the amount of space needed to render the second section. This creates a sidebar effect.
|
||||
|
||||
The `from()` method is used to control the [Tailwind breakpoint](https://tailwindcss.com/docs/responsive-design#overview) (`sm`, `md`, `lg`, `xl`, `2xl`) at which the split layout should be used. In this example, the split layout will be used on medium devices and larger. On smaller devices, the sections will stack on top of each other.
|
||||
|
||||
<AutoScreenshot name="forms/layout/split/simple" alt="Split" version="3.x" />
|
||||
Reference in New Issue
Block a user