提交 de701f2f authored 作者: vipcxj's avatar vipcxj

修复文档模块样式

上级 589140a3
.main { .main {
width:100%; width:100%;
// height: 100%;
position: relative; position: relative;
margin:0 auto; margin:0 auto;
overflow:auto; background:rgb(250, 250, 250);
_display:inline-block;
.catalogue { .catalogue {
width:200px;
// height: 100%;
float:left;
// background:#6F0;
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
margin-top: 1em; margin-top: 1em;
list-style-type: cjk-ideographic; list-style-type: cjk-ideographic;
overflow-y: scroll;
li{ li{
margin-bottom: 15px; margin-bottom: 15px;
} }
...@@ -23,11 +16,14 @@ ...@@ -23,11 +16,14 @@
} }
} }
.leftMenu { .leftMenu {
position: fixed; width:250px;
height: 100%;
float: left;
overflow-y: scroll;
} }
.contents { .contents {
margin-left: 200px; margin-left: 250px;
height: 100%; height: 100%;
background:#FC0; overflow-y: scroll;
} }
} }
/* eslint-disable no-undef */ /* eslint-disable no-undef */
import React from 'react'; import React from 'react';
import cs from 'classnames';
import { Link, Route, Switch } from 'dva/router'; import { Link, Route, Switch } from 'dva/router';
import 'github-markdown-css'; import 'github-markdown-css';
import { withSize } from '../../../../components/hoc/size';
import styles from './index.less'; import styles from './index.less';
import mdIndex from './index.md'; import mdIndex from './index.md';
import mdAuth from './auth.md'; import mdAuth from './auth.md';
...@@ -12,11 +14,11 @@ import md from './markdown'; ...@@ -12,11 +14,11 @@ import md from './markdown';
class DocMainPage extends React.PureComponent { class DocMainPage extends React.PureComponent {
render() { render() {
const { match } = this.props; const { match, size } = this.props;
const pages = createPages(match); const pages = createPages(match);
return ( return (
<div className={styles.main}> <div className={styles.main} style={{ height: size.height }}>
<div className={styles.leftMenu}> <div className={cs('markdown-body', styles.leftMenu)}>
<ul className={styles.catalogue}> <ul className={styles.catalogue}>
<li> <li>
<Link to={`${match.url}/index`}>前置说明</Link> <Link to={`${match.url}/index`}>前置说明</Link>
...@@ -57,4 +59,4 @@ class DocMainPage extends React.PureComponent { ...@@ -57,4 +59,4 @@ class DocMainPage extends React.PureComponent {
} }
} }
export default DocMainPage; export default withSize(DocMainPage);
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论