Commit de832460282d93a1b862d71ad01c6d89ae5dff4e

Authored by zhangzzzz
1 parent fd5847b5

搜索组件不需要防抖;

src/components/Common/CommonComponent/index.js
@@ -38,10 +38,10 @@ const FormItem = Form.Item; @@ -38,10 +38,10 @@ const FormItem = Form.Item;
38 const { Option } = Select; 38 const { Option } = Select;
39 const { TextArea } = Input; 39 const { TextArea } = Input;
40 const { Search } = Input; 40 const { Search } = Input;
41 -const InputNumberA = reactComponentDebounce(300)(InputNumber);  
42 -const InputA = reactComponentDebounce(300)(Input);  
43 -const AutoCompleteA = reactComponentDebounce(300)(AutoComplete); /* 处理快速选择产品后离开 产品无法赋值问题s */  
44 -const TextAreaA = reactComponentDebounce(500)(TextArea); 41 +let InputNumberA = reactComponentDebounce(300)(InputNumber);
  42 +let InputA = reactComponentDebounce(300)(Input);
  43 +let AutoCompleteA = reactComponentDebounce(300)(AutoComplete); /* 处理快速选择产品后离开 产品无法赋值问题s */
  44 +let TextAreaA = reactComponentDebounce(500)(TextArea);
45 // const InputNumberA = InputNumber; 45 // const InputNumberA = InputNumber;
46 // const InputA = Input; 46 // const InputA = Input;
47 // const AutoCompleteA = AutoComplete; 47 // const AutoCompleteA = AutoComplete;
@@ -96,6 +96,12 @@ export default class CommonComponent extends Component { @@ -96,6 +96,12 @@ export default class CommonComponent extends Component {
96 this.myRef = createRef(); 96 this.myRef = createRef();
97 this.dropDownCount = 0; 97 this.dropDownCount = 0;
98 this.bSpecial = location.pathname?.includes("ResearchTableTree") && props.showConfig.sName === "sProductName"; 98 this.bSpecial = location.pathname?.includes("ResearchTableTree") && props.showConfig.sName === "sProductName";
  99 + if (props.noDebounce) {
  100 + InputNumberA = InputNumber;
  101 + InputA = Input;
  102 + AutoCompleteA = AutoComplete;
  103 + TextAreaA = TextArea;
  104 + }
99 } 105 }
100 106
101 /** 渲染前只执行一次 */ 107 /** 渲染前只执行一次 */
src/components/Common/SearchComponent/index.js
@@ -452,6 +452,7 @@ export default class SearchComponent extends Component { @@ -452,6 +452,7 @@ export default class SearchComponent extends Component {
452 sSqlCondition:showConfig.sSqlCondition, 452 sSqlCondition:showConfig.sSqlCondition,
453 name: 'master', 453 name: 'master',
454 record: masterData, 454 record: masterData,
  455 + noDebounce: true
455 }; 456 };
456 } 457 }
457 458