소스 검색

修改老师选择

1
mo 4 년 전
부모
커밋
ced32ea7a1
1개의 변경된 파일8개의 추가작업 그리고 3개의 파일을 삭제
  1. 8 3
      src/components/remote-search/index.vue

+ 8 - 3
src/components/remote-search/index.vue

@@ -50,6 +50,7 @@ export default {
     // this.getList();
     // console.log(this.value)
     this.getOptions(this.value|| '' )
+    // console.log(this.multiple)
 
 
   },
@@ -75,7 +76,8 @@ export default {
       throttle(this.getOptions, 800)(query);
     },
     async getOptions(query) {
-      if (query) {
+
+      if (query&&query.length>0) {
         let flag;
         this.options = this.list.filter((item) => {
           flag =
@@ -99,7 +101,9 @@ export default {
             this.options.push(valueItem)
             this.options = uniqBy(this.options, 'userId')
           }
-           console.log( this.options)
+
+
+
           }catch(e){
             // console.log(e)
           }
@@ -128,7 +132,8 @@ export default {
 
         if (this.multiple) {
           if (val?.length > 0 && this.isFirst) {
-           this.getOptions('')
+
+           this.getOptions()
           }
         } else {
           if (val && this.isFirst) {