🎁 refactor(ui/redemption): migrate EditRedemption page to Semi Form & enhance UX
SUMMARY • Re-implemented `web/src/pages/Redemption/EditRedemption.js` with Semi Form components, removing legacy local-state handling. • Added `formApiRef` for centralized control; external “Submit” button now triggers `formApi.submitForm()`. • Replaced `Input/AutoComplete/DatePicker` etc. with `<Form.*>` fields, leveraging built-in validation & accessibility. • Field validations: – `name` (create only), `quota`, `count` → required with localized messages. • Expiration-time flow: – Default value `null` (no more 1970-01-01). – When loading data, convert 0 → null, timestamp → Date. – On submit, Date → unix seconds; empty → 0. • Responsive grid layout (`Row/Col`) for tidy alignment. • Added helpful `showClear` & full-width styling for inputs; quota presets retained. • Cleaned unused imports & handlers; fixed linter issues. RESULT The Redemption form now benefits from higher performance, clearer validation, and a cleaner codebase consistent with Semi Design best practices.
This commit is contained in:
@@ -1745,5 +1745,7 @@
|
||||
"已复制 ${count} 个模型": "Copied ${count} models",
|
||||
"复制失败,请手动复制": "Copy failed, please copy manually",
|
||||
"快捷设置": "Quick settings",
|
||||
"批量创建时会在名称后自动添加随机后缀": "When creating in batches, a random suffix will be automatically added to the name"
|
||||
"批量创建时会在名称后自动添加随机后缀": "When creating in batches, a random suffix will be automatically added to the name",
|
||||
"额度必须大于0": "Quota must be greater than 0",
|
||||
"生成数量必须大于0": "Generation quantity must be greater than 0"
|
||||
}
|
||||
Reference in New Issue
Block a user