style: 样式调整

This commit is contained in:
yangzhe 2025-04-08 16:18:08 +08:00
parent 53ff6d55b2
commit 8425d0d7a2
1 changed files with 23 additions and 7 deletions

View File

@ -1,7 +1,9 @@
<template>
<view>
<view class="box">
<view class="title">{{ currentYear }}&nbsp;&nbsp;{{ currentMonth }}</view>
<view class="title"
>{{ currentYear }}&nbsp;&nbsp;{{ currentMonth }}</view
>
<scroll-view scroll-x="true">
<block v-for="(item, index) in dayList" :key="index">
<view
@ -35,8 +37,8 @@ import common from "@/utils/common.js";
export default {
data() {
return {
currentYear: new Date().getFullYear(), //
currentMonth: new Date().getMonth() + 1, // 0-11+1
currentYear: new Date().getFullYear(), //
currentMonth: new Date().getMonth() + 1, // 0-11+1
isShow: false,
current: 0,
dayList: [],
@ -45,9 +47,9 @@ export default {
},
created() {
this.dayList = common.weekDate().dayList;
const firstDay = this.dayList[0];
this.currentYear = firstDay.year;
this.currentMonth = firstDay.month; // dayList
const firstDay = this.dayList[0];
this.currentYear = firstDay.year;
this.currentMonth = firstDay.month; // dayList
},
methods: {
//
@ -91,6 +93,7 @@ scroll-view {
background: #ffffff;
border-radius: 25rpx;
border: 1rpx solid #4689fe;
position: relative;
.day {
font-weight: normal;
@ -109,9 +112,22 @@ scroll-view {
color: #ffffff;
background: #4473fe;
border-radius: 25rpx;
border: 1rpx solid #4473fe;
// border: 1rpx solid #4473fe;
border: none;
.day {
color: #ffffff;
}
&::after {
content: "";
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 20rpx;
height: 10rpx;
background: orange;
border-radius: 20rpx 20rpx 0 0;
}
}
</style>