我希望用 web 标签来加载一个网页,但是因为网页比较长,所以如果我为web标签指定了一个确定的高度,那么高度
以外的内容就无法显示,并且web标签也不支持滚动,也就是说我嵌入的页面,部分内容是不可见的。有什么办法可以
动态获取web标签的高度吗?或者让web标签可以滚动。
------------------------ 更新
4 {{nodetype}}
.webview {
width: 750px;
height: 1200px;
}
import topcarousel from './components/topcarousel.vue';
import navbtn from './components/navbtn.vue';
import allsee from './components/allsee.vue';
import type from './components/type.vue';
import type2 from './components/type2.vue';
import topic from './components/topic.vue';
import unique from './components/unique.vue';
export default {
name: 'app',
data: {
weburl: 'http://www.1905.com/',
nodetype: 'init'
},
methods: {
calH: function(event) {
var that = this;
var node = weex.document.getRef('webview');
that.nodetype = node.type;
}
},
components: {
"topcarousel": topcarousel,
"navbtn": navbtn,
"allsee": allsee,
"type": type,
"type2": type2,
"topic": topic,
"unique": unique
}
};
weex 版本
------------------------- 更新
将 web 标签内容移到 scroller 外边就可以解决这个问题,最外层有 div 套一下。