amis/examples/index.html
liaoxuezhi fff9159671
新增 JSSDK 多页应用渲染器 (#1351)
* app 渲染器初稿

* jssdk app demo

* app 渲染器部分逻辑

* app 渲染器部分逻辑

* 补充文档

* 补充文档
2021-01-10 11:40:26 +08:00

94 lines
3.1 KiB
HTML

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<title>amis - 低代码前端框架</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="image/x-icon" rel="shortcut icon" href="./static/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<link rel="stylesheet" href="./static/iconfont.css" />
<link rel="stylesheet" href="font-awesome/css/font-awesome.css" />
<link rel="stylesheet" href="bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="animate.css/animate.css" />
<link rel="stylesheet" href="prismjs/themes/prism.css" />
<!--DEPENDENCIES_INJECT_PLACEHOLDER-->
<link rel="stylesheet" href="./doc.css" />
<link rel="stylesheet" href="./style.scss" />
<!--STYLE_PLACEHOLDER-->
<style>
.app-wrapper,
.schema-wrapper {
position: relative;
width: 100%;
height: 100%;
}
</style>
<script type="text/x-jsx">
const theme = localStorage.getItem('theme') || 'default';
// 非 IE 模式
if (window.navigator.userAgent.indexOf('Trident') === -1) {
document.write(
`<link rel="stylesheet" title="default" ${
theme !== 'default' ? 'disabled' : ''
} href="${__uri('../scss/themes/default.scss')}" />`
);
document.write(
`<link rel="stylesheet" title="cxd" ${
theme !== 'cxd' ? 'disabled' : ''
} href="${__uri('../scss/themes/cxd.scss')}" />`
);
document.write(
`<link rel="stylesheet" title="dark" ${
theme !== 'dark' ? 'disabled' : ''
} href="${__uri('../scss/themes/dark.scss')}" />`
);
} else {
document.write(
`<link rel="stylesheet" title="default" ${
theme !== 'default' ? 'disabled' : ''
} href="${__uri('../scss/themes/default-ie11.scss')}" />`
);
document.write(
`<link rel="stylesheet" title="cxd" ${
theme !== 'cxd' ? 'disabled' : ''
} href="${__uri('../scss/themes/cxd-ie11.scss')}" />`
);
document.write(
`<link rel="stylesheet" title="dark" ${
theme !== 'dark' ? 'disabled' : ''
} href="${__uri('../scss/themes/dark-ie11.scss')}" />`
);
}
</script>
<!--ignore-->
<link rel="stylesheet" href="../scss/helper.scss" />
<!--ignore-->
</head>
<body>
<div id="root" class="app-wrapper"></div>
<script src="./mod.js"></script>
<script type="text/javascript">
var _hmt = _hmt || [];
// 百度统计
(function () {
var hm = document.createElement('script');
hm.src = 'https://hm.baidu.com/hm.js?1f80f2c9dbe21dc3af239cf9eee90f1f';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();
/* @require ./index.jsx 标记为同步依赖,提前加载 */
amis.require(['./index.jsx'], function (app) {
var initialState = {};
app.bootstrap(document.getElementById('root'), initialState);
});
</script>
</body>
</html>