forked from apache/incubator-weex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
82 lines (77 loc) · 2.49 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Weex Vue Demo</title>
<!-- You should set 'weex-viewport' to your design pixel width, and the
viewport meta should be set like below, OTHERWISE it won't work.-->
<meta name="weex-viewport" content="750">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="format-detection" content="telephone=no, email=no" />
<!-- About style below: html's height should set to 100%, and this
style should be added before the weex-vue-render script loaded.
OTHERWISE the 'weex.config.env.deviceHeight' will not work. -->
<style>
html, body {
-ms-overflow-style: scrollbar;
-webkit-tap-highlight-color: transparent;
padding: 0;
margin: 0;
width: 100%;
height: 100%;
background-color: green;
overflow-x: hidden;
}
#info {
position: fixed;
z-index: 999999;
top: 100px;
left: 0;
width: 100%;
height: 400px;
font-size: 24px;
color: green;
padding: 10px;
overflow-x: hidden;
overflow-y: scroll;
background-color: #eee;
opacity: 0.7;
}
</style>
</head>
<body>
<div id="root"></div>
<script src="./node_modules/vue/dist/vue.runtime.js"></script>
<script src="./node_modules/weex-vue-render/dist/index.js"></script>
<script src="./packages/weex-vue-render/dist/index.js"></script>
<script>
/**
* these iife is just for the convenience for the showcase of demos.
* you can import a jsbundle by wrapping it in a <script> tag.
* e.g. <script src="examples/build/vue-web/vue/index.js"></*script>
*/
; (function () {
function getUrlParam (key) {
var reg = new RegExp('[?|&]' + key + '=([^&]+)')
var match = location.search.match(reg)
return match && match[1]
}
var page = getUrlParam('page')
var defaultPage = 'examples/build/vue-web/vue/index.js'
if (!page) {
var url = location.href.replace(/\?|$/, function(f) {
var query = '?page=' + defaultPage
return f ? query + '&' : query
})
return location.href = url
}
var bundle = document.createElement('script')
bundle.src = page
document.body.appendChild(bundle)
})()
</script>
</body>
</html>