fix: BUG修改

This commit is contained in:
kun 2023-06-26 16:43:46 +08:00
parent 15a7322ecf
commit abfd90c537
2 changed files with 11 additions and 2 deletions

View File

@ -1,8 +1,8 @@
<template>
<div class="theme-transform">
<img src="@/assets/images/hzImg/themeIcon.png" alt="" />
<img src="@/assets/images/hzImg/blueTheme.png" alt="" @click="changePrimary('#5289D9')" />
<img src="@/assets/images/hzImg/greenTheme.png" alt="" @click="changePrimary('#02A47D')" />
<img src="@/assets/images/hzImg/blueTheme.png" alt="" @click="changePrimaryVal('#5289D9')" />
<img src="@/assets/images/hzImg/greenTheme.png" alt="" @click="changePrimaryVal('#02A47D')" />
</div>
</template>
@ -10,6 +10,12 @@
import { ref, reactive, nextTick, computed } from "vue";
import { useTheme } from "@/hooks/useTheme";
const { changePrimary } = useTheme();
const changePrimaryVal = (val: string) => {
const body = document.body as HTMLElement;
// body.setAttribute("style", "filter: hue-rotate(90deg);");
// body.setAttribute("style", "filter: invert(80%)");
changePrimary(val);
};
</script>
<style scoped lang="scss">
.theme-transform {

View File

@ -94,6 +94,9 @@ onMounted(async () => {
data.value = res1.result || {};
const res = await getModuleList();
labelName.value = res.result;
// setTimeout(() => {
// window.scrollTo(0, 150);
// }, 100);
});
</script>