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