From f2cdf39c7540c79b37c2eefb4a3b783cc04bc59b Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Fri, 21 Apr 2023 18:42:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + pnpm-lock.yaml | 6 +++++ src/view/home.vue | 42 +++++++++++++++++++++++++++++---- src/view/park/center.vue | 51 +++++++++++++++++++++++++++++++++++++--- 4 files changed, 93 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 3efb141..bed0c0c 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "axios": "^1.3.5", "echarts": "^5.4.2", "element-plus": "^2.3.2", + "gsap": "^3.11.5", "swiper": "^9.2.0", "three": "^0.151.3", "vite-plugin-require-transform": "^1.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 85f630b..b215e3c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,7 @@ specifiers: black-knight: 1.3.29 echarts: ^5.4.2 element-plus: ^2.3.2 + gsap: ^3.11.5 less: ^4.1.3 less-loader: ~7.3.0 sass-resources-loader: ^2.2.5 @@ -26,6 +27,7 @@ dependencies: axios: 1.3.5 echarts: 5.4.2 element-plus: 2.3.2_vue@3.2.47 + gsap: 3.11.5 swiper: 9.2.0 three: 0.151.3 vite-plugin-require-transform: 1.0.4 @@ -1104,6 +1106,10 @@ packages: dev: true optional: true + /gsap/3.11.5: + resolution: {integrity: sha512-Q89nKCLgoX5xUjznh9LcaIUkz54k1voNucT1Rpf9SJNFIQznBwFqt5qUUQbeVInFyN/n18OUJkpeI6CNEDt74w==} + dev: false + /has-flag/3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} diff --git a/src/view/home.vue b/src/view/home.vue index 7964ba7..2bd1cad 100644 --- a/src/view/home.vue +++ b/src/view/home.vue @@ -97,11 +97,17 @@ font-size:18px; } .fullScreen{ + pointer-events: all; + cursor: pointer; position:absolute; right:20px; - top:24px; + top:20px; color:#1587FC; font-size:30px; + transition: all 0.3s; + &:hover{ + opacity: 0.7; + } } } &>.el-select{ @@ -146,7 +152,9 @@ height: calc(100% - 99px); display:flex; justify-content: space-between; - background:linear-gradient(to right,rgba(var(--bg), 1) 90px,transparent 36%,transparent 64%,rgba(var(--bg), 1) 1810px); + &.bgShadow{ + background:linear-gradient(to right,rgba(var(--bg), 1) 90px,transparent 36%,transparent 64%,rgba(var(--bg), 1) 1810px); + } } } @@ -171,7 +179,7 @@ {{$route.meta.title}} {{time}}11 - + -
+
@@ -272,6 +280,32 @@ import mapPopover from './mapPopover.vue' time.value=new Date().format('yyyy-MM-dd hh:mm') },1000*60) } + function fullscreen({target}) { + if (document.fullscreenElement === null) { + if (document.mozFullScreenEnabled) { + return Promise.reject(new Error("全屏模式被禁用")); + } + if (target.requestFullscreen) { + target.requestFullscreen(); + } else if (target.mozRequestFullScreen) { + target.mozRequestFullScreen(); + } else if (target.msRequestFullscreen) { + target.msRequestFullscreen(); + } else if (target.webkitRequestFullscreen) { + target.webkitRequestFullScreen(); + } + } else { + if (document.exitFullscreen) { + document.exitFullscreen(); + } else if (document.msExitFullscreen) { + document.msExitFullscreen(); + } else if (document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } else if (document.webkitExitFullscreen) { + document.webkitExitFullscreen(); + } + } + } onMounted(()=>{ refreshTime() diff --git a/src/view/park/center.vue b/src/view/park/center.vue index 9ca2c6b..5a33e29 100644 --- a/src/view/park/center.vue +++ b/src/view/park/center.vue @@ -53,7 +53,7 @@ } } } - &>canvas{ + &>canvas,&>.modelPopover{ position:fixed; pointer-events: all; z-index: -10; @@ -62,6 +62,9 @@ width:100%; height:100%; } + &>.modelPopover{ + pointer-events: none; + } svg{ opacity: 0; } @@ -85,7 +88,9 @@
+
asdaf
+
@@ -93,21 +98,33 @@