Commit 966fe9e8 by zhaochengxiang

样式调整

parent 22dc09fc
...@@ -7,6 +7,7 @@ import { useContextMenu, Menu as RcMenu, Item as RcItem } from "react-contexify" ...@@ -7,6 +7,7 @@ import { useContextMenu, Menu as RcMenu, Item as RcItem } from "react-contexify"
import LocalStorage from 'local-storage'; import LocalStorage from 'local-storage';
import { Subject } from "rxjs"; import { Subject } from "rxjs";
import produce from 'immer' import produce from 'immer'
import { useDebounceEffect } from 'ahooks'
import FilterElementModal from './FilterElementModal'; import FilterElementModal from './FilterElementModal';
import AssetMount from '../../AssetRecycle/Component/AssetMount'; import AssetMount from '../../AssetRecycle/Component/AssetMount';
...@@ -34,7 +35,6 @@ import 'react-contexify/dist/ReactContexify.css'; ...@@ -34,7 +35,6 @@ import 'react-contexify/dist/ReactContexify.css';
import { getTemplateType } from "../../../../util/axios"; import { getTemplateType } from "../../../../util/axios";
const { Text } = Typography; const { Text } = Typography;
const { Search } = Input;
const { Column } = Table; const { Column } = Table;
const operationMap = { const operationMap = {
...@@ -294,12 +294,12 @@ const AssetTable = (props) => { ...@@ -294,12 +294,12 @@ const AssetTable = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, [timestamp]) }, [timestamp])
useEffect(() => { useDebounceEffect(() => {
if (reference !== AssetRecycleReference && nodeId) { if (reference !== AssetRecycleReference && nodeId) {
getFilterElementsGroupThenGetDataAssets(); getFilterElementsGroupThenGetDataAssets();
} }
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, [ keyword, pagination, elementsChanged, assetActionChanged, recursive, fullSearch, currentElementId, nodeId ]) }, [keyword, pagination, elementsChanged, assetActionChanged, recursive, fullSearch, currentElementId, nodeId], { wait: 300 })
useEffect(() => { useEffect(() => {
if (reference === AssetRecycleReference) { if (reference === AssetRecycleReference) {
...@@ -768,11 +768,6 @@ const AssetTable = (props) => { ...@@ -768,11 +768,6 @@ const AssetTable = (props) => {
}) })
} }
const onSearchInputChange = (value) => {
setKeyword(value||'');
setPagination({ ...pagination, pageNum: 1 });
}
const addAsset =()=>{ const addAsset =()=>{
setAddAssetParams({ setAddAssetParams({
visible: true visible: true
...@@ -1291,11 +1286,13 @@ const AssetTable = (props) => { ...@@ -1291,11 +1286,13 @@ const AssetTable = (props) => {
} }
</Select> </Select>
} }
<Search <Input size="middle"
placeholder="请输入资产目录要素值" placeholder="请输入资产目录要素值"
allowClear value={keyword} allowClear
onSearch={onSearchInputChange} onChange={(e) => {
enterButton setKeyword(e.target.value);
setPagination({ ...pagination, pageNum: 1 });
}}
style={{ width: inputWidth }} style={{ width: inputWidth }}
/> />
{ {
......
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