iviewui Select 远程搜索设置默认值label

 template


        

script

export default {
    data() {
      return {
        loading1: false,
        options1: [],
        hospitalName:"",
        queryVoHos:{
            queryVO:{
                hospitalId:"",
                }
        }
      }
    },
    mounted() {
        this.$refs["hospitalInfo"].query = "广州市第一人民医院";
    },
    methods: {
        remoteMethod1 (query) {
            clearTimeout(this.remoteMethod1.timer)
            if (query !== ''&&query.length>1) {
                this.loading1 = true;
                var timeoutflag = null;
                let queryVo={}
                    queryVo={
                        name:query,
                    }
                this.remoteMethod1.timer=setTimeout(() => {
                    this.loading1 = false;
                    this.getAllHospitals(queryVo);
                }, 800);
            } else {
                this.options1 = [];
                this.queryVoHos.queryVO.hospitalId=""
            }
        },
    }

}

 

你可能感兴趣的:(iviewui Select 远程搜索设置默认值label)