diff --git a/public/css/iconfont.css b/public/css/iconfont.css index 8b932c6b0..8acc1f550 100644 --- a/public/css/iconfont.css +++ b/public/css/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 2340181 */ - src: url('iconfont.woff2?t=1628649437297') format('woff2'), - url('iconfont.woff?t=1628649437297') format('woff'), - url('iconfont.ttf?t=1628649437297') format('truetype'); + src: url('iconfont.woff2?t=1628836445900') format('woff2'), + url('iconfont.woff?t=1628836445900') format('woff'), + url('iconfont.ttf?t=1628836445900') format('truetype'); } .iconfont { @@ -13,6 +13,22 @@ -moz-osx-font-smoothing: grayscale; } +.icon-xinjian2:before { + content: "\e8b0"; +} + +.icon-xieyiicon:before { + content: "\e870"; +} + +.icon-neicunicon:before { + content: "\e891"; +} + +.icon-zishuwenjian_icon:before { + content: "\e8a6"; +} + .icon-dianzan_icon:before { content: "\e8ba"; } @@ -21,10 +37,6 @@ content: "\e8bb"; } -.icon-xieyiicon:before { - content: "\e8a6"; -} - .icon-daimakuicon:before { content: "\e8a9"; } @@ -73,18 +85,10 @@ content: "\e88e"; } -.icon-neicunicon:before { - content: "\e891"; -} - .icon-muluicon:before { content: "\e894"; } -.icon-tianjia1:before { - content: "\e896"; -} - .icon-a-shezhi:before { content: "\e899"; } @@ -109,10 +113,6 @@ content: "\e8a4"; } -.icon-zishuwenjian_icon:before { - content: "\e8b0"; -} - .icon-zuohuaicon:before { content: "\e8b5"; } @@ -229,10 +229,6 @@ content: "\e86f"; } -.icon-daochu_xuanfu:before { - content: "\e870"; -} - .icon-cuowu:before { content: "\e872"; } diff --git a/public/css/iconfont.js b/public/css/iconfont.js index 484af6bd7..88db32604 100644 --- a/public/css/iconfont.js +++ b/public/css/iconfont.js @@ -1 +1 @@ -!function(c){var l,a,h,i,o,z='',t=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss"),p=function(c,l){l.parentNode.insertBefore(c,l)};if(t&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}function m(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(m,50)}v()}l=function(){var c,l;(l=document.createElement("div")).innerHTML=z,z=null,(c=l.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",l=c,(c=document.body).firstChild?p(l,c.firstChild):c.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),l()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(h=l,i=c.document,o=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window); \ No newline at end of file +!function(c){var l,a,h,i,o,z='',t=(t=document.getElementsByTagName("script"))[t.length-1].getAttribute("data-injectcss"),p=function(c,l){l.parentNode.insertBefore(c,l)};if(t&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function v(){o||(o=!0,h())}function m(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(m,50)}v()}l=function(){var c,l;(l=document.createElement("div")).innerHTML=z,z=null,(c=l.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",l=c,(c=document.body).firstChild?p(l,c.firstChild):c.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),l()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(h=l,i=c.document,o=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}(window); \ No newline at end of file diff --git a/public/css/iconfont.json b/public/css/iconfont.json index 9a1aff029..7f25b322f 100644 --- a/public/css/iconfont.json +++ b/public/css/iconfont.json @@ -5,6 +5,34 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "23572260", + "name": "新建", + "font_class": "xinjian2", + "unicode": "e8b0", + "unicode_decimal": 59568 + }, + { + "icon_id": "23567674", + "name": "协议icon", + "font_class": "xieyiicon", + "unicode": "e870", + "unicode_decimal": 59504 + }, + { + "icon_id": "23567675", + "name": "内存icon", + "font_class": "neicunicon", + "unicode": "e891", + "unicode_decimal": 59537 + }, + { + "icon_id": "23567676", + "name": "自述文件_icon", + "font_class": "zishuwenjian_icon", + "unicode": "e8a6", + "unicode_decimal": 59558 + }, { "icon_id": "23492900", "name": "点赞_icon", @@ -19,13 +47,6 @@ "unicode": "e8bb", "unicode_decimal": 59579 }, - { - "icon_id": "23473801", - "name": "协议icon", - "font_class": "xieyiicon", - "unicode": "e8a6", - "unicode_decimal": 59558 - }, { "icon_id": "23473151", "name": "代码库icon", @@ -110,13 +131,6 @@ "unicode": "e88e", "unicode_decimal": 59534 }, - { - "icon_id": "23472264", - "name": "内存icon", - "font_class": "neicunicon", - "unicode": "e891", - "unicode_decimal": 59537 - }, { "icon_id": "23472265", "name": "目录icon", @@ -124,13 +138,6 @@ "unicode": "e894", "unicode_decimal": 59540 }, - { - "icon_id": "23472266", - "name": "添加", - "font_class": "tianjia1", - "unicode": "e896", - "unicode_decimal": 59542 - }, { "icon_id": "23472267", "name": "设 置", @@ -173,13 +180,6 @@ "unicode": "e8a4", "unicode_decimal": 59556 }, - { - "icon_id": "23472275", - "name": "自述文件_icon", - "font_class": "zishuwenjian_icon", - "unicode": "e8b0", - "unicode_decimal": 59568 - }, { "icon_id": "23472276", "name": "左滑icon", @@ -383,13 +383,6 @@ "unicode": "e86f", "unicode_decimal": 59503 }, - { - "icon_id": "23046247", - "name": "导出_悬浮", - "font_class": "daochu_xuanfu", - "unicode": "e870", - "unicode_decimal": 59504 - }, { "icon_id": "23046252", "name": "错误", diff --git a/public/css/iconfont.ttf b/public/css/iconfont.ttf index afbf2d99c..0a1650faa 100644 Binary files a/public/css/iconfont.ttf and b/public/css/iconfont.ttf differ diff --git a/public/css/iconfont.woff b/public/css/iconfont.woff index 32bb2f13d..80564b7d2 100644 Binary files a/public/css/iconfont.woff and b/public/css/iconfont.woff differ diff --git a/public/css/iconfont.woff2 b/public/css/iconfont.woff2 index 9b7e39111..32c69f8e2 100644 Binary files a/public/css/iconfont.woff2 and b/public/css/iconfont.woff2 differ diff --git a/src/forge/Branch/CloneAddress.js b/src/forge/Branch/CloneAddress.js index 38ddf5a0c..618b5663c 100644 --- a/src/forge/Branch/CloneAddress.js +++ b/src/forge/Branch/CloneAddress.js @@ -13,7 +13,7 @@ function CloneAddress({http_url , ssh_url , zip_url , tar_url}) { return (
-
+
{setKey(e.key)}}>HTTP {setKey(e.key)}}>SSH diff --git a/src/forge/Branch/branch.scss b/src/forge/Branch/branch.scss index 04c776667..447b2cee0 100644 --- a/src/forge/Branch/branch.scss +++ b/src/forge/Branch/branch.scss @@ -48,7 +48,7 @@ .branch-tagBox{ border:1px solid #D0D0D0; border-radius: 3px; - height: 40px; + height: 36px; display: flex; align-items: center; cursor: pointer; @@ -98,6 +98,7 @@ .urlMenu{ line-height: 30px; margin-bottom: 10px; + padding:15px 20px 0px 20px; border-bottom: none; li.ant-menu-item{ height: 30px; diff --git a/src/forge/Component/Component.scss b/src/forge/Component/Component.scss index 3a94c3751..627304e15 100644 --- a/src/forge/Component/Component.scss +++ b/src/forge/Component/Component.scss @@ -113,7 +113,14 @@ li.ant-menu-item{ z-index: 10000; } .laterest{ - color: #05690d; + background-color: #EF3131; + color: #fff; + font-size: 12px; + margin-left: 10px; + padding:0px 5px; + border-radius: 2px; + height: 18px; + line-height: 18px; } @media screen and (max-width: 1800px){ @@ -157,39 +164,88 @@ li.ant-menu-item{ } .menuPanels{ - width: 240px; - height: 180px; + width: 295px; + .leftline{ + position: relative; + color: #666; + height: 16px; + &::before{ + position: absolute; + left: -10px; + top:3px; + height: 12px; + width: 1px; + background-color: #666666; + content: ""; + } + } + .ant-btn{ + height: 36px; + line-height: 34px; + width: 83px; + text-align: center; + padding:0px ; + font-weight: 500; + font-size: 14px; + &.currentBtn{ + cursor: default; + color: #333; + &:hover{ + color: #333; + border-color: #d0d0d0; + } + } + } + .ant-btn-default{ + color: #333; + border-color: #d0d0d0; + &:hover{ + background: #F3F4F6; + } + } + .ant-btn-primary{ + color: #fff; + background-color: #2A61FF; + } + .focusPanelHeadInfo{ + padding:14px 16px; + border-bottom: 1px solid #eee; + } .ant-popover-content,.ant-popover-inner{ height: 100%; width: 100%; } + .ant-popover-inner-content{ + padding:0px; + } } .halfs{ margin-top: 24px; padding:24px 0px 0px 0px; border-top: 1px solid #e8e8e8; - .attrPerson{ - padding-bottom: 24px; - } +} +.aboutSubTitle{ + display: flex; + align-items: center; } .menuinfos{ - padding:15px 0px; + padding:10px 20px; &>a{ display: flex; flex-direction: column; align-items: center; - border-right: 1px solid #eee; flex: 1; & >span:first-child{ - font-size: 18px; - font-weight: 400; + font-size: 16px; + font-weight: 500; color: #333; + line-height: 22px; } & >span:last-child{ color: #666; - } - &:last-child{ - border-right: none; + font-weight: 400; + line-height: 20px; + margin-top: 6px; } } } diff --git a/src/forge/Component/Contributors.jsx b/src/forge/Component/Contributors.jsx index 20276ef6b..9890ea76f 100644 --- a/src/forge/Component/Contributors.jsx +++ b/src/forge/Component/Contributors.jsx @@ -1,13 +1,13 @@ import React, { useEffect, useState } from 'react'; import { AlignCenter , FlexAJ } from '../Component/layout'; import { Link } from 'react-router-dom'; -import { Popover , Spin } from 'antd'; +import { Popover , Spin , Button } from 'antd'; import { getImageUrl } from 'educoder'; import './Component.scss'; import { getUser } from '../GetData/getData'; import axios from 'axios'; -function Contributors({contributors,owner,projectsId}){ +function Contributors({contributors,owner,projectsId,currentLogin}){ const [ menuList ,setMenuList ]= useState([]); const [ list , setList ]= useState(undefined); const [ total , setTotal ]= useState(0); @@ -50,15 +50,28 @@ function Contributors({contributors,owner,projectsId}){ if(data){ let ele = ( - - - - {data.name} - - { - data.is_watch ? FocusFunc(false,data.login)}>取消关注:FocusFunc(true,data.login)}>关注 - } - + + +
+ + {data.name} + { + data.location && + {data.location} + } + + { + data.organizations && data.organizations.length > 0 ? + + 所属组织: +
+ {renderArray(data.organizations)} +
+
+ :"" + } +
+
{data.projects_count} @@ -73,19 +86,18 @@ function Contributors({contributors,owner,projectsId}){ 关注数 - { - data.organizations && data.organizations.length > 0 ? - - 所属组织: -
- {renderArray(data.organizations)} -
-
- :"" - } - { - data.location && 所在地址:{data.location} - } +
+ { + currentLogin && (currentLogin === data.login) + ? + + : + data.is_watch ? + + : + + } +
) setMenu(ele); @@ -135,12 +147,10 @@ function Contributors({contributors,owner,projectsId}){ return(
- - - 贡献者 - { contributors && contributors.total_count > 0 && {contributors.total_count}} - - + + 贡献者 + { contributors && contributors.total_count > 0 && {contributors.total_count}} +
setVisibleFunc(false)}> { total > 0 ? diff --git a/src/forge/Component/LanguagePower.jsx b/src/forge/Component/LanguagePower.jsx index 3197309c4..8d3e361b5 100644 --- a/src/forge/Component/LanguagePower.jsx +++ b/src/forge/Component/LanguagePower.jsx @@ -25,7 +25,7 @@ function LanguagePower({languages}){ } return(
-

开发语言

+

开发语言

{ array && array.map((item,key)=>{ diff --git a/src/forge/Component/Releases.jsx b/src/forge/Component/Releases.jsx index c7ff4ea15..d8c5e86ff 100644 --- a/src/forge/Component/Releases.jsx +++ b/src/forge/Component/Releases.jsx @@ -6,26 +6,21 @@ function Releases({owner,projectsId,releaseVersions , baseOperate , projectType} return(
- - 发行版 - { releaseVersions && releaseVersions.total_count > 0 && {releaseVersions.total_count}} - - {/* { - baseOperate && projectType !==2 && 新建 - } */} - + + 发行版 + { releaseVersions && releaseVersions.total_count > 0 && {releaseVersions.total_count}} + { releaseVersions && releaseVersions.total_count>0 ? releaseVersions.list.map((item,key)=>{ return( key === 0 && -
-

- {item.name} - 最新 +

+ 发布{item.name}版本 + 最新

-

{item.created_at}

+

{item.created_at}

) diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index a57a62d3f..ee2bc092c 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -315,7 +315,7 @@ function CoderDepot(props){ list = {mainFlag ? dirInfo : undefined} />
setVisible(true)}> - + 目录
@@ -328,7 +328,7 @@ function CoderDepot(props){
-
+
{ props && props.platform ? - + { baseOperate && projectDetail.type !== 2 && pullsFlag && - + } { baseOperate && issuesFlag && - + } { fileOperate && - + } - + @@ -391,11 +391,11 @@ function CoderDepot(props){
{ hideBtn && changeHide(hide)}> } - {lastCommit && lastCommit.time_from_now} + {lastCommit && lastCommit.time_from_now} { commitCount ? - - {commitCount}次提交 + + {commitCount}次提交 :"" }
@@ -452,12 +452,12 @@ function CoderDepot(props){
- 简介 + 关于 {projectDetail.permission && (projectDetail.permission==="Admin" || projectDetail.permission==="Owner") && setOpenModal(true)} className="iconfont icon-a-shezhi font-15"> } - {desc &&

{desc}

} + {desc &&

{desc}

} { website &&
@@ -466,7 +466,7 @@ function CoderDepot(props){
}
- + README.md
@@ -476,7 +476,7 @@ function CoderDepot(props){ { projectDetail && projectDetail.license_name &&
- + {projectDetail.license_name}
} @@ -492,7 +492,7 @@ function CoderDepot(props){ lesson_url &&
-

实践课程

+

实践课程

{lesson_url}
} @@ -514,7 +514,12 @@ function CoderDepot(props){ {/* 贡献者 */} { projectDetail && projectDetail.contributors && - + } {/* 语言 */} { projectDetail && projectDetail.languages && diff --git a/src/forge/Main/CoderDepotCatalogue.jsx b/src/forge/Main/CoderDepotCatalogue.jsx index 004962610..37fd32696 100644 --- a/src/forge/Main/CoderDepotCatalogue.jsx +++ b/src/forge/Main/CoderDepotCatalogue.jsx @@ -13,7 +13,7 @@ function CoderDepotCatalogue({item , goToSubRoot , owner , projectsId }){
  • goToSubRoot(item.path,item.type,item.name)} className={item.type === "submodule" && "submoduleStyle"}> - {item.name} + {item.name} diff --git a/src/forge/Main/CoderDepotReadme.jsx b/src/forge/Main/CoderDepotReadme.jsx index 59a687ddc..e5f6cbc4e 100644 --- a/src/forge/Main/CoderDepotReadme.jsx +++ b/src/forge/Main/CoderDepotReadme.jsx @@ -1,8 +1,7 @@ import React, { useEffect, useState } from 'react'; import RenderHtml from '../../components/render-html'; import { AlignCenter } from '../Component/layout'; -import { Dropdown , Menu , Spin } from 'antd'; -import { Link } from 'react-router-dom'; +import { Dropdown , Anchor , Spin } from 'antd'; import ReadmeCatelogue from './sub/ReadmeCatelogue'; const $ = window.$; @@ -33,32 +32,35 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){ function menu(){ if(menuList && menuList.length > 0){ return( - + ) }else{ return } } + return(
    -
    - - - - - 目录 - - - README.md - - { - operate ? - ChangeFile(readme && readme.path, false)}> - - - :"" - } -
    + +
    + + + + + 目录 + + + README.md + + { + operate ? + ChangeFile(readme && readme.path, false)}> + + + :"" + } +
    +
    { content &&
    diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js index e02594703..2d17e6611 100644 --- a/src/forge/Main/Detail.js +++ b/src/forge/Main/Detail.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { Spin, Tooltip, Button } from 'antd'; import { Link, Route, Switch } from 'react-router-dom'; -import { Content , AlignTop } from '../Component/layout'; +import { Content , AlignTop, AlignCenter } from '../Component/layout'; import DetailBanner from './sub/DetailBanner'; import { numFormat } from 'educoder'; import '../css/index.scss' @@ -435,31 +435,19 @@ class Detail extends Component {
    - -
    + +
    {project && project.author && - {project.author.name} + {project.author.name} } / - {projectDetail && projectDetail.name} + {projectDetail && projectDetail.name}
    - { projectDetail && projectDetail.private && 私有} + { projectDetail && projectDetail.private && 私有}
    -
    - { - projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ? - this.textFunc(projectDetail.forked_from_project_id,projectDetail.fork_info) - :"" - } - { - projectDetail && projectDetail.type && projectDetail.type !== 0 ? - 镜像自 {projectDetail.mirror_url} - :"" - } -
    -
    +
    { firstSync ? "": @@ -502,7 +490,8 @@ class Detail extends Component { - 复刻 + + 复刻 { @@ -519,7 +508,19 @@ class Detail extends Component { }
    -
    + +
    + { + projectDetail && projectDetail.forked_from_project_id && projectDetail.fork_info ? + this.textFunc(projectDetail.forked_from_project_id,projectDetail.fork_info) + :"" + } + { + projectDetail && projectDetail.type && projectDetail.type !== 0 ? + 镜像自 {projectDetail.mirror_url} + :"" + } +
    { firstSync ? "" : img{ - margin-right: 8px; -} -.headerMenu-wrapper li a > span.num{ - line-height: 24px; - margin-left: 5px; - margin-top: 2px; - font-size: 12px; - float: right; - color: #666!important; - background-color: rgba(153, 153, 153, 0.13);; - border-radius: 50%; - width: 24px; - height: 24px; -} -.headerMenu-wrapper li.active a,.headerMenu-wrapper li.active a i{ - color: #2A61FF!important; -} -.headerMenu-wrapper li.active::after{ - position: absolute; - bottom:0px; - height:2px; - background-color: #2A61FF; - content:''; - left: 0px; - width:100%; + cursor: pointer; + li{ + font-size: 14px; + position: relative; + text-align: center; + height: 40px; + line-height: 28px; + padding:0px 20px; + & > a{ + color: #666; + &> img{ + margin-right: 8px; + } + &> span.num{ + line-height: 24px; + margin-left: 5px; + margin-top: 2px; + font-size: 12px; + float: right; + color: #666!important; + background-color: rgba(153, 153, 153, 0.13);; + border-radius: 50%; + width: 24px; + height: 24px; + } + } + &.active a,&.active a i{ + color: #2A61FF!important; + } + &.active::after,&:hover::after{ + position: absolute; + bottom:0px; + height:2px; + background-color: #2A61FF; + content:''; + left: 0px; + width:100%; + } + &:hover::after{ + background-color: rgba(153, 153, 153, 0.2);; + } + } } .detail_tag_btn{ height:34px; @@ -271,32 +274,36 @@ border:1px solid #D0D0D0; display: flex; align-items: center; - margin-left: 30px; + margin-left: 10px; padding:0px; background-color:#FAFBFC; box-shadow: none; -} -.detail_tag_btn:hover{ - background-color: #F3F4F6; + &:hover{ + background-color: #F3F4F6; + } + .detail_tag_btn_name{ + padding:0px 18px; + min-width: 82px; + text-align: center; + &:hover>span{ + color: #333!important; + } + img{ + margin-right: 10px; + } + } + .detail_tag_btn_count{ + width: 42px; + text-align: center; + background: #fff; + border-radius: 0px 4px 4px 0px; + height:100%; + border-left: 1px solid #D0D0D0; + } } .ant-tooltip { max-width: fit-content!important; } -.detail_tag_btn_name{ - padding:0px 10px; - color: #666!important; -} -.detail_tag_btn_name img{ - margin-right: 10px; -} -.detail_tag_btn_count{ - width: 42px; - text-align: center; - background: #fff; - border-radius: 0px 4px 4px 0px; - height:100%; - border-left: 1px solid #D0D0D0; -} .files-md{ padding:20px; } @@ -347,6 +354,7 @@ .gitAddressClone{ + margin:0px 20px 14px 20px!important; display: flex; height: 40px; align-items: center; @@ -658,9 +666,7 @@ .item:last-child{ border-bottom:none; } -.gitAddressClone{ - margin: 0 !important; -} + .item_title small{ font-weight: 400; margin-left: 10px; diff --git a/src/forge/Main/sub/DetailBanner.jsx b/src/forge/Main/sub/DetailBanner.jsx index ee0a0a35b..af8067741 100644 --- a/src/forge/Main/sub/DetailBanner.jsx +++ b/src/forge/Main/sub/DetailBanner.jsx @@ -18,7 +18,7 @@ function DetailBanner({ history,list , owner , projectsId , isManager , url , pa } },[list]); return( -
    +
    { menuName && projectDetail ?
      diff --git a/src/forge/Main/sub/ReadmeCatelogue.jsx b/src/forge/Main/sub/ReadmeCatelogue.jsx index 64eb90bab..d1e018bb6 100644 --- a/src/forge/Main/sub/ReadmeCatelogue.jsx +++ b/src/forge/Main/sub/ReadmeCatelogue.jsx @@ -1,11 +1,11 @@ -import React , {useState } from 'react'; +import React , { useState , useEffect } from 'react'; import { Anchor , Input } from 'antd'; import './sub.scss'; +import { Base64 } from 'js-base64'; const { Link } = Anchor; -const { Search } = Input; -function ReadmeCatelogue({ menuList }) { +function ReadmeCatelogue({ menuList , hash }) { const [ goHref , setGoHref ] = useState(""); const [ value , setValue ] = useState(""); const [ menu , setMenu] = useState(menuList); @@ -18,7 +18,7 @@ function ReadmeCatelogue({ menuList }) { function changeValue(e) { setValue(e.target.value); if(e.target.value){ - let m = menu.filter(i=>i.text.indexOf(e.target.value)>-1); + let m = menuList.filter(i=>i.text.indexOf(e.target.value)>-1); setMenu(m); }else{ setMenu(menuList); @@ -41,7 +41,7 @@ function ReadmeCatelogue({ menuList }) { menu.map((item,key)=>{ return(
      - +
      ) }) diff --git a/src/forge/Main/sub/sub.scss b/src/forge/Main/sub/sub.scss index d4db6208c..4e6a3d8ac 100644 --- a/src/forge/Main/sub/sub.scss +++ b/src/forge/Main/sub/sub.scss @@ -34,13 +34,10 @@ padding:15px; border-bottom: 1px solid #eee; } - .anchorBox{ - max-height: 255px; - overflow-y: auto; - } .ant-anchor-wrapper{ margin-left: 0px; padding:5px 15px; + max-height: 255px!important; .items{ border-radius: 4px; margin-bottom: 5px; diff --git a/src/forge/css/index.scss b/src/forge/css/index.scss index 0264c73ce..e1986728e 100644 --- a/src/forge/css/index.scss +++ b/src/forge/css/index.scss @@ -11,7 +11,7 @@ ul,ol,dl{ font-size: 22px; font-weight: normal; line-height: 30px; - max-width: 700px; + max-width: 690px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;