blob: da7ebae70d91d57714cf28490bef82bc6311b7b8 [file] [log] [blame]
<!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>