Commit 0039507f by zhaochengxiang

资产搜索增加300ms延时

parent 2a3f55e6
...@@ -13,13 +13,15 @@ import AssetDetailDrawer from "./AssetDetailDrawer"; ...@@ -13,13 +13,15 @@ import AssetDetailDrawer from "./AssetDetailDrawer";
import { dispatch, dispatchLatestHomepage } from '../../../../model'; import { dispatch, dispatchLatestHomepage } from '../../../../model';
import { showMessage, showNotifaction, getQueryParam, inputWidth, isSzseEnv } from '../../../../util'; import { showMessage, showNotifaction, getQueryParam, inputWidth, isSzseEnv } from '../../../../util';
import { AnchorId, AnchorTimestamp, AssetBrowseReference, AssetManageReference, AssetRecycleReference, ResourceBrowseReference } from '../../../../util/constant'; import { AnchorId, AnchorTimestamp, AssetBrowseReference, AssetManageReference, AssetRecycleReference, ResourceBrowseReference } from '../../../../util/constant';
import { FullScreenSvg, CancelFullScreenSvg } from './AssetSvg'; import { FullScreenSvg, CancelFullScreenSvg } from './AssetSvg';
import DebounceInput from '../../Model/Component/DebounceInput';
import "./AssetTable.less"; import "./AssetTable.less";
const { Text } = Typography; const { Text } = Typography;
const InputDebounce = DebounceInput(300)(Input);
const ResizeableHeaderCell = props => { const ResizeableHeaderCell = props => {
const { onResize, width, onClick, ...restProps } = props; const { onResize, width, onClick, ...restProps } = props;
...@@ -329,8 +331,8 @@ const AssetTable = (props) => { ...@@ -329,8 +331,8 @@ const AssetTable = (props) => {
}) })
} }
const onSearchInputChange = (e) => { const onSearchInputChange = (value) => {
setKeyword(e.target.value||''); setKeyword(value||'');
setPagination({ ...pagination, pageNum: 1 }); setPagination({ ...pagination, pageNum: 1 });
} }
...@@ -559,7 +561,7 @@ const AssetTable = (props) => { ...@@ -559,7 +561,7 @@ const AssetTable = (props) => {
<Checkbox onChange={onRecursiveChange} checked={!recursive}>仅显示当前目录</Checkbox> <Checkbox onChange={onRecursiveChange} checked={!recursive}>仅显示当前目录</Checkbox>
</Space> </Space>
<Space> <Space>
<Input <InputDebounce
placeholder="请输入资产要素值" placeholder="请输入资产要素值"
allowClear allowClear
value={keyword} value={keyword}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment