weex index.html作用,index.html

本文展示了一个使用 Weex 和 Vue 构建的演示项目,包括 HTML、CSS 和 JavaScript 的配置,通过 URL 参数加载不同的 JavaScript 模块实现动态页面加载。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Weex Vue Demo

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;

}

/**

* these iife is just for the convenience for the showcase of demos.

* you can import a jsbundle by wrapping it in a tag.

* e.g.

*/

; (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)

})()

一键复制

编辑

Web IDE

原始数据

按行查看

历史

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值