<commit_before><template>
  <uni-web-view v-on="$listeners">
    <v-uni-resize-sensor
      ref="sensor"
      @resize="_resize"
    />
  </uni-web-view>
</template>
<script>
export default {
  name: 'WebView',
  props: {
    src: {
      type: String,
      default: ''
    }
  },
  watch: {
    src (val, oldVal) {
      this.iframe && (this.iframe.src = this.$getRealPath(this.src))
    }
  },
  mounted () {
    this.iframe = document.createElement('iframe')
    this.iframe.src = this.$getRealPath(this.src)
    document.body.appendChild(this.iframe)
    this._resize()
  },
  activated () {
    this.iframe.style.display = 'block'<commit_msg>feat: H5 平台 web-view 组件支持 iframe 其他属性设置<commit_after><template>
  <uni-web-view v-on="$listeners">
    <v-uni-resize-sensor
      ref="sensor"
      @resize="_resize"
    />
  </uni-web-view>
</template>
<script>
export default {
  name: 'WebView',
  props: {
    src: {
      type: String,
      default: ''
    }
  },
  watch: {
    src (val, oldVal) {
      this.iframe && (this.iframe.src = this.$getRealPath(this.src))
    }
  },
  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()
  },
  activated () {
    this.iframe.style.display = 'block'
{'fraction_non_alphanumeric': 0.17501764290755117, 'fraction_numerical': 0.0007057163020465773, 'mean_word_length': 2.635897435897436, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2762499', 'n_tokens_mistral': 523, 'n_tokens_neox': 508, 'n_words': 78}