Skip to content

Commit 66ca3e2

Browse files
authored
feat(Drivejs): remove AutoDrive parameter (#641)
* refactor: 移除 AutoDrive 参数 * chore: bump version 9.0.5
1 parent 4a7e49f commit 66ca3e2

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

src/components/BootstrapBlazor.DriverJs/BootstrapBlazor.DriverJs.csproj

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

3+
<PropertyGroup Condition="'$(VisualStudioVersion)' == '17.0'">
4+
<Version>9.0.5</Version>
5+
</PropertyGroup>
6+
7+
<PropertyGroup Condition="'$(VisualStudioVersion)' == '18.0'">
8+
<Version>10.0.0-rc.2.1.0</Version>
9+
</PropertyGroup>
10+
311
<PropertyGroup>
4-
<Version>9.0.3</Version>
512
<RootNamespace>BootstrapBlazor.Components</RootNamespace>
613
</PropertyGroup>
714

@@ -15,10 +22,14 @@
1522
<EmbeddedResource Include="Locales\*.json" />
1623
</ItemGroup>
1724

18-
<ItemGroup>
25+
<ItemGroup Condition="'$(VisualStudioVersion)' == '17.0'">
1926
<PackageReference Include="BootstrapBlazor" Version="$(BBVersion)" />
2027
</ItemGroup>
2128

29+
<ItemGroup Condition="'$(VisualStudioVersion)' == '18.0'">
30+
<PackageReference Include="BootstrapBlazor" Version="10.0.0-rc.2.1.0" />
31+
</ItemGroup>
32+
2233
<ItemGroup>
2334
<Using Include="Microsoft.AspNetCore.Components" />
2435
<Using Include="Microsoft.Extensions.Localization" />

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)