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,6 +127,9 @@ class NewsResource extends Resource
127 127
                         ->columnSpanFull()
128 128
                         ->label("短文")
129 129
                         ->maxLength(84)
130
+                        ->extraInputAttributes([
131
+                            'oninput' => 'if (this.value.length > 84) { this.value = this.value.slice(0, 84); }',
132
+                        ])
130 133
                         ->reactive()
131 134
                         ->helperText(function (callable $get) {
132 135