mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 13:08:41 +08:00
site: fix iframe
This commit is contained in:
parent
2f81cc8111
commit
07c1ef05d3
@ -3,6 +3,8 @@ import { Link } from 'react-router';
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import * as utils from '../utils';
|
import * as utils from '../utils';
|
||||||
|
|
||||||
|
const isLocal = location.port;
|
||||||
|
|
||||||
export default class Demo extends React.Component {
|
export default class Demo extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -39,7 +41,7 @@ export default class Demo extends React.Component {
|
|||||||
<section className="code-box-demo">
|
<section className="code-box-demo">
|
||||||
{
|
{
|
||||||
meta.iframe ?
|
meta.iframe ?
|
||||||
<iframe src={src} /> :
|
<iframe src={isLocal ? src : src.replace('./_site', '')} /> :
|
||||||
preview
|
preview
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user