提交 ee658c71 编写于 作者: Q qiang

feat: H5 平台 web-view 组件支持 iframe 其他属性设置

上级 2431895c
......@@ -2,7 +2,7 @@
<uni-web-view v-on="$listeners">
<v-uni-resize-sensor
ref="sensor"
@resize="_resize"
@resize="_resize"
/>
</uni-web-view>
</template>
......@@ -22,6 +22,9 @@ export default {
},
mounted () {
this.iframe = document.createElement('iframe')
Object.keys(this.$attrs).forEach(key => {
this.iframe[key] = this.$attrs[key]
})
this.iframe.src = this.$getRealPath(this.src)
document.body.appendChild(this.iframe)
this._resize()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册