Browse Source

20260831 後台最新消息調整字數上限

OMEGA\lulufj.ho 1 month ago
parent
commit
9ac1c24303
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      app/Filament/Resources/NewsResource.php

+ 3
- 0
app/Filament/Resources/NewsResource.php View File

127
                         ->columnSpanFull()
127
                         ->columnSpanFull()
128
                         ->label("短文")
128
                         ->label("短文")
129
                         ->maxLength(84)
129
                         ->maxLength(84)
130
+                        ->extraInputAttributes([
131
+                            'oninput' => 'if (this.value.length > 84) { this.value = this.value.slice(0, 84); }',
132
+                        ])
130
                         ->reactive()
133
                         ->reactive()
131
                         ->helperText(function (callable $get) {
134
                         ->helperText(function (callable $get) {
132
 
135