Browse Source

提交测试

1
mo 4 years ago
parent
commit
1ba4d4f290
2 changed files with 11 additions and 7 deletions
  1. 9 5
      src/components/remote-search/index.vue
  2. 2 2
      vue.config.js

+ 9 - 5
src/components/remote-search/index.vue

@@ -7,12 +7,14 @@
       filterable
       remote
       reserve-keyword
+      collapse-tags
       clearable
       :multiple="multiple"
       :placeholder="placeholder"
       :remote-method="remoteMethod"
-
+      ref='select'
       :loading="loading"
+      @focus="onFocus"
       @change="changeValue"
       :style="{ width: this.selectWidt + 'px!important' }"
     >
@@ -78,7 +80,6 @@ export default {
       throttle(this.getOptions, 800)(query);
     },
     async getOptions(query) {
-
       if (query&&query.length>0) {
         let flag;
         this.options = uniqBy(this.list.filter((item) => {
@@ -109,15 +110,18 @@ export default {
       }
     },
     changeValue(val) {
-      console.log('调用changeValue')
       this.isFirst = false;
       this.$emit("input", val);
       this.$emit("change", val);
+      // console.log('来了',this.$refs.select.query)
+      this.$nextTick(res=>{
+         this.getOptions(this.$refs.select.query)
+      })
+
 
     },
-    onFocus(val){
+    onFocus(){
 
-      //  getOptions
     }
 
   },

+ 2 - 2
vue.config.js

@@ -21,8 +21,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.38:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
-// let target = 'http://47.114.176.40:8000' // 测试服
-let target = 'http://dev.dayaedu.com/' // 乔
+let target = 'http://47.114.176.40:8000' // 测试服
+// let target = 'http://dev.dayaedu.com/' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**