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()
@ -132,7 +135,7 @@ var clickFun = () => {
z-index: 999;
pointer-events: none;
>* {
> * {
pointer-events: all;
}
@ -177,7 +180,7 @@ var clickFun = () => {
align-items: center;
font-family: 'alimamashuheiti';
&>span:first-child {
& > span:first-child {
letter-spacing: 1px;
font-size: 2rem;
font-family: 'alimamashuheiti';
@ -189,11 +192,11 @@ var clickFun = () => {
display: flex;
flex-direction: column;
&>span:first-child {
& > span:first-child {
font-size: 0.9rem;
}
&>span:last-child {
& > span:last-child {
font-size: 0.8rem;
}
}
@ -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;
}
}
}