样式修改
This commit is contained in:
parent
32771816d0
commit
1ba3d8b871
@ -8,7 +8,7 @@ import MenuWithTopButton from "../../components/menu/MenuWithTopButton.tsx";
|
|||||||
import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
|
import MenuTreeWithTopButton from "../../components/menu/MenuTreeWithTopButton.tsx";
|
||||||
// import ListProj from "../../components/list/ListProj.tsx";
|
// import ListProj from "../../components/list/ListProj.tsx";
|
||||||
// import ListProjAgent from "../../components/list/ListProjAgent.tsx";
|
// import ListProjAgent from "../../components/list/ListProjAgent.tsx";
|
||||||
import { MenuProps,Select } from 'antd';
|
import { MenuProps, Select } from 'antd';
|
||||||
import {
|
import {
|
||||||
IndexListContext,
|
IndexListContext,
|
||||||
IndexListDataType,
|
IndexListDataType,
|
||||||
@ -31,7 +31,7 @@ const { Search } = Input;
|
|||||||
export default function Index() {
|
export default function Index() {
|
||||||
// 关键字
|
// 关键字
|
||||||
const [keywords, setKeywords] = useState('');
|
const [keywords, setKeywords] = useState('');
|
||||||
const [type,setType] = useState('')
|
const [type, setType] = useState('')
|
||||||
// const indexListContext = useContext(IndexListContext);
|
// const indexListContext = useContext(IndexListContext);
|
||||||
|
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ export default function Index() {
|
|||||||
// const [newname,setNewname] = useState('')
|
// const [newname,setNewname] = useState('')
|
||||||
|
|
||||||
const [pathArray, setPathArray] = useState<any>([])
|
const [pathArray, setPathArray] = useState<any>([])
|
||||||
const [showSearchBox,setShowSearchBox] = useState(true)
|
const [showSearchBox, setShowSearchBox] = useState(true)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// const nowname = sessionStorage.getItem('now')
|
// const nowname = sessionStorage.getItem('now')
|
||||||
console.log('路由名字', location.pathname);
|
console.log('路由名字', location.pathname);
|
||||||
@ -329,9 +329,15 @@ export default function Index() {
|
|||||||
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// useEffect(() => {
|
useEffect(() => {
|
||||||
// console.log('监听',keywords);
|
console.log('监听type',type);
|
||||||
// }, [keywords]);
|
nav('/home', {
|
||||||
|
state: {
|
||||||
|
keyword: keywords,
|
||||||
|
name: type
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, [type]);
|
||||||
|
|
||||||
const handleSearch = (value: string) => {
|
const handleSearch = (value: string) => {
|
||||||
console.log(value);
|
console.log(value);
|
||||||
@ -339,10 +345,21 @@ export default function Index() {
|
|||||||
nav('/home', {
|
nav('/home', {
|
||||||
state: {
|
state: {
|
||||||
keyword: value,
|
keyword: value,
|
||||||
name:type
|
name: type
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const handleChange = (e:any) => {
|
||||||
|
console.log(e.target.value);
|
||||||
|
if(e.target.value == ''){
|
||||||
|
nav('/home', {
|
||||||
|
state: {
|
||||||
|
keyword: '',
|
||||||
|
name: type
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* <Breadcrumb
|
{/* <Breadcrumb
|
||||||
@ -389,7 +406,7 @@ export default function Index() {
|
|||||||
<div>当前位置:{now}</div>
|
<div>当前位置:{now}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='line' style={{
|
<div className='line' style={{
|
||||||
display:showSearchBox ? 'block' : 'none',
|
display: showSearchBox ? 'block' : 'none',
|
||||||
|
|
||||||
}} ></div>
|
}} ></div>
|
||||||
<div
|
<div
|
||||||
@ -401,13 +418,17 @@ export default function Index() {
|
|||||||
display: showSearchBox ? 'none' : 'block'
|
display: showSearchBox ? 'none' : 'block'
|
||||||
}}
|
}}
|
||||||
></div>
|
></div>
|
||||||
<Search placeholder="输入项目名称" onSearch={handleSearch} style={{
|
<Search placeholder="输入项目名称"
|
||||||
width: '253px',
|
onSearch={handleSearch}
|
||||||
height: '31px',
|
onChange={handleChange}
|
||||||
display: showSearchBox ? 'block' : 'none'
|
style={{
|
||||||
}} />
|
width: '253px',
|
||||||
|
height: '31px',
|
||||||
|
display: showSearchBox ? 'block' : 'none'
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<Select
|
<Select
|
||||||
style={{ height: '31px', width: '183px',marginLeft:20, display: showSearchBox ? 'block' : 'none' }}
|
style={{ height: '31px', width: '183px', marginLeft: 20, display: showSearchBox ? 'block' : 'none' }}
|
||||||
onChange={(value: string) => {
|
onChange={(value: string) => {
|
||||||
// console.log(`selected ${value}`);
|
// console.log(`selected ${value}`);
|
||||||
setType(value)
|
setType(value)
|
||||||
@ -416,7 +437,7 @@ export default function Index() {
|
|||||||
nav('/home', {
|
nav('/home', {
|
||||||
state: {
|
state: {
|
||||||
keyword: keywords,
|
keyword: keywords,
|
||||||
name:value
|
name: value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -427,7 +448,7 @@ export default function Index() {
|
|||||||
{ value: 'MATERIAL', label: '写材料' },
|
{ value: 'MATERIAL', label: '写材料' },
|
||||||
{ value: 'ALL', label: '全托管' },
|
{ value: 'ALL', label: '全托管' },
|
||||||
]}
|
]}
|
||||||
defaultValue=""
|
defaultValue=""
|
||||||
/>
|
/>
|
||||||
<div style={{
|
<div style={{
|
||||||
width: '253px',
|
width: '253px',
|
||||||
|
Loading…
Reference in New Issue
Block a user