Vue实现加载效果
<div v-loading="loading">
<iframe ref='top' width="100%" height="500px" frameborder="0" scrolling="yes" src=""></iframe>
</div>
loading默认为false
//点击查询按钮时加载页面
QueryData() {
this.loading=true;
const iframe=this.$refs.top;
this.$refs.top.src =``;//要加载的数据信息
if (iframe.attachEvent) { // IE
iframe.attachEvent('onload', () => { this.loading = false; });
} else { // 非IE
iframe.onload = () => { this.loading = false; };
}
},