💪 optimize: 优化代码

This commit is contained in:
wangsongsole 2024-01-29 17:15:28 +08:00
parent fcb1742af6
commit 45ab1a2697
1 changed files with 0 additions and 7 deletions

View File

@ -577,13 +577,6 @@ export default class orderList extends React.Component {
// 监听组件内部状态的变化:
componentDidUpdate(prevProps, prevState) {
// 参数分别为改变之前的数据状态对象
if (prevState.key_word != this.state.key_word && !this.state.key_word) {
this.getOrderFn()
}
if (prevState.option != this.state.option && !this.state.option) {
this.getOrderFn()
this.setState({ key_word: "" })
}
if (prevState.status != this.state.status) {
this.getOrderFn()
}