From 1069440cdab81af19da47b5843da5803aa5fb52f Mon Sep 17 00:00:00 2001 From: "2248356998 qq.com" <2248356998@qq.com> Date: Fri, 19 May 2023 22:26:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=8F=92=E4=BB=B6=E6=97=B6?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=88=B7=E6=96=B0=E8=AE=BE=E5=A4=87=E5=B1=9E?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Page/CollectDevicePage.razor | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) 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);