Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
IPC-footer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Allen Bai
IPC-footer
Commits
cb2ce54e
Commit
cb2ce54e
authored
Feb 22, 2021
by
Allen Bai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加环境的测试变量
parent
e6876113
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
0 deletions
+65
-0
h5_async_env.html
example/inHTML/h5_async_env.html
+65
-0
No files found.
example/inHTML/h5_async_env.html
0 → 100644
View file @
cb2ce54e
<!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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment