💪 optimize: 优化代码
This commit is contained in:
parent
fcb1742af6
commit
45ab1a2697
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue