From 611dada01454acd954c4299b3cf9a5037e41ef04 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 10 Oct 2020 15:55:42 +0800 Subject: [PATCH] update --- src/forge/Main/Index.js | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/src/forge/Main/Index.js b/src/forge/Main/Index.js index 03b5c0e6..6a5bb67f 100644 --- a/src/forge/Main/Index.js +++ b/src/forge/Main/Index.js @@ -223,15 +223,8 @@ class Index extends Component { this.getListData(page, limit, undefined, sort, project_type, category_id ,e === 0 ?undefined:e); } - filterOption=(input,option)=>{ - // console.log(input,option); - let o = option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0; - console.log(o); - } - - render() { - const { current_user } = this.props; - const menu = ( + menu =()=> { + return( 更新时间排序 创建时间排序 @@ -239,22 +232,32 @@ class Index extends Component { 点赞数量排序 ) - const newItem = ( + } + + newItem = ()=>{ + return( 新建镜像项目 新建托管项目 ) + } + + pagination=(total,limit,page)=>{ + return( + total && total > limit && +
+ +
+ ) + } + + render() { + const { current_user } = this.props; const { projectsList , recommendList , languageList , languageId , isSpin, total, search, limit, page, typeList, categoryList } = this.state; - const pagination = ( - total && total > limit ? -
- -
: "" - ) return (

@@ -333,14 +336,14 @@ class Index extends Component {

{ current_user && current_user.login && - + 新建 } - + 排序 @@ -348,7 +351,7 @@ class Index extends Component {
- {pagination} + {this.pagination(total,limit,page)}