-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
44 lines (41 loc) · 1.44 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Weex Vue Demo</title>
<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" />
<!-- <script src="./node_modules/vue/dist/vue.runtime.min.js"></script> -->
<script src="/node_modules/vue/dist/vue.runtime.js"></script>
<!-- <script src="./node_modules/weex-vue-render/index.min.js"></script> -->
<script src="/node_modules/weex-vue-render/dist/index.js"></script>
<script src="/playground/browser/build/pluginInstall.js"></script>
</head>
<body>
<div id="root"></div>
<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/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>