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

最高温度是30度,会出现31度的情况。 #8

Closed
kaixinsoft opened this issue Apr 19, 2021 · 1 comment
Closed

最高温度是30度,会出现31度的情况。 #8

kaixinsoft opened this issue Apr 19, 2021 · 1 comment

Comments

@kaixinsoft
Copy link

/**

  • 增加温度
  • @param {*} props
    */
    function increaseTemperature(props: any) {
    props.temperature < 31
    ? props.setTemperature(props.temperature + 1)
    : console.log("已经是最大温度啦!");
    }

这里要修改一下吗?

@YunYouJun
Copy link
Owner

空调期望的最高温度是 31摄氏度(因为咱家的空调就是这样),而这里小于 31,就是它为 30 的时候,仍然可以继续增加一度,所以逻辑上应该没问题?

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

2 participants