格式化代码

This commit is contained in:
zjl 2024-10-12 16:44:19 +08:00
parent a49ee2d4b2
commit 8553381768
4 changed files with 17 additions and 17 deletions

View File

@ -27,7 +27,7 @@
const lockTime = computed(() => useLockscreen.lockTime);
const zIndex = ref(3000);
const {getIsWaterMark} = useProjectSetting();
const { getIsWaterMark } = useProjectSetting();
const LoginName = PageEnum.BASE_LOGIN_NAME;
let timer;
@ -51,11 +51,11 @@
};
onMounted(() => {
if(getIsWaterMark.value) {
if (getIsWaterMark.value) {
const waterText = import.meta.env.VITE_GLOB_APP_TITLE;
Watermark.set(waterText)
Watermark.set(waterText);
} else {
Watermark.del()
Watermark.del();
}
});
onUnmounted(() => {

View File

@ -247,7 +247,7 @@
</div>
</div>
<div class="drawer-setting-item">
<div class="drawer-setting-item-title"> 水印 </div>
<div class="drawer-setting-item-title"> 水印</div>
<div class="drawer-setting-item-action">
<el-switch v-model="settingStore.isWaterMark" @change="handleWaterChange" />
</div>
@ -354,12 +354,12 @@
settingStore.menuSetting.mixMenu = false;
}
function handleWaterChange(val){
if(val) {
function handleWaterChange(val) {
if (val) {
const waterText = import.meta.env.VITE_GLOB_APP_TITLE;
Watermark.set(waterText)
Watermark.set(waterText);
} else {
Watermark.del()
Watermark.del();
}
}

View File

@ -59,6 +59,6 @@ const setting = {
//显示项目配置
isProjectSetting: true,
//显示水印
isWaterMark:true
isWaterMark: true,
};
export default setting;

View File

@ -22,7 +22,7 @@ const {
isPageAnimate,
pageAnimateType,
isProjectSetting,
isWaterMark
isWaterMark,
} = projectSetting;
interface ProjectSettingState {
@ -38,7 +38,7 @@ interface ProjectSettingState {
isPageAnimate: boolean; //是否开启路由动画
pageAnimateType: string; //路由动画类型
isProjectSetting: boolean; //显示项目配置
isWaterMark:boolean //显示水印
isWaterMark: boolean; //显示水印
}
export const useProjectSettingStore = defineStore({
@ -56,7 +56,7 @@ export const useProjectSettingStore = defineStore({
isPageAnimate,
pageAnimateType,
isProjectSetting,
isWaterMark
isWaterMark,
}),
getters: {
getNavMode(): string {