mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 03:18:16 +08:00
schemas 路径
This commit is contained in:
parent
d905276e50
commit
2b5737c67a
@ -227,8 +227,15 @@ export default class PlayGround extends React.Component {
|
|||||||
'$1'
|
'$1'
|
||||||
); // 去掉注释
|
); // 去掉注释
|
||||||
|
|
||||||
|
let host = `${window.location.protocol}//${window.location.host}`;
|
||||||
|
|
||||||
|
// 如果在 gh-pages 里面
|
||||||
|
if (/^\/amis/.test(window.location.pathname)) {
|
||||||
|
host = '/amis';
|
||||||
|
}
|
||||||
|
|
||||||
const json = {
|
const json = {
|
||||||
$schema: `${window.location.protocol}//${window.location.host}/schemas/page.json#`,
|
$schema: `${host}/schemas/page.json#`,
|
||||||
...JSON.parse(schemaContent)
|
...JSON.parse(schemaContent)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user