From 66e92a693c834f5a491aeef8f7071f486cbfd463 Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 12 Jul 2023 15:00:24 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=9F=BA=E6=9C=AC=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/xicao-icon.png | Bin 627 -> 917 bytes src/components/boxes/XicaoTemp.vue | 8 +-- src/components/groups/data.vue | 4 +- src/components/layout/SubContainer.vue | 21 +++--- src/main.js | 6 -- src/views/HomeView.vue | 86 ++++++++++++++++++++----- 6 files changed, 90 insertions(+), 35 deletions(-) diff --git a/src/assets/xicao-icon.png b/src/assets/xicao-icon.png index bde22bfff9847b34f3f178f5840dd5cb1922b2b0..64d3c5f8aa4b66de77b6c8fb59f3fa23a24aa90a 100644 GIT binary patch literal 917 zcmV;G18V$$y00001b5ch_0Itp) z=>Px&Pf0{URA@u(n$2%aVHC!H=c>lX%2%ij2|_DE!-C9=CO*Q_#zGJwVngq!zo37C z>WtXvN(dG{c0NLBdRvi55Rs55R%n#kXf)b;q>I+{PSf{obMH*2_s(+Oljof0ea?N~ zC-)v9W%F+N>A8=0Rad+i5226>zPJv@P&2(XB1!HM`uog zq7){Z&KMJ-sB~3Q1?OnpdUh^bT%Jq^ERP$`;{F zU_8>Ueg;;Va#kc^fjyl$c^puW!TI{uBvtTrCL!|v`2(mu|3G-|g> z`Hjbj>9GFlZW3H!P?R<=FWF#h=B%dFpTKx14)T8rDcY7!t|gO(;jfqWT8f>*ar<04 z6F!J5Jc;bkO2=*FA$CJ8wjZ>@Ka1@VLmgX+-C)|tKF4bGaICT7G+b)`G|lWttD%;e rO<`))C4{H8UzHb~C|r4(O|9a8(2*}$Jq;bu00000NkvXXu0mjf?@+eW literal 627 zcmV-(0*w8MP)Px%ElET{R9Hvtm`!UFQ51%sGi`0sWQ-u76rsA%KcEGRZgl0QUGx{Y(S?g-5{~0Je}Uu+8fS>dh?Cuf_~XmiVwdZ=jC~0EZva^;>1ajl z7#!Xgh~G{HUq*~$x6<~xK2HP4yr)TnmHmXM`xZ>ycI{zHkOfb71#>~C84}#7!g?ab z*G}NRml<>5iotz}+Tso7vaa3xCkXI1=i2#B0Ge&{p56fGB7vB(mQCBWu7Z@bhPe8F zf?#X|uiE6iTJDta4PMN+wiEO}lEyrbX>&Ljw5#Hh!SP5t5<4WuRxWL)0{eVPHxWy1 z7PIG%H5Q9GtY%X-85qxdI%}{2j5a&lbJj>a^Q%lpp>Z - + @@ -15,6 +15,7 @@ import GasFlow from "../boxes/GasFlow.vue"; import TopTemp from "../boxes/TopTemp.vue"; import BottomTemp from "../boxes/BottomTemp.vue"; import FanRuntime from "../boxes/FanRuntime.vue"; +import XicaoTemp from '../boxes/XicaoTemp.vue'; // import { mapState } from "vuex"; export default { @@ -26,6 +27,7 @@ export default { GasFlow, TopTemp, BottomTemp, + XicaoTemp }, data() { return {}; diff --git a/src/components/layout/SubContainer.vue b/src/components/layout/SubContainer.vue index ec7800e..f134a46 100644 --- a/src/components/layout/SubContainer.vue +++ b/src/components/layout/SubContainer.vue @@ -37,9 +37,9 @@ export default { gas: "icon-gas", xicao: "icon-xc", inWater: "icon-water-in", - fan: 'icon-fan', - ktop: 'icon-kiln-top', - kbtm: 'icon-kiln-bottom', + fan: "icon-fan", + ktop: "icon-kiln-top", + kbtm: "icon-kiln-bottom", }, }; }, @@ -82,8 +82,8 @@ export default { } .icon-xc { - background: url(../../assets/xicao-icon.png); - background-size: 100% 100%; + background: url(../../assets/xicao-icon.png) top 0 left 0 / 90% 75% no-repeat; + margin-right: 6px; } .icon-fan { @@ -92,17 +92,20 @@ export default { } .icon-kiln-top { - background: url(../../assets/kiln-top-icon.png) top 0 left 0 / 90% 75% no-repeat; + background: url(../../assets/kiln-top-icon.png) top 0 left 0 / 90% 75% + no-repeat; margin-right: 6px; } .icon-kiln-bottom { - background: url(../../assets/kiln-bottom-icon.png) top 0 left 0 / 90% 75% no-repeat; + background: url(../../assets/kiln-bottom-icon.png) top 0 left 0 / 90% 75% + no-repeat; margin-right: 6px; } .icon-water-in { - background: url(../../assets/water-temp.png) top 24% left 0 / 80% 75% no-repeat; + background: url(../../assets/water-temp.png) top 24% left 0 / 80% 75% + no-repeat; } .title { @@ -127,7 +130,7 @@ export default { } .content { - height: 1px; + height: 1px; flex: 1; } diff --git a/src/main.js b/src/main.js index a1a4810..a01e6e7 100644 --- a/src/main.js +++ b/src/main.js @@ -11,12 +11,6 @@ Vue.config.productionTip = false Vue.directive('title', title) -document.body.addEventListener('keydown', e => { - if (e.shiftKey && e.key === 'L') { - console.log('e', e.key) - } -}) - new Vue({ router, store, diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index a0838c3..94c8f21 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1,14 +1,11 @@ @@ -17,11 +14,10 @@ import BigHeader from "../components/layout/Header.vue"; import Main from "../components/layout/Main.vue"; import LeftSide from "./LeftSide.vue"; import RightSide from "./RightSide.vue"; -import Slider from "../utils/slider.vue"; export default { name: "HomeView", - components: { BigHeader, Main, LeftSide, RightSide, Slider }, + components: { BigHeader, Main, LeftSide, RightSide }, props: {}, data() { return { @@ -37,17 +33,47 @@ export default { }; }, }, + mounted() { + const slider = document.createElement('div') + slider.id = 'slider' + slider.classList.add('slider') + const ranger = document.createElement('input') + ranger.type = 'range' + ranger.value = 100 + ranger.addEventListener('input', this.handleSlide) + slider.appendChild(ranger) + document.body.appendChild(slider) + + // this.$watch('value', val => { + // ranger.value = val + // }) + + document.addEventListener("keydown", (e) => { + if (e.shiftKey && e.key === "L") { + document.getElementById("slider").classList.toggle("show"); + } + }); + document.getElementById("slider").addEventListener("mouseleave", () => { + setTimeout(() => { + document.getElementById("slider").classList.remove("show"); + }, 200); + }); + }, + methods: { + handleSlide(e) { + this.value = e.target.value + window.scroll(0, 0) + }, + }, }; -