Skip to content

Commit caf77a5

Browse files
committed
refactor: 移除 AutoDrive 参数
1 parent 4a7e49f commit caf77a5

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/components/BootstrapBlazor.DriverJs/Components/DriverJs.razor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ public partial class DriverJs
1313
/// 获得/设置 是否自动开始向导 默认 true
1414
/// </summary>
1515
[Parameter]
16+
[Obsolete("已弃用,删除即可;Deprecated, just delete it")]
17+
[ExcludeFromCodeCoverage]
1618
public bool AutoDrive { get; set; } = true;
1719

1820
/// <summary>
@@ -53,7 +55,6 @@ public async Task Start(int? index = 0)
5355

5456
await InvokeVoidAsync("start", Id, Config, new
5557
{
56-
AutoDrive,
5758
Index = index
5859
});
5960
}

src/components/BootstrapBlazor.DriverJs/Components/DriverJs.razor.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function start(id, options, config) {
1717
const d = Data.get(id);
1818
if (d) {
1919
d.config = config;
20-
const { autoDrive, index } = config;
20+
const { index } = config;
2121
const { hookDestroyStarted, hookDestroyed } = options;
2222
if (hookDestroyStarted) {
2323
delete options.hookDestroyStarted;
@@ -36,10 +36,7 @@ export function start(id, options, config) {
3636
}
3737
const driverObj = driver(options);
3838
d.driver = driverObj;
39-
40-
if (autoDrive) {
41-
driverObj.drive(index);
42-
}
39+
driverObj.drive(index);
4340
}
4441
}
4542

0 commit comments

Comments
 (0)