From 0cb014b9539b3ef435b3bdd2ed30510da371efc1 Mon Sep 17 00:00:00 2001 From: 1314mxc <1562494673@qq.com> Date: Thu, 22 Oct 2020 20:49:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=EF=BC=8C=E4=BC=98=E5=8C=96=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/calendar/calendar.js | 3 +++ components/calendar/calendar.wxml | 1 + components/calendar/calendar.wxss | 8 ++------ pages/calendar/calendar.js | 2 +- pages/index/index.wxss | 11 ++++++----- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/components/calendar/calendar.js b/components/calendar/calendar.js index 0d18404..08c86b1 100644 --- a/components/calendar/calendar.js +++ b/components/calendar/calendar.js @@ -88,6 +88,9 @@ Component({ if(dateList[weekIndex][j].dateTime==vm.properties.dateTimes[k].day){ dateList[weekIndex][j].event=vm.properties.dateTimes[k].target } + if(dateList[weekIndex][j].value==vm.properties.dateTimes[k].day){ + dateList[weekIndex][j].event=vm.properties.dateTimes[k].target + } if(now_date==vm.properties.dateTimes[k].day){ vm.setData({ now_event:vm.properties.dateTimes[k].target diff --git a/components/calendar/calendar.wxml b/components/calendar/calendar.wxml index a4f1d59..1156525 100644 --- a/components/calendar/calendar.wxml +++ b/components/calendar/calendar.wxml @@ -20,6 +20,7 @@ + {{item.date}} diff --git a/components/calendar/calendar.wxss b/components/calendar/calendar.wxss index a86e9bb..f42d7c9 100644 --- a/components/calendar/calendar.wxss +++ b/components/calendar/calendar.wxss @@ -40,7 +40,6 @@ } .calendar_panel{ width: 100%; - /* height: 600rpx; */ height: calc(100% - 56rpx); } .calendar_panel_two{ @@ -58,14 +57,14 @@ } .weekday_label{ width: calc(100% / 7); - /* float: left; */ - /* text-align: center; */ font-size: 27rpx; padding: 12rpx 0; display: flex; justify-content: center; align-items: center; overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .weekday_label>view{ box-sizing: border-box; @@ -79,9 +78,6 @@ .active_date{ background: rgba(0,0,0,.12); color: rgba(0,0,0,.6); - /* border-radius: 50%; */ - /* padding: 12rpx; - box-sizing: border-box; */ overflow: hidden; position: relative; } diff --git a/pages/calendar/calendar.js b/pages/calendar/calendar.js index 83073a1..c3c409b 100644 --- a/pages/calendar/calendar.js +++ b/pages/calendar/calendar.js @@ -5,7 +5,7 @@ Page({ * 页面的初始数据 */ data: { - dateTimes:[{day:'10-1',target:'国庆节'},{day:'10-2',target:'中秋节'}], + dateTimes:[{day:'10-1',target:'国庆节'},{day:'10-2',target:'中秋节'},{day:'2020-10-24',target:'程序员节'}], selected:false }, diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 0890f05..511e0bb 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -2,17 +2,18 @@ Page{ width: 100%; min-height: 100vh; display: flex; - flex-direction: column; + flex-wrap: wrap; justify-content: space-around; - align-items: center; } view{ - width: 100%; - height: 96rpx; - background-color: rgba(0,0,0,.2); + width: 46%; + min-height: 231rpx; + background-color: rgba(0,0,0,.1); overflow: hidden; display: flex; justify-content: center; align-items: center; + margin-top: 26rpx; + margin-bottom: 24rpx; } \ No newline at end of file -- GitLab