Parcourir la source

fix: #8589 修复设备 子设备批量解绑未勾选提示

jackhoo_98 il y a 3 ans
Parent
commit
c26189d087
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      src/pages/device/Instance/Detail/ChildDevice/index.tsx

+ 1 - 0
src/pages/device/Instance/Detail/ChildDevice/index.tsx

@@ -231,6 +231,7 @@ const ChildDevice = (props: Props) => {
               <Popconfirm
                 key="unbind"
                 onConfirm={async () => {
+                  if (bindKeys.length === 0) return onlyMessage('请先勾选数据!', 'error');
                   const resp = await service.unbindBatchDevice(InstanceModel.detail.id!, bindKeys);
                   if (resp.status === 200) {
                     onlyMessage('操作成功!');