基调颜色的抽离

This commit is contained in:
minimaxagent1 2025-07-31 11:34:40 +08:00
parent 295b15958a
commit 29c59b2795
4 changed files with 14 additions and 8 deletions

View File

@ -1,7 +1,9 @@
export const CommonEnum = {
BACKGROUND: "https://api.ccttiot.com/image-1753769939853.png", //背景图片
RIGHT_CHEVRON:"https://api.ccttiot.com/image-1753773619878.png",
BACK_BUTTON:"https://api.ccttiot.com/image-1753868358514.png"
BACKGROUND: "https://api.ccttiot.com/image-1753769939853.png", //磨砂背景图片
RIGHT_CHEVRON:"https://api.ccttiot.com/image-1753773619878.png", //右箭头
BACK_BUTTON:"https://api.ccttiot.com/image-1753868358514.png", //导航栏返回按钮
BASE_COLOR:"#FAF8F3" //基调颜色
};
export default CommonEnum;

View File

@ -43,6 +43,7 @@
import { tilesImageEnum } from '@/enum/institutionalStructure.js';
import { getInstitutionalList } from '@/api/institutionalStructure.js';
import CustomNavbar from "../../components/custom-navbar/custom-navbar.vue";
import CommonEnum from "../../enum/common";
export default {
components: {
@ -50,8 +51,9 @@ export default {
},
data() {
return {
CommonEnum,
bgc: {
backgroundColor: "#F5F0E7",
backgroundColor: CommonEnum.BASE_COLOR,
},
tilesImageEnum,
//
@ -162,7 +164,7 @@ export default {
<style lang="scss">
page {
background: #F5F0E7;
background: v-bind('CommonEnum.BASE_COLOR');
}
.header {
width: 100%;

View File

@ -170,7 +170,7 @@ export default {
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #FAF8F3; /* 浅米色背景 */
background-color: v-bind('CommonEnum.BASE_COLOR'); /* 使用枚举中的基调颜色 */
}
.content {
padding: 20rpx;

View File

@ -14,6 +14,7 @@
<script>
import CustomNavbar from "../../components/custom-navbar/custom-navbar.vue";
import CommonEnum from "../../enum/common";
export default {
components: {
@ -21,8 +22,9 @@ export default {
},
data() {
return {
CommonEnum,
bgc: {
backgroundColor: "#F5F0E7",
backgroundColor: CommonEnum.BASE_COLOR,
},
}
},
@ -36,7 +38,7 @@ export default {
page {
width: 750rpx;
height: 2492rpx;
background: #F5F0E7;
background: v-bind('CommonEnum.BASE_COLOR');
border-radius: 0rpx 0rpx 0rpx 0rpx;
}