File tree Expand file tree Collapse file tree 6 files changed +41
-6
lines changed
Expand file tree Collapse file tree 6 files changed +41
-6
lines changed Original file line number Diff line number Diff line change 1- .editor {
2- border : none ;
3-
1+ .markdown {
42 :global {
53 .editor-container {
64 > .sec-html {
119 }
1210 }
1311}
12+
13+ .markdown_render {
14+ border : none ;
15+ }
16+
17+ .markdown_editor {
18+ min-height : 180px ;
19+ }
Original file line number Diff line number Diff line change @@ -11,13 +11,16 @@ const Markdown: React.FC<Props> = (props) => {
1111 const { value, type, onChange } = props ;
1212
1313 let view ;
14+ let classname = styles . markdown ;
1415
1516 if ( type === 'render' ) {
1617 view = {
1718 menu : false ,
1819 md : false ,
1920 html : true ,
2021 } ;
22+
23+ classname += ` ${ styles . markdown_render } ` ;
2124 }
2225
2326 if ( type === 'editor' ) {
@@ -26,11 +29,13 @@ const Markdown: React.FC<Props> = (props) => {
2629 md : true ,
2730 html : false ,
2831 } ;
32+
33+ classname += ` ${ styles . markdown_editor } ` ;
2934 }
3035
3136 return (
3237 < MdEditor
33- className = { styles . editor }
38+ className = { classname }
3439 readOnly = { type === 'render' }
3540 view = { view }
3641 value = { value }
Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ export const TABS_MAP = {
1717 name : '招聘' ,
1818 color : '#5BD8A6' ,
1919 } ,
20+ dev : {
21+ name : '客户端测试' ,
22+ color : '#5BD8A6' ,
23+ } ,
2024} ;
2125
2226export type TabType = keyof typeof TABS_MAP ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ const layoutConfig = ({
5252 navTheme : 'light' ,
5353 layout : 'top' ,
5454 headerHeight : 64 ,
55- fixedHeader : false ,
55+ fixedHeader : true ,
5656 contentWidth : 'Fluid' ,
5757
5858 logo,
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import ProCard from '@ant-design/pro-card';
33
44import { IRoute , Link } from 'umi' ;
55import { PageContainer } from '@ant-design/pro-layout' ;
6+ import { Affix , Button } from 'antd' ;
7+
68import UserInfo from './component/UserInfo' ;
79
810const getCurrentRoute = ( route : IRoute , path : string ) : IRoute | undefined => {
@@ -76,6 +78,22 @@ const Layout: React.FC<React.PropsWithChildren<Props>> = (props) => {
7678 < UserInfo />
7779 </ ProCard >
7880 </ ProCard >
81+ < Affix
82+ offsetBottom = { 200 }
83+ style = { {
84+ position : 'fixed' ,
85+ bottom : '50px' ,
86+ right : '24px' ,
87+ } }
88+ >
89+ < Button
90+ onClick = { ( ) => {
91+ window . scrollTo ( 0 , 0 ) ;
92+ } }
93+ >
94+ 回到顶部
95+ </ Button >
96+ </ Affix >
7997 </ PageContainer >
8098 ) ;
8199} ;
Original file line number Diff line number Diff line change @@ -18,7 +18,9 @@ export const queryTopicList = async (params: {
1818 } ,
1919 } ;
2020
21- return request ( `${ BASE_URL } /api/v1/topics` , options ) ;
21+ const res = await request ( `${ BASE_URL } /api/v1/topics` , options ) ;
22+ res . data = res . data . filter ( ( item : any ) => item ?. author ?. loginname ) ;
23+ return res ;
2224} ;
2325
2426export const queryTopicDetail = async ( params : {
You can’t perform that action at this time.
0 commit comments