mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:09:08 +08:00
底部跳转链接修复
This commit is contained in:
parent
ac7e2e7551
commit
3a0ad1cd33
@ -12,6 +12,12 @@ import {Portal} from 'react-overlays';
|
|||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import {Link} from 'react-router';
|
import {Link} from 'react-router';
|
||||||
|
|
||||||
|
let ContextPath = '';
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV === 'production') {
|
||||||
|
ContextPath = '/amis';
|
||||||
|
}
|
||||||
|
|
||||||
class CodePreview extends React.Component {
|
class CodePreview extends React.Component {
|
||||||
state = {
|
state = {
|
||||||
PlayGround: null
|
PlayGround: null
|
||||||
@ -200,7 +206,10 @@ export default function (doc) {
|
|||||||
<div className="Doc-footer">
|
<div className="Doc-footer">
|
||||||
<div className="Doc-navLinks">
|
<div className="Doc-navLinks">
|
||||||
{prevDoc ? (
|
{prevDoc ? (
|
||||||
<Link className="Doc-navLinks--prev" to={prevDoc.path}>
|
<Link
|
||||||
|
className="Doc-navLinks--prev"
|
||||||
|
to={`${ContextPath}${prevDoc.path}`}
|
||||||
|
>
|
||||||
<div className="Doc-navLinks-icon">
|
<div className="Doc-navLinks-icon">
|
||||||
<i className="iconfont icon-arrow-left"></i>
|
<i className="iconfont icon-arrow-left"></i>
|
||||||
</div>
|
</div>
|
||||||
@ -215,7 +224,10 @@ export default function (doc) {
|
|||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{nextDoc ? (
|
{nextDoc ? (
|
||||||
<Link className="Doc-navLinks--next" to={nextDoc.path}>
|
<Link
|
||||||
|
className="Doc-navLinks--next"
|
||||||
|
to={`${ContextPath}${nextDoc.path}`}
|
||||||
|
>
|
||||||
<div className="Doc-navLinks-body">
|
<div className="Doc-navLinks-body">
|
||||||
<div className="Doc-navLinks-subtitle">
|
<div className="Doc-navLinks-subtitle">
|
||||||
下一篇 - {nextDoc.group || '其他'}
|
下一篇 - {nextDoc.group || '其他'}
|
||||||
|
Loading…
Reference in New Issue
Block a user