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