This commit is contained in:
2025-11-07 14:06:14 +08:00
parent 9b1cbda4ec
commit 3f52fb17f6

View File

@ -12,7 +12,12 @@
<span>{{ t(`week.4`) }}</span> <span>{{ t(`week.4`) }}</span>
</div> </div>
<div class="weather"> <div class="weather">
<svg-icon name="weather" :size="40" @click="clickFun"></svg-icon> <svg-icon
name="weather"
:class="weatherClick ? 'weatherClick' : ''"
:size="40"
@click="clickFun"
></svg-icon>
</div> </div>
</div> </div>
<setTool ref="setToolRef"></setTool> <setTool ref="setToolRef"></setTool>
@ -53,8 +58,7 @@ const headImg = computed(() => {
} }
}) })
const skinInfo = ref(JSON.parse(localStorage.getItem('systemSetting') || '{}').skinInfo || 'color1')
const skinInfo = ref(JSON.parse(localStorage.getItem("systemSetting") || '{}').skinInfo || 'color1')
const { t } = useI18n() const { t } = useI18n()
const date = ref({ const date = ref({
@ -62,26 +66,25 @@ const date = ref({
hms: '', hms: '',
week: 0 week: 0
}) })
window.addEventListener("setItemEvent", (e: any) => { window.addEventListener('setItemEvent', (e: any) => {
console.log('e', e) console.log('e', e)
if (e.key == "systemSetting") { if (e.key == 'systemSetting') {
let obj = JSON.parse(e.newValue); let obj = JSON.parse(e.newValue)
skinInfo.value = obj.skinInfo; skinInfo.value = obj.skinInfo
let setting = JSON.parse(e.newValue) let setting = JSON.parse(e.newValue)
let dialogElm: any = document.getElementsByClassName('YJ-custom-base-dialog') let dialogElm: any = document.getElementsByClassName('YJ-custom-base-dialog')
if (setting.language === 'zh-EN') { if (setting.language === 'zh-EN') {
for (let i = 0; i < dialogElm.length; i++) { for (let i = 0; i < dialogElm.length; i++) {
dialogElm[i].classList.add('dialog-en'); dialogElm[i].classList.add('dialog-en')
} }
} } else {
else {
for (let i = 0; i < dialogElm.length; i++) { for (let i = 0; i < dialogElm.length; i++) {
dialogElm[i].classList.remove('dialog-en'); dialogElm[i].classList.remove('dialog-en')
} }
} }
} }
}); })
var weatherClick = ref(false) var weatherClick = ref(false)
const setTime = () => { const setTime = () => {
let date1 = new Date() let date1 = new Date()
@ -132,7 +135,7 @@ var clickFun = () => {
z-index: 999; z-index: 999;
pointer-events: none; pointer-events: none;
>* { > * {
pointer-events: all; pointer-events: all;
} }
@ -177,7 +180,7 @@ var clickFun = () => {
align-items: center; align-items: center;
font-family: 'alimamashuheiti'; font-family: 'alimamashuheiti';
&>span:first-child { & > span:first-child {
letter-spacing: 1px; letter-spacing: 1px;
font-size: 2rem; font-size: 2rem;
font-family: 'alimamashuheiti'; font-family: 'alimamashuheiti';
@ -189,11 +192,11 @@ var clickFun = () => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
&>span:first-child { & > span:first-child {
font-size: 0.9rem; font-size: 0.9rem;
} }
&>span:last-child { & > span:last-child {
font-size: 0.8rem; font-size: 0.8rem;
} }
} }
@ -202,9 +205,12 @@ var clickFun = () => {
margin-left: 15px; margin-left: 15px;
svg { svg {
fill: rgba(var(--color-base1), 1) !important; // fill: rgba(var(--color-base1), 1) !important;
cursor: pointer; cursor: pointer;
} }
.weatherClick {
fill: rgba(var(--color-base1), 1) !important;
}
} }
} }