Commit 97e3472b by zhaochengxiang

bug fix

parent fc0df335
...@@ -654,28 +654,30 @@ const AssetTree = (props) => { ...@@ -654,28 +654,30 @@ const AssetTree = (props) => {
style={{ width: '100%' }} style={{ width: '100%' }}
> >
<Spin spinning={loading}> <Spin spinning={loading}>
<AutoComplete
allowClear
value={keyword}
style={{ marginBottom: 10, width: '100%' }}
placeholder='搜索目录'
onSelect={onAutoCompleteSelect}
onSearch={onAutoCompleteSearch}
onClear={() => { setKeyword(''); }}
notFoundContent={keyword?<span>暂无数据</span>:null}
>
{ {
(options||[]).map((item, index) => { viewSelectedKeyRef.current === 'dir' && <AutoComplete
return ( allowClear
<Option key={item.key} value={item.value}> value={keyword}
<div style={{ whiteSpace: 'normal' }}> style={{ marginBottom: 10, width: '100%' }}
{highlightSearchContentByTerms(item.value, [keyword])} placeholder='搜索目录'
</div> onSelect={onAutoCompleteSelect}
</Option> onSearch={onAutoCompleteSearch}
); onClear={() => { setKeyword(''); }}
}) notFoundContent={keyword?<span>暂无数据</span>:null}
>
{
(options||[]).map((item, index) => {
return (
<Option key={item.key} value={item.value}>
<div style={{ whiteSpace: 'normal' }}>
{highlightSearchContentByTerms(item.value, [keyword])}
</div>
</Option>
);
})
}
</AutoComplete>
} }
</AutoComplete>
<Tree <Tree
showLine={true} showLine={true}
showIcon={false} showIcon={false}
......
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