-
Notifications
You must be signed in to change notification settings - Fork 22
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
Merge(SuitApply):合并正装借用,修复部分 bug #96
Conversation
run({ | ||
iid: iid.value, | ||
stuid: stuid.value, | ||
password: password.value | ||
}); | ||
}; | ||
|
||
const { run } = useRequest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的 run
函数在定义前被使用了?
run({ | ||
iid: iid.value, | ||
stuid: stuid.value, | ||
password: password.value | ||
}); | ||
}; | ||
|
||
const { run } = useRequest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useRequest
如果没声明 config.manual = true
,应该会在组件挂载的时候发送一次请求。你这里的请求函数从名字上看是用来修改密码,那不应该自动发送请求才对。你得显式传入个 manual
。
如果不需要挂载的时候触发请求,不需要渲染请求的结果,不需要拿到请求的 loading
状态,那没必要用 useRequest
, 直接调用 Service 下的函数就行
因为版本推送需要暂时merge,后续会优化这段代码 |
@xixiIBN5100 让现在的开发人员注意一下 useRequest 的使用,注意我说的点,另外直接调用暴露出的 run,也不设个别名,这样太不合理了 |
收到,感谢指正 |
No description provided.