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

dev-deviceSetting
donghao 1 year ago
parent 7eae6b5a80
commit c06d55f769

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

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

Loading…
Cancel
Save