feat: 路由新增页面级类名配置

dev-deviceSetting
donghao
parent 7eae6b5a80
commit c06d55f769

@ -54,8 +54,7 @@ const set: setType = reactive({
hideSidebar: !set.sidebar.opened,
openSidebar: set.sidebar.opened,
withoutAnimation: set.sidebar.withoutAnimation,
mobile: set.device === "mobile",
...route.meta?.bodyClass
mobile: set.device === "mobile"
};
}),
@ -149,7 +148,10 @@ const layoutHeader = defineComponent({
</script>
<template>
<div ref="appWrapperRef" :class="['app-wrapper flex', set.classes]">
<div
ref="appWrapperRef"
:class="['app-wrapper flex', set.classes, route?.meta?.bodyClass]"
>
<!-- <div
v-show="
set.device === 'mobile' &&
@ -189,7 +191,7 @@ const layoutHeader = defineComponent({
</div>
</template>
<style lang="scss" scoped>
<style lang="scss">
.app-wrapper {
position: relative;
width: 100%;
@ -221,4 +223,12 @@ const layoutHeader = defineComponent({
.re-screen {
margin-top: 12px;
}
.computePowerAllocation_page {
background: url("@/assets/computePower/bg.png");
background-repeat: no-repeat;
.navbar {
background-color: transparent !important;
}
}
</style>

@ -6,7 +6,7 @@ export default {
title: $t("menus.hsComputePowerAllocation"),
icon: "icon-suanlipeizhi",
// showLink: false,
bodyClass: ["computePowerAllocation_page"],
bodyClass: "computePowerAllocation_page",
rank: 6,
roles: ["admin", "common"]
},

Loading…
Cancel
Save