From faef70ebef5fb18071a29413ef5fbccdd6f094ff Mon Sep 17 00:00:00 2001 From: adevelopers <3803499041@qq.com> Date: Wed, 4 Dec 2024 14:12:53 +0000 Subject: [PATCH] update src/components/userSelect/index.vue. Signed-off-by: adevelopers <3803499041@qq.com> --- src/components/userSelect/index.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/userSelect/index.vue b/src/components/userSelect/index.vue index 4956632..48d996c 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 = [] -- Gitee