amis2/examples/mobile.html
吴多益 6aa492309e
更新部分依赖 (#2456)
ansi-to-react 到 6.1.6
exceljs 到 4.3.0
hls.js 到 1.0.10
sortablejs 到 1.14.0
tinymce 到 5.9.1
fontawesome 到 5.14.4
copy-to-clipboard 到 3.3.1

去掉 animate.css 依赖

playground 使用 json5 支持非标准 json 格式
2021-08-27 14:44:50 +08:00

86 lines
2.2 KiB
HTML

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<title>MobileView</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="@fortawesome/fontawesome-free/css/all.css" />
<link
rel="stylesheet"
href="@fortawesome/fontawesome-free/css/v4-shims.css"
/>
<!--DEPENDENCIES_INJECT_PLACEHOLDER-->
<link rel="stylesheet" title="ang" href="../scss/themes/ang.scss" />
<link
rel="stylesheet"
title="cxd"
disabled
href="../scss/themes/cxd.scss"
/>
<link
rel="stylesheet"
title="dark"
disabled
href="../scss/themes/dark.scss"
/>
<link
rel="stylesheet"
title="antd"
disabled
href="../scss/themes/antd.scss"
/>
<link rel="stylesheet" href="../scss/helper.scss" />
<style>
.app-wrapper {
position: relative;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="root" class="app-wrapper"></div>
<script src="./mod.js"></script>
<script type="text/javascript">
const themes = [
{
label: '云舍',
value: 'cxd'
},
{
label: 'Ang',
value: 'ang'
},
{
label: 'Dark',
value: 'dark'
},
{
label: 'antd',
value: 'antd'
}
];
const theme = themes[localStorage.getItem('themeIndex') || 0];
// mobile 下先禁掉所有外链避免影响
document.querySelectorAll('link[title]').forEach(item => {
item.disabled = true;
});
document.querySelector(`link[title=${theme.value}]`).disabled = false;
if (theme.value === 'dark') {
document.querySelector('body').classList.add('dark');
}
amis.require(['./mobile.tsx'], function (app) {
app.bootstrap(document.getElementById('root'), {});
});
</script>
</body>
</html>