From a34059e688e947a2ea079a0646872f1a21089940 Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期一, 22 九月 2025 14:47:00 +0800
Subject: [PATCH] 1
---
项目代码/DP/src/views/setting.vue | 71 ++++++++++++++++++-----------------
1 files changed, 36 insertions(+), 35 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/DP/src/views/setting.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/DP/src/views/setting.vue"
index 91ec7e8..6042cdf 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/DP/src/views/setting.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/DP/src/views/setting.vue"
@@ -1,9 +1,7 @@
<template>
<transition name="yh-setting-fade">
<div class="setting" :class="{ settingShow: settingShow }" v-show="settingShow">
- <div class="setting_dislog" @click="settingShow = false">
-
- </div>
+ <div class="setting_dislog" @click="settingShow = false"></div>
<div class="setting_inner">
<div class="setting_header">
璁剧疆
@@ -11,7 +9,7 @@
<div class="setting_body">
<!-- <div class="left_shu"> 瀹炴椂鐩戞祴</div> -->
<div class="left_shu"> 鍏ㄥ眬璁剧疆</div>
- <div class="setting_item">
+ <div class="setting_item">
<span class="setting_label">
鏄惁杩涜鑷姩閫傞厤<span class="setting_label_tip">(榛樿鍒嗚鲸鐜�1920*1080)</span>:
</span>
@@ -20,35 +18,17 @@
<el-radio :label="true">鏄�</el-radio>
<el-radio :label="false">鍚�</el-radio>
</el-radio-group>
-
</div>
</div>
- <!-- <div class="left_shu"> 瀹炴椂鐩戞祴</div>
- <div class="setting_item">
- <span class="setting_label">
- 璁惧鎻愰啋鑷姩杞: <span class="setting_label_tip"></span>
- </span>
- <div class="setting_content">
- <el-radio-group v-model="sbtxradio" @change="(val) => radiochange(val, 'sbtxSwiper')">
- <el-radio :label="true">鏄�</el-radio>
- <el-radio :label="false">鍚�</el-radio>
- </el-radio-group>
-
- </div>
- </div>
- <div class="setting_item">
- <span class="setting_label">
- 瀹炴椂棰勮杞挱:
- </span>
- <div class="setting_content">
- <el-radio-group v-model="ssyjradio" @change="(val) => radiochange(val, 'ssyjSwiper')">
- <el-radio :label="true">鏄�</el-radio>
- <el-radio :label="false">鍚�</el-radio>
- </el-radio-group>
- </div>
- </div> -->
+
<div class="flex justify-center">
- <!-- <el-button type="primary" round size="mini">纭畾</el-button> -->
+ <el-button
+ type="primary"
+ @click="toggleFullScreen"
+ class="fullscreen-btn"
+ >
+ {{ isFullScreen ? '閫�鍑哄叏灞�' : '鍏ㄥ睆鏄剧ず' }}
+ </el-button>
</div>
</div>
</div>
@@ -57,16 +37,16 @@
</template>
<script>
-
export default {
components: {},
data() {
return {
settingShow: false,
- sbtxradio:true,
+ sbtxradio: true,
ssyjradio: true,
- isScaleradio:true,
- echartsAutoTime:3000
+ isScaleradio: true,
+ echartsAutoTime: 3000,
+ isFullScreen: false
};
},
computed: {},
@@ -76,12 +56,28 @@
},
radiochange(val, type) {
this.$store.commit('setting/updateSwiper', { val, type })
- if(type==='isScale'){
+ if(type === 'isScale'){
// this.$router.go(0)
// location.reload()
// window.location.href=window.location.href+"?t="+Date.now()
}
},
+ toggleFullScreen() {
+ if (!document.fullscreenElement) {
+ // 杩涘叆鍏ㄥ睆
+ document.documentElement.requestFullscreen().catch(err => {
+ console.error(`鍏ㄥ睆閿欒: ${err.message}`);
+ });
+ } else {
+ // 閫�鍑哄叏灞�
+ if (document.exitFullscreen) {
+ document.exitFullscreen();
+ }
+ }
+ },
+ handleFullScreenChange() {
+ this.isFullScreen = !!document.fullscreenElement;
+ }
},
created() {
this.$store.commit('setting/initSwipers')
@@ -91,8 +87,10 @@
},
mounted() {
document.body.appendChild(this.$el);
+ document.addEventListener('fullscreenchange', this.handleFullScreenChange);
},
beforeDestroy() {
+ document.removeEventListener('fullscreenchange', this.handleFullScreenChange);
},
destroyed() {
if (this.$el && this.$el.parentNode) {
@@ -103,4 +101,7 @@
</script>
<style lang='scss' scoped>
+.fullscreen-btn {
+ margin-top: 20px;
+}
</style>
\ No newline at end of file
--
Gitblit v1.9.3