From bf62260e40d413b5d1f6c77d0acd72245a7844a1 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Sat, 17 Dec 2022 11:09:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E8=B5=84=E6=96=99=E5=BA=93?= =?UTF-8?q?=EF=BC=9A=E6=A0=91=E9=80=89=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../containers/resourceRepository.jsx | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx b/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx index 725ee85..6b549db 100644 --- a/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx +++ b/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react'; +import React, { useEffect, useState ,useRef} from 'react'; import { connect } from 'react-redux'; import { Button, Col, Row, Input, Tree, Table, Space } from '@douyinfe/semi-ui'; import { IconSearch, IconEditStroked, IconMinusCircleStroked, IconPlusCircleStroked } from '@douyinfe/semi-icons'; @@ -6,14 +6,16 @@ import '../style.less' const ResourceRepository = (props) => { const { dispatch, actions, clientHeight } = props; + const ref = useRef(); + const treeData = [ { label: (
亚洲 alert("bianji")} /> - alert("sahnchu")}/> - alert("+")}/> + alert("sahnchu")} /> + alert("+")} />
), value: 'Asia', @@ -46,17 +48,17 @@ const ResourceRepository = (props) => { { label: '中国', value: 'China', - key: '0-0', + key: '1-0', children: [ { label: '北京', - value: 'Beijing', - key: '0-0-0', + value: 'Beijing2', + key: '1-0-0', }, { label: '上海', value: 'Shanghai', - key: '0-0-1', + key: '1-0-1', }, ], }, @@ -207,10 +209,14 @@ const ResourceRepository = (props) => {
- } showClear placeholder="请输入"> + } showClear onChange={v => ref.current.search(v)} placeholder="请输入">