<commit_before><template>
  <div
    ref="wrapper"
    v-bind="$attrs"
    :style="wrapperStyle"
    :class="{[fullscreenClass]: isFullscreen}"
    @click="shadeClick($event)"
    @keyup="exit"
  >
    <slot />
  </div>
</template>
<script>
import sf from 'screenfull'
export default {
  props: {
    fullscreen: {
      type: Boolean,
      default: false
    },
    exitOnClickWrapper: {
      type: Boolean,
      default: true
    },
    fullscreenClass: {
      type: String,
      default: 'fullscreen'
    },
    pageOnly: {
      type: Boolean,
      default: false
    },
    teleport: {
      type: Boolean,
      default: false
    }
  },

  data () {
    return {
      isFullscreen: false,
      isEnabled: false
    }
  },

  computed: {
    isPageOnly () {
      // 如果不支持浏览器全屏，改用网页全屏
      return this.pageOnly || !sf.isEnabled
    },
    wrapperStyle () {
      return (this.pageOnly || this.teleport) && this.isFullscreen
        ? {
          position: 'fixed',
          left: '0',
          top: '0',
          width: '100%',
          height: '100%'
        }
        : undefined
    }
  },

  methods: {
    toggle (value) {<commit_msg>fix(component): fix pageOnly in unsupported browser<commit_after><template>
  <div
    ref="wrapper"
    v-bind="$attrs"
    :style="wrapperStyle"
    :class="{[fullscreenClass]: isFullscreen}"
    @click="shadeClick($event)"
    @keyup="exit"
  >
    <slot />
  </div>
</template>
<script>
import sf from 'screenfull'
export default {
  props: {
    fullscreen: {
      type: Boolean,
      default: false
    },
    exitOnClickWrapper: {
      type: Boolean,
      default: true
    },
    fullscreenClass: {
      type: String,
      default: 'fullscreen'
    },
    pageOnly: {
      type: Boolean,
      default: false
    },
    teleport: {
      type: Boolean,
      default: false
    }
  },

  data () {
    return {
      isFullscreen: false,
      isEnabled: false
    }
  },

  computed: {
    isPageOnly () {
      // 如果不支持浏览器全屏，改用网页全屏
      return this.pageOnly || !sf.isEnabled
    },
    wrapperStyle () {
      return (this.isPageOnly || this.teleport) && this.isFullscreen
        ? {
          position: 'fixed',
          left: '0',
          top: '0',
          width: '100%',
          height: '100%'
        }
        : undefined
    }
  },

  methods: {
    toggle (value) {
{'fraction_non_alphanumeric': 0.13964346349745332, 'fraction_numerical': 0.006791171477079796, 'mean_word_length': 1.8743902439024391, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '1953715', 'n_tokens_mistral': 800, 'n_tokens_neox': 794, 'n_words': 157}