样式修复

This commit is contained in:
rickcole 2020-07-29 15:33:25 +08:00
parent 93aef7c5a1
commit 3ef1681252
5 changed files with 42 additions and 32 deletions

View File

@ -284,7 +284,7 @@ export class App extends React.PureComponent {
browserHistory.push( browserHistory.push(
`${path || (hasChildren && nav.children[0].path)}` `${path || (hasChildren && nav.children[0].path)}`
); );
this.toggleOpen(e, nav); !isOpen && this.toggleOpen(e, nav);
}} }}
// to={`${path || (hasChildren && nav.children[0].path)}`} // to={`${path || (hasChildren && nav.children[0].path)}`}
> >
@ -405,7 +405,7 @@ export default function entry({pathPrefix}) {
return ( return (
<Router history={browserHistory}> <Router history={browserHistory}>
<Route component={App}> <Route component={App}>
<Redirect from={`${ContextPath}/`} to={`${ContextPath}/docs/intro`} /> <Redirect from={`${ContextPath}/`} to={`${ContextPath}/docs/index`} />
<Redirect from={`/examples`} to={`/examples/pages/simple`} /> <Redirect from={`/examples`} to={`/examples/pages/simple`} />
<Redirect from={`/docs`} to={`/docs/index`} /> <Redirect from={`/docs`} to={`/docs/index`} />

View File

@ -233,8 +233,10 @@ export default function (doc) {
</div> </div>
{doc.toc && doc.toc.children && doc.toc.children.length > 1 ? ( {doc.toc && doc.toc.children && doc.toc.children.length > 1 ? (
<div className="Doc-toc"> <div className="Doc-toc">
<div className="Doc-headingList"> <div>
{this.renderHeading(doc.toc.children)} <div className="Doc-headingList">
{this.renderHeading(doc.toc.children)}
</div>
</div> </div>
</div> </div>
) : null} ) : null}

View File

@ -191,7 +191,7 @@ export default function (schema) {
size="lg" size="lg"
onHide={this.close} onHide={this.close}
show={this.state.open} show={this.state.open}
overlay={false} // overlay={false}
closeOnOutside={true} closeOnOutside={true}
position="right" position="right"
> >
@ -210,16 +210,18 @@ export default function (schema) {
// </div> // </div>
// </div> // </div>
<div className="Doc-toc"> <div className="Doc-toc">
<div className="Doc-headingList"> <div>
<div className="Doc-headingList-item"> <div className="Doc-headingList">
<a onClick={this.toggleCode}> <div className="Doc-headingList-item">
查看页面配置 <i className="fa fa-code p-l-xs"></i> <a onClick={this.toggleCode}>
</a> 查看页面配置 <i className="fa fa-code p-l-xs"></i>
</div> </a>
<div className="Doc-headingList-item"> </div>
<a onClick={this.copyCode}> <div className="Doc-headingList-item">
复制页面配置 <i className="fa fa-copy p-l-xs"></i> <a onClick={this.copyCode}>
</a> 复制页面配置 <i className="fa fa-copy p-l-xs"></i>
</a>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -98,7 +98,7 @@ body {
.a-Layout, .a-Layout,
.cxd-Layout, .cxd-Layout,
.dark-Layout { .dark-Layout {
padding-top: 64px; padding-top: 100px;
&-headerBar { &-headerBar {
height: 64px; height: 64px;
@ -200,6 +200,8 @@ body {
} }
.Doc { .Doc {
height: 100%;
.anchor { .anchor {
padding-top: 100px; padding-top: 100px;
margin-top: -100px; margin-top: -100px;
@ -319,6 +321,7 @@ body {
&-headingList { &-headingList {
font-size: 12px; font-size: 12px;
font-weight: 500; font-weight: 500;
border-left: 1px solid #e8ebee;
&-item { &-item {
padding-left: 15px; padding-left: 15px;
@ -347,7 +350,7 @@ body {
position: relative; position: relative;
.Doc-title { .Doc-title {
margin-top: 50px; // margin-top: 50px;
padding-left: 40px; padding-left: 40px;
h1 { h1 {
@ -443,20 +446,20 @@ body {
} }
> .schema-wrapper { > .schema-wrapper {
flex: 1 auto; position: relative;
width: 0;
> .a-Page, > .a-Page,
> .cxd-Page, > .cxd-Page,
> .dark-Page { > .dark-Page {
position: absolute; padding: 0 45px;
top: 100px; // position: absolute;
left: 30px; // top: 100px;
right: 60px; // left: 30px;
bottom: 0; // right: 60px;
height: auto; // bottom: 0;
&--withSidebar {
padding-right: 80px; // &--withSidebar {
} // padding-right: 80px;
// }
} }
} }
} }
@ -478,6 +481,7 @@ body {
font-size: 16px; font-size: 16px;
transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
opacity: 0; opacity: 0;
z-index: -2;
&:hover { &:hover {
color: #108cee; color: #108cee;
@ -485,6 +489,7 @@ body {
&.visible { &.visible {
opacity: 1; opacity: 1;
z-index: 0;
} }
} }
@ -493,7 +498,8 @@ body {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
&-content { &-content,
.schema-wrapper {
flex: 1 auto; flex: 1 auto;
width: 0; width: 0;
} }
@ -505,9 +511,8 @@ body {
&-toc > div { &-toc > div {
position: fixed; position: fixed;
width: 220px; width: 220px;
border-left: 1px solid #e8ebee;
top: 100px; top: 100px;
// bottom: 30px; bottom: 21px;
overflow: auto; overflow: auto;
} }

View File

@ -9,7 +9,7 @@ body {
} }
.#{$ns}Layout { .#{$ns}Layout {
height: auto; height: 100%;
min-height: 100%; min-height: 100%;
width: 100%; width: 100%;
position: relative; position: relative;
@ -152,6 +152,7 @@ body {
&-body { &-body {
padding-bottom: $Layout-header-height; padding-bottom: $Layout-header-height;
width: 100%; width: 100%;
height: 100%;
} }
&--noFooter &-body { &--noFooter &-body {