diff --git a/src/ThingsGateway.Web.Page/Page/CollectDevicePage.razor b/src/ThingsGateway.Web.Page/Page/CollectDevicePage.razor index 629661ae9..f463479a9 100644 --- a/src/ThingsGateway.Web.Page/Page/CollectDevicePage.razor +++ b/src/ThingsGateway.Web.Page/Page/CollectDevicePage.razor @@ -56,13 +56,12 @@ Outlined Label=@context.Description(x => x.PluginName) /> - + - @T("复制") + Class="my-1 mx-2 "> + @T("复制") @@ -71,7 +70,7 @@ @T("复制设备") @T("复制设备及设备下变量") - + @@ -121,10 +120,10 @@ -@code{ +@code { async Task CopyDevice(IEnumerable data) { - if(data.Count()==0) + if (data.Count() == 0) { await PopupService.EnqueueSnackbarAsync(@T("需选择一项或多项"), AlertTypes.Warning); return; @@ -193,11 +192,16 @@ StringNumber tab; private async Task DriverValueChanged(CollectDeviceEditInput context, long pluginId) { + bool a = false; + if (context.PluginId != pluginId && pluginId > 0) + { + a = true; + } if (pluginId > 0) context.PluginId = pluginId; else return; - if (context.DevicePropertys == null || context.DevicePropertys?.Count == 0) + if (context.DevicePropertys == null || context.DevicePropertys?.Count == 0 || a) { context.DevicePropertys = GetDriverProperties(context.PluginId, context.Id); await PopupService.EnqueueSnackbarAsync("插件附加属性已更新", AlertTypes.Success);