Commit e20a57f9 authored by chenjiahao's avatar chenjiahao

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

parent c9fa53d9
......@@ -10,14 +10,14 @@
<!-- </div>-->
<div style="display: flex; align-items: center" @click="handleGoFont">
<img src="../../../assets/svg/logo.svg" alt="融创软通" />
<span v-show="showTitle" style="margin-left: 10px; font-size: 20px; color: white"
>数据要素平台</span
>
<span v-show="showTitle" style="margin-left: 10px; font-size: 20px; color: white">{{
headerTitle
}}</span>
</div>
</div>
</template>
<script lang="ts" setup>
import { computed, unref } from 'vue';
import { computed, onMounted, ref, unref } from 'vue';
import { useGlobSetting } from '@/hooks/setting';
import { useGo } from '@/hooks/web/usePage';
import { useMenuSetting } from '@/hooks/setting/useMenuSetting';
......@@ -47,6 +47,10 @@
const { title } = useGlobSetting();
const go = useGo();
const segmentValue = ref('数据要素');
const headerTitle = ref('数据要素');
const isDataElement = ref();
const getAppLogoClass = computed(() => [
prefixCls,
props.theme,
......@@ -67,6 +71,19 @@
function handleGoFont() {
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>
<style lang="less" scoped>
@prefix-cls: ~'@{namespace}-app-logo';
......
......@@ -21,7 +21,7 @@
"content": "Vben Admin v5.0.0 预览版本已发布",
"ok-text": "前往体验新版"
},
"model1":"服务平台",
"model1":"基础平台",
"model2":"数据治理",
"model3":"数据服务",
"model4":"数仓开发",
......
......@@ -150,8 +150,8 @@
const rememberMe = ref(false);
const formData = reactive({
account: 'guanliyuan',
password: '123456',
account: '',
password: '',
});
const { validForm } = useFormValid(formRef);
......
......@@ -119,8 +119,8 @@
const rememberMe = ref(false);
const formData = reactive({
account: 'guanliyuan',
password: '123456',
account: '',
password: '',
});
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