Skip to content

Commit

Permalink
修改描述和正则表达式
Browse files Browse the repository at this point in the history
  • Loading branch information
239573049 committed Apr 11, 2024
1 parent e0d2ae5 commit 4aab755
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions web/src/pages/rate-limit/features/CreateRateLimit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export default function CreateRateLimitPage({
]}
/>
<Input
label="m(分钟)|h(小时)|d(天)|s(秒)"
label="s(秒)|m(分钟)|h(小时)|d(天)"
field="period"
initValue={rule.period}
defaultValue={rule.period}
Expand All @@ -240,7 +240,7 @@ export default function CreateRateLimitPage({
rules={[
{ required: true, message: '请输入周期' },
{
pattern: /^[1-9]\d*[mhd]$/,
pattern: /^[1-9]\d*[mhds]$/,
message: '请输入正确的周期,示例: 1m, 1h, 1d, 1s'
}
]}
Expand Down
6 changes: 2 additions & 4 deletions web/src/pages/rate-limit/features/UpdateRateLimit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,10 @@ export default function UpdateRateLimitPage({
}
rules={[
{ required: true, message: '请输入端点' },
// 支持 */ */api
{ pattern: /^(\*|\/|\/[a-zA-Z0-9_-]+)+$/, message: '请输入正确的端点' },
]}
/>
<Input
label="m(分钟)|h(小时)|d(天)|s(秒)"
label="s(秒)|m(分钟)|h(小时)|d(天)"
field="period"
initValue={rule.period}
defaultValue={rule.period}
Expand All @@ -245,7 +243,7 @@ export default function UpdateRateLimitPage({
rules={[
{ required: true, message: '请输入周期' },
{
pattern: /^[1-9]\d*[mhd]$/,
pattern: /^[1-9]\d*[mhds]$/,
message: '请输入正确的周期,示例: 1m, 1h, 1d, 1s'
}
]}
Expand Down

0 comments on commit 4aab755

Please sign in to comment.