forked from alibaba/weex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.html
43 lines (40 loc) · 1.41 KB
/
vue.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
<!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="./packages/weex-vue-render/index.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/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>