index.vue 428 字节
Newer Older
1
<template>
X
xiaoyucoding 已提交
2 3
  <uni-web-view>
    <iframe
X
xiaoyucoding 已提交
4
      :src="realPath"
X
xiaoyucoding 已提交
5 6
      frameborder="0"
      width="100%"
X
xiaoyucoding 已提交
7
      height="100%" />
X
xiaoyucoding 已提交
8
  </uni-web-view>
9 10 11
</template>
<script>
export default {
X
xiaoyucoding 已提交
12 13 14 15 16 17 18 19
  name: 'WebView',
  props: {
    src: {
      type: String,
      default: ''
    }
  },
  data () {
X
xiaoyucoding 已提交
20 21 22
    return {
      realPath: this.$getRealPath(this.src)
    }
X
xiaoyucoding 已提交
23
  }
24 25
}
</script>
X
xiaoyucoding 已提交
26 27 28 29 30
<style>
	uni-web-view iframe {
		position: absolute;
	}
</style>