diff --git a/src/BootstrapBlazor/Components/AutoRedirect/AutoRedirect.cs b/src/BootstrapBlazor/Components/AutoRedirect/AutoRedirect.cs
index 583cb14ff32..bea1720fbce 100644
--- a/src/BootstrapBlazor/Components/AutoRedirect/AutoRedirect.cs
+++ b/src/BootstrapBlazor/Components/AutoRedirect/AutoRedirect.cs
@@ -27,11 +27,11 @@ public class AutoRedirect : BootstrapModuleComponentBase
public bool IsForceLoad { get; set; }
///
- /// 获得/设置 自动锁屏间隔单位 秒 默认 60000 毫秒
- /// Gets or sets the auto lock screen interval in milliseconds. Default is 60000 ms
+ /// 获得/设置 自动锁屏间隔单位 秒 默认 0 内部使用 60000 毫秒
+ /// Gets or sets the auto lock interval in seconds. Default is 0, internally uses 60000 milliseconds
///
[Parameter]
- public int Interval { get; set; } = 60000;
+ public int Interval { get; set; }
///
/// 获得/设置 地址跳转前回调方法 返回 true 时中止跳转
@@ -53,6 +53,20 @@ public class AutoRedirect : BootstrapModuleComponentBase
///
protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, Interval, nameof(Lock));
+ ///
+ ///
+ ///
+ protected override void OnParametersSet()
+ {
+ base.OnParametersSet();
+
+ if (Interval <= 0)
+ {
+ // 默认 10 分钟
+ Interval = 10 * 60 * 1000;
+ }
+ }
+
///
/// 锁屏操作由 JS 调用
/// Lock screen operation called by JS