iviewui Select 원격 검색 설정 기본값 label

1496 단어
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=""
            }
        },
    }

}

좋은 웹페이지 즐겨찾기