Commit e20a57f9 authored by chenjiahao's avatar chenjiahao

后台左侧标题跟随模块变化

parent c9fa53d9
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
<!-- </div>--> <!-- </div>-->
<div style="display: flex; align-items: center" @click="handleGoFont"> <div style="display: flex; align-items: center" @click="handleGoFont">
<img src="../../../assets/svg/logo.svg" alt="融创软通" /> <img src="../../../assets/svg/logo.svg" alt="融创软通" />
<span v-show="showTitle" style="margin-left: 10px; font-size: 20px; color: white" <span v-show="showTitle" style="margin-left: 10px; font-size: 20px; color: white">{{
>数据要素平台</span headerTitle
> }}</span>
</div> </div>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { computed, unref } from 'vue'; import { computed, onMounted, ref, unref } from 'vue';
import { useGlobSetting } from '@/hooks/setting'; import { useGlobSetting } from '@/hooks/setting';
import { useGo } from '@/hooks/web/usePage'; import { useGo } from '@/hooks/web/usePage';
import { useMenuSetting } from '@/hooks/setting/useMenuSetting'; import { useMenuSetting } from '@/hooks/setting/useMenuSetting';
...@@ -47,6 +47,10 @@ ...@@ -47,6 +47,10 @@
const { title } = useGlobSetting(); const { title } = useGlobSetting();
const go = useGo(); const go = useGo();
const segmentValue = ref('数据要素');
const headerTitle = ref('数据要素');
const isDataElement = ref();
const getAppLogoClass = computed(() => [ const getAppLogoClass = computed(() => [
prefixCls, prefixCls,
props.theme, props.theme,
...@@ -67,6 +71,19 @@ ...@@ -67,6 +71,19 @@
function handleGoFont() { function handleGoFont() {
window.open('/#/aaaFont/font', '_blank'); window.open('/#/aaaFont/font', '_blank');
} }
onMounted(() => {
if (localStorage.getItem('segmentValue') !== null) {
segmentValue.value = localStorage.getItem('segmentValue');
}
console.log('segmentValue.value', segmentValue.value);
isDataElement.value = segmentValue.value === '数据要素';
if (isDataElement.value) {
headerTitle.value = '数据要素平台';
} else {
headerTitle.value = '数据资产平台';
}
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@prefix-cls: ~'@{namespace}-app-logo'; @prefix-cls: ~'@{namespace}-app-logo';
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
"content": "Vben Admin v5.0.0 预览版本已发布", "content": "Vben Admin v5.0.0 预览版本已发布",
"ok-text": "前往体验新版" "ok-text": "前往体验新版"
}, },
"model1":"服务平台", "model1":"基础平台",
"model2":"数据治理", "model2":"数据治理",
"model3":"数据服务", "model3":"数据服务",
"model4":"数仓开发", "model4":"数仓开发",
......
...@@ -150,8 +150,8 @@ ...@@ -150,8 +150,8 @@
const rememberMe = ref(false); const rememberMe = ref(false);
const formData = reactive({ const formData = reactive({
account: 'guanliyuan', account: '',
password: '123456', password: '',
}); });
const { validForm } = useFormValid(formRef); const { validForm } = useFormValid(formRef);
......
...@@ -119,8 +119,8 @@ ...@@ -119,8 +119,8 @@
const rememberMe = ref(false); const rememberMe = ref(false);
const formData = reactive({ const formData = reactive({
account: 'guanliyuan', account: '',
password: '123456', password: '',
}); });
const { validForm } = useFormValid(formRef); const { validForm } = useFormValid(formRef);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment