<commit_before><template>
  <uni-cover-view
    v-on="$listeners">
    <div
      ref="container"
      class="uni-cover-view"
      v-text="coverContent"/>
  </uni-cover-view>
</template>
<script>
import native from '../../mixins/native'
import cover from '../../mixins/cover'

export default {
  name: 'CoverView',
  mixins: [native, cover],
  props: {},
  data () {
    return {
      coverType: 'text',
      coverContent: ''
    }
  },
  watch: {},
  mounted () {
    this._updateContent()
    this.$watch('$slot', this._updateContent)
  },
  methods: {
    _updateContent (val) {
      const $slots = this.$slots.default || []
      $slots.forEach(node => {
        if (!node.tag) {
          this.coverContent += node.text || ''
        }
      })
    }
  }
}
</script>
<style>
uni-cover-view {
  display: block;<commit_msg>fix: 修复 app-v3 cover-view 组件内容无法更新的问题<commit_after><script>
import native from '../../mixins/native'
import cover from '../../mixins/cover'

export default {
  name: 'CoverView',
  mixins: [native, cover],
  props: {},
  data () {
    return {
      coverType: 'text',
      coverContent: ''
    }
  },
  render (createElement) {
    let coverContent = ''
    const $slots = this.$slots.default || []
    $slots.forEach(node => {
      if (!node.tag) {
        coverContent += node.text || ''
      }
    })
    this.coverContent = coverContent
    return createElement('uni-cover-view', {
      on: {
        on: this.$listeners
      }
    }, [createElement('div', {
      ref: 'container',
      staticClass: 'uni-cover-view'
    }, [coverContent])])
  }
}
</script>
<style>
uni-cover-view {
  display: block;
{'fraction_non_alphanumeric': 0.18015824710894704, 'fraction_numerical': 0.0006086427267194157, 'mean_word_length': 2.361963190184049, 'pattern_counts': {'":': 0, '<': 14, '<?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': '3953968', 'n_tokens_mistral': 558, 'n_tokens_neox': 561, 'n_words': 107}