소스 검색

查询条件为空时 不发起请求

zhulu 1 년 전
부모
커밋
17db289830
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/views/system/device/index.vue

+ 2 - 1
src/views/system/device/index.vue

@@ -584,7 +584,8 @@ export default {
       this.changeSelect(data);
       this.handleQuery();
     },
-    changeSelect(val) {
+    changeSelect(val) {      
+      if(!val || !val.id) return;
       getHostByOrgId(val).then((response) => {
         this.form.hostId = null;
         this.hostList = response.data;