Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

后台页面会出现请求两次的情况 #254

Open
mrstanley opened this issue Dec 22, 2021 · 2 comments
Open

后台页面会出现请求两次的情况 #254

mrstanley opened this issue Dec 22, 2021 · 2 comments

Comments

@mrstanley
Copy link

image
点击后台菜单,接口请求两次

@doramart
Copy link
Owner

你需要把完整的接口贴出来,getList 有可能是不同的接口,我自己跑了一下,是没有重复请求的

@hg542006810
Copy link

我也遇到了,问题出在每个模块的app.vue里。leftTabs第一次渲染的时候为空数组,当获得到值后会再次进行渲染,一共会渲染2次,所以会导致渲染2次 。
image

解决方案:在最外面的div加一个:v-if="leftTabs.length !== 0" 就行了
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants