From 2f2b09869423f7e98c64f79dc96c62d9a1696f24 Mon Sep 17 00:00:00 2001 From: ali <ali9696@163.com> Date: 星期一, 13 一月 2025 18:08:42 +0800 Subject: [PATCH] 修改整体样式偏大问题 --- zhitan-vue/src/components/CardHeader/CardHeader.vue | 36 +++++++++++++++++++++--------------- 1 files changed, 21 insertions(+), 15 deletions(-) diff --git a/zhitan-vue/src/components/CardHeader/CardHeader.vue b/zhitan-vue/src/components/CardHeader/CardHeader.vue index 1456322..503a443 100644 --- a/zhitan-vue/src/components/CardHeader/CardHeader.vue +++ b/zhitan-vue/src/components/CardHeader/CardHeader.vue @@ -2,8 +2,13 @@ <div class="header"> <slot></slot> <div class="btn-list" v-if="props.showBtn"> - <div class="btn-list-item" :class="{ active: timeType == dict.value }" v-for="dict in props.period" - :key="dict.value" @click="handleClick(dict.value)"> + <div + class="btn-list-item" + :class="{ active: timeType == dict.value }" + v-for="dict in props.period" + :key="dict.value" + @click="handleClick(dict.value)" + > {{ dict.label }} </div> </div> @@ -11,17 +16,17 @@ </template> <script setup> -const emit = defineEmits(); -const props = defineProps(["showBtn", "period", "active"]); +const emit = defineEmits() +const props = defineProps(["showBtn", "period", "active"]) const data = reactive({ - timeType: 'DAY', -}); -const { timeType } = toRefs(data); -handleClick(timeType.value); + timeType: "DAY", +}) +const { timeType } = toRefs(data) +handleClick(timeType.value) function handleClick(value) { - timeType.value = value; - emit("handleClick", timeType.value, props.active); + timeType.value = value + emit("handleClick", timeType.value, props.active) } </script> @@ -29,10 +34,10 @@ .themeDark { .header { // width: 88px; - height: 29px; + height: 26px; font-family: OPPOSans, OPPOSans; font-weight: bold; - font-size: 22px; + font-size: 18px; color: #fffefe; line-height: 29px; text-align: left; @@ -76,10 +81,10 @@ .themeLight { .header { // width: 88px; - height: 29px; + height: 26px; font-family: OPPOSans, OPPOSans; font-weight: bold; - font-size: 22px; + font-size: 18px; color: #000; line-height: 29px; text-align: left; @@ -116,6 +121,7 @@ background: #1d6aff; color: #fff; } - } } + } + } } </style> -- Gitblit v1.9.3