From c91d33e4ab58bdee9d4328adc2248495cc656c25 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期三, 18 八月 2021 19:15:03 +0800 Subject: [PATCH] update 优化 OSS 模块与上传组件 异常处理 --- ruoyi-ui/src/components/Screenfull/index.vue | 117 ++++++++++++++++++++++++++++------------------------------ 1 files changed, 57 insertions(+), 60 deletions(-) diff --git a/ruoyi-ui/src/components/Screenfull/index.vue b/ruoyi-ui/src/components/Screenfull/index.vue index 099d74d..d4e539c 100644 --- a/ruoyi-ui/src/components/Screenfull/index.vue +++ b/ruoyi-ui/src/components/Screenfull/index.vue @@ -1,60 +1,57 @@ -<template> - <div> - <svg-icon :icon-class="isFullscreen?'exit-fullscreen':'fullscreen'" @click="click" /> - </div> -</template> - -<script> -import screenfull from 'screenfull' - -export default { - name: 'Screenfull', - data() { - return { - isFullscreen: false - } - }, - mounted() { - this.init() - }, - beforeDestroy() { - this.destroy() - }, - methods: { - click() { - if (!screenfull.enabled) { - this.$message({ - message: 'you browser can not work', - type: 'warning' - }) - return false - } - screenfull.toggle() - }, - change() { - this.isFullscreen = screenfull.isFullscreen - }, - init() { - if (screenfull.enabled) { - screenfull.on('change', this.change) - } - }, - destroy() { - if (screenfull.enabled) { - screenfull.off('change', this.change) - } - } - } -} -</script> - -<style scoped> -.screenfull-svg { - display: inline-block; - cursor: pointer; - fill: #5a5e66;; - width: 20px; - height: 20px; - vertical-align: 10px; -} -</style> +<template> + <div> + <svg-icon :icon-class="isFullscreen?'exit-fullscreen':'fullscreen'" @click="click" /> + </div> +</template> + +<script> +import screenfull from 'screenfull' + +export default { + name: 'Screenfull', + data() { + return { + isFullscreen: false + } + }, + mounted() { + this.init() + }, + beforeDestroy() { + this.destroy() + }, + methods: { + click() { + if (!screenfull.isEnabled) { + this.$message({ message: '浣犵殑娴忚鍣ㄤ笉鏀寔鍏ㄥ睆', type: 'warning' }) + return false + } + screenfull.toggle() + }, + change() { + this.isFullscreen = screenfull.isFullscreen + }, + init() { + if (screenfull.isEnabled) { + screenfull.on('change', this.change) + } + }, + destroy() { + if (screenfull.isEnabled) { + screenfull.off('change', this.change) + } + } + } +} +</script> + +<style scoped> +.screenfull-svg { + display: inline-block; + cursor: pointer; + fill: #5a5e66;; + width: 20px; + height: 20px; + vertical-align: 10px; +} +</style> -- Gitblit v1.9.3