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>
</div>
<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>
<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 date = ref({
@ -62,26 +66,25 @@ const date = ref({
hms: '',
week: 0
})
window.addEventListener("setItemEvent", (e: any) => {
window.addEventListener('setItemEvent', (e: any) => {
console.log('e', e)
if (e.key == "systemSetting") {
let obj = JSON.parse(e.newValue);
skinInfo.value = obj.skinInfo;
if (e.key == 'systemSetting') {
let obj = JSON.parse(e.newValue)
skinInfo.value = obj.skinInfo
let setting = JSON.parse(e.newValue)
let dialogElm: any = document.getElementsByClassName('YJ-custom-base-dialog')
if (setting.language === 'zh-EN') {
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++) {
dialogElm[i].classList.remove('dialog-en');
dialogElm[i].classList.remove('dialog-en')
}
}
}
});
})
var weatherClick = ref(false)
const setTime = () => {
let date1 = new Date()
@ -202,9 +205,12 @@ var clickFun = () => {
margin-left: 15px;
svg {
fill: rgba(var(--color-base1), 1) !important;
// fill: rgba(var(--color-base1), 1) !important;
cursor: pointer;
}
.weatherClick {
fill: rgba(var(--color-base1), 1) !important;
}
}
}