diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 150326415..4907c3fc8 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -230,6 +230,10 @@ function CoderDepot(props){ } }) } + + let n = fileInfo && fileInfo.name; + const mdFlag = n && n.substring(n.length-3,n.length) === ".md"; + return( setOpenModal(false)} onOk={okUpdate}/> @@ -353,6 +357,7 @@ function CoderDepot(props){ {...props} detail={fileInfo} readOnly={readOnly} + md={mdFlag} onEdit={onEdit} currentBranch={branchName || (projectDetail && projectDetail.default_branch)} type={projectDetail.type} diff --git a/src/forge/Main/CoderRootFileDetail.js b/src/forge/Main/CoderRootFileDetail.js index 1455086d0..13939981d 100644 --- a/src/forge/Main/CoderRootFileDetail.js +++ b/src/forge/Main/CoderRootFileDetail.js @@ -24,7 +24,7 @@ class CoderRootFileDetail extends Component { } componentDidMount = () => { - const { detail } = this.props; + const { detail , mdFlag } = this.props; this.setState({ value: detail.content, }); @@ -176,9 +176,9 @@ class CoderRootFileDetail extends Component { current_user, isManager, isDeveloper, - md, currentBranch, platform, + md, type } = this.props; const { language, languages, description } = this.state; diff --git a/src/forge/Main/Index.scss b/src/forge/Main/Index.scss index 1e9a8967a..631d52c99 100644 --- a/src/forge/Main/Index.scss +++ b/src/forge/Main/Index.scss @@ -295,6 +295,7 @@ border-radius: 4px; .ant-dropdown-menu-item{ border-radius: 8px; + text-align: left; a{ width: 350px; overflow: hidden; diff --git a/src/forge/Main/list.css b/src/forge/Main/list.css index 07991f6a1..9854a0a31 100644 --- a/src/forge/Main/list.css +++ b/src/forge/Main/list.css @@ -281,7 +281,6 @@ height:100%; } .files-md{ - border:1px solid #eee; padding:20px; } /* 详情-代码 */