diff --git a/src/components/userSelect/index.vue b/src/components/userSelect/index.vue index 4956632884fd742ad03872ad3e2b18d737c2ce88..48d996c934ce5ae1e725a84a9c3155582a4c7c16 100644 --- a/src/components/userSelect/index.vue +++ b/src/components/userSelect/index.vue @@ -16,7 +16,7 @@ - @@ -102,7 +102,7 @@ export default { dataValue: [], // 校准传入值 loading: false, height: 32, - + stop:false, optionsList: [] } }, @@ -184,6 +184,9 @@ export default { }, methods: { + restLoad(){ + this.stop = false + }, resetHeight () { const tags = this.$refs.tags @@ -250,7 +253,7 @@ export default { /** * 获取请求 */ - requestUserList (serch, page = 1) { + requestUserList (serch, page = 1,isajax=false) { this.loading = true let request = this.$api.imApi.userList if (this.request) { @@ -262,6 +265,11 @@ export default { .then(res => { if (res.data.hasOwnProperty('list')) { res.data = res.data.list + }else{ + if(isajax){ + //如果是子组件调用,空数据则返回stop=true + this.stop = true + } } if (serch && page == 1) { this.optionsList = []