forked from Gitlink/forgeplus-react
未登录点击弹出登录框
This commit is contained in:
parent
e38508ea59
commit
6d9af5c906
|
@ -1,10 +1,9 @@
|
|||
import React from 'react';
|
||||
import { Input } from 'antd';
|
||||
import { Greenback } from '../css/layout';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
const Search = Input.Search;
|
||||
export default (({ onSearch , current_user })=>{
|
||||
export default (({ onSearch , current_user , showLoginDialog })=>{
|
||||
return(
|
||||
<React.Fragment>
|
||||
<Search onSearch={onSearch} placeholder="搜索" allowClear/>
|
||||
|
@ -14,7 +13,7 @@ export default (({ onSearch , current_user })=>{
|
|||
<i className="iconfont icon-bianjishijuan3x" style={{marginRight:"5px"}}></i>写点什么
|
||||
</Link>
|
||||
:
|
||||
<a className="greenbtn" href={"/login"} style={{width:"100%",marginTop:"20px"}}>
|
||||
<a className="greenbtn" onClick={showLoginDialog} style={{width:"100%",marginTop:"20px"}}>
|
||||
<i className="iconfont icon-bianjishijuan3x" style={{marginRight:"5px"}}></i>写点什么
|
||||
</a>
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@ function aa(props) {
|
|||
<Gap>
|
||||
<WhiteBack style={{ marginBottom: "15px" }}>
|
||||
<div style={{ padding: "20px" }}>
|
||||
<ListSearch onSearch={onSearch} current_user={current_user} />
|
||||
<ListSearch onSearch={onSearch} current_user={current_user} showLoginDialog={props && props.showLoginDialog}/>
|
||||
</div>
|
||||
<div style={{ padding: "0px 20px", borderTop: "1px solid #eee" }}>
|
||||
<UrlItem user={current_user} />
|
||||
|
|
|
@ -28,6 +28,7 @@ function theme(props) {
|
|||
let plateMainId = props.match.params.plateMainId;
|
||||
let current_user = props.current_user;
|
||||
|
||||
// console.log("111",props);
|
||||
// 获取列表
|
||||
useEffect(() => {
|
||||
if (plateMainId) {
|
||||
|
@ -145,7 +146,7 @@ function theme(props) {
|
|||
<Short>
|
||||
<Gap>
|
||||
<WhiteBack style={{ padding: "20px" }}>
|
||||
<ListSearch onSearch={onSearch} current_user={current_user}/>
|
||||
<ListSearch onSearch={onSearch} current_user={current_user} showLoginDialog={props && props.showLoginDialog}/>
|
||||
</WhiteBack>
|
||||
<ThemeRight operation={operation} plateId={plateMainId}/>
|
||||
</Gap>
|
||||
|
|
Loading…
Reference in New Issue