Modify:修改VITE_GLOB_APP_TITLE信息
parent
bcfb19b8bb
commit
e392499ed8
2
.env
2
.env
|
@ -2,7 +2,7 @@
|
||||||
VITE_PORT = 3100
|
VITE_PORT = 3100
|
||||||
|
|
||||||
# 网站标题
|
# 网站标题
|
||||||
VITE_GLOB_APP_TITLE = JeecgBoot 企业级低代码平台
|
VITE_GLOB_APP_TITLE = 企业数字化平台
|
||||||
|
|
||||||
# 简称,用于配置文件名字 不要出现空格、数字开头等特殊字符
|
# 简称,用于配置文件名字 不要出现空格、数字开头等特殊字符
|
||||||
VITE_GLOB_APP_SHORT_NAME = JeecgBootAdmin
|
VITE_GLOB_APP_SHORT_NAME = JeecgBootAdmin
|
||||||
|
|
11
src/App.vue
11
src/App.vue
|
@ -7,15 +7,24 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
// import { defineComponent, computed, ref } from 'vue';
|
||||||
import { ConfigProvider } from 'ant-design-vue';
|
import { ConfigProvider } from 'ant-design-vue';
|
||||||
import { AppProvider } from '/@/components/Application';
|
import { AppProvider } from '/@/components/Application';
|
||||||
import { useTitle } from '/@/hooks/web/useTitle';
|
import { useTitle } from '/@/hooks/web/useTitle';
|
||||||
import { useLocale } from '/@/locales/useLocale';
|
import { useLocale } from '/@/locales/useLocale';
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
import { useWatermark } from '/@/hooks/web/useWatermark';
|
||||||
|
|
||||||
// 解决日期时间国际化问题
|
// 解决日期时间国际化问题
|
||||||
import 'dayjs/locale/zh-cn';
|
import 'dayjs/locale/zh-cn';
|
||||||
// support Multi-language
|
// support Multi-language
|
||||||
const { getAntdLocale } = useLocale();
|
const { getAntdLocale } = useLocale();
|
||||||
|
const { setWatermark } = useWatermark();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
// const getUserInfo = computed(() => {
|
||||||
|
// const { realname = '' } = userStore.getUserInfo || {};
|
||||||
|
// return { realname };
|
||||||
|
// });
|
||||||
|
setWatermark(userStore.getUserInfo.realname + '(' + userStore.getUserInfo.workNo + ')');
|
||||||
useTitle();
|
useTitle();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,27 +1,34 @@
|
||||||
<template>
|
<template>
|
||||||
<PageWrapper title="水印示例">
|
<PageWrapper title="水印示例">
|
||||||
<CollapseContainer class="w-full h-32 bg-white rounded-md" title="Global WaterMark">
|
<CollapseContainer class="w-full h-32 bg-white rounded-md" title="Global WaterMark">
|
||||||
<a-button type="primary" class="mr-2" @click="setWatermark('WaterMark Info')"> Create </a-button>
|
<a-button type="primary" class="mr-2" @click="setWatermark(`${getUserInfo.realname}`)"> Create </a-button>
|
||||||
<a-button color="error" class="mr-2" @click="clear"> Clear </a-button>
|
<a-button color="error" class="mr-2" @click="clear"> Clear </a-button>
|
||||||
<a-button color="warning" class="mr-2" @click="setWatermark('WaterMark Info New')"> Reset </a-button>
|
<a-button color="warning" class="mr-2" @click="setWatermark('WaterMark Info New')"> Reset </a-button>
|
||||||
</CollapseContainer>
|
</CollapseContainer>
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, ref } from 'vue';
|
import { defineComponent,computed, ref } from 'vue';
|
||||||
import { CollapseContainer } from '/@/components/Container/index';
|
import { CollapseContainer } from '/@/components/Container/index';
|
||||||
import { useWatermark } from '/@/hooks/web/useWatermark';
|
import { useWatermark } from '/@/hooks/web/useWatermark';
|
||||||
import { PageWrapper } from '/@/components/Page';
|
import { PageWrapper } from '/@/components/Page';
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: { CollapseContainer, PageWrapper },
|
components: { CollapseContainer, PageWrapper },
|
||||||
setup() {
|
setup() {
|
||||||
const areaRef = ref<Nullable<HTMLElement>>(null);
|
const areaRef = ref<Nullable<HTMLElement>>(null);
|
||||||
const { setWatermark, clear } = useWatermark();
|
const { setWatermark, clear } = useWatermark();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const getUserInfo = computed(() => {
|
||||||
|
const { realname = '' } = userStore.getUserInfo || {};
|
||||||
|
return { realname };
|
||||||
|
});
|
||||||
return {
|
return {
|
||||||
setWatermark,
|
setWatermark,
|
||||||
clear,
|
clear,
|
||||||
areaRef,
|
areaRef,
|
||||||
|
getUserInfo
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="app-loading-dots">
|
<div class="app-loading-dots">
|
||||||
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
|
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="app-loading-title">JeecgBoot 企业级低代码平台</div>
|
<div class="app-loading-title">企业数字化平台</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue