Commit cb2ce54e authored by Allen Bai's avatar Allen Bai

feat: 添加环境的测试变量

parent e6876113
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>异步挂载</title>
<style>
* {
margin: 0;
padding: 0;
}
html,
body {
background-color: rgb(35, 155, 86);
}
.detail-main {
height: 200px;
position: relative;
transform: translateY(50%);
border: 3px solid black;
}
</style>
</head>
<body>
<div id="view" style="height: 200vh;border:5px slateblue solid">
<p>挂载到异步生成的dom节点上 env</p>
</div>
<script>
(function (e) {
const IPCFooterConfig = {
dom: '.detail-main',
footerStyles: {
position: 'static',
margin: '8px 0 60px 0'
},
env: 'test'
}
function loadScript() {
var r = document.createElement("script");
(r.async = !0),
(r.src = "../../dist/IPCHelper.main.js"),
(r.crossOrigin = "anonymous"),
(r.onload = function () {
window.__TUIA_IPC_HELPER__ && window.__TUIA_IPC_HELPER__.mountIPCFooter(IPCFooterConfig)
}),
document.body && document.body.appendChild(r);
};
loadScript()
})(window);
</script>
<script>
var view = document.querySelector('#view')
setTimeout(() => {
let ele = document.createElement('div')
ele.classList.add('detail-main')
view.appendChild(ele)
}, 2000)
</script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment