From 603722ec1666a591118abf7dd5a4ed0ad5070248 Mon Sep 17 00:00:00 2001
From: 1314mxc <1562494673@qq.com>
Date: Wed, 14 Oct 2020 15:03:26 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=84=E4=BB=B6=E5=B1=95?=
=?UTF-8?q?=E7=A4=BA=E3=80=81=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9B=E5=85=BC?=
=?UTF-8?q?=E5=AE=B9=E6=80=A7bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 2 +-
components/calendar/calendar.js | 18 +++++++++++++++-
components/calendar/calendar.wxml | 6 ++++--
components/calendar/calendar.wxss | 35 +++++++++++++++++++++++++++++++
pages/calendar/calendar.js | 9 +++++++-
pages/calendar/calendar.wxml | 3 ++-
6 files changed, 67 insertions(+), 6 deletions(-)
diff --git a/app.json b/app.json
index 8a6d484..c7d046e 100644
--- a/app.json
+++ b/app.json
@@ -10,7 +10,7 @@
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
- "navigationBarTitleText": "WeChat",
+ "navigationBarTitleText": "yunUI—微信小程序自定义扩展组件库",
"navigationBarTextStyle":"black"
},
"style": "v2",
diff --git a/components/calendar/calendar.js b/components/calendar/calendar.js
index 2e736ca..0d18404 100644
--- a/components/calendar/calendar.js
+++ b/components/calendar/calendar.js
@@ -7,6 +7,14 @@ Component({
dateTimes:{
type:Array,
value:[]
+ },
+ before_show:{ //是否作为日期组件由按钮触发弹出(为0时是)
+ type:Number,
+ value:1
+ },
+ task_show:{ //只有这个为1时,“和遮罩层有关的事件才会响应”
+ type:Number,
+ value:1
}
},
@@ -42,7 +50,8 @@ Component({
selectedDate,
now_selectedDate:selectedDate,
selectedWeek,
- now_date
+ now_date,
+ closed:true
})
this.getDateList(curYear,curMonth-1,now_date);
this.triggerEvent('timeload',{selectedDate,selectedWeek,event:this.data.now_event})
@@ -131,6 +140,13 @@ Component({
curMonth
});
vm.getDateList(curYear,curMonth-1,this.data.now_date);
+ },
+ closed(){
+ if(this.properties.task_show==1){
+ this.setData({
+ closed:false
+ })
+ }
}
}
})
diff --git a/components/calendar/calendar.wxml b/components/calendar/calendar.wxml
index e28785f..a4f1d59 100644
--- a/components/calendar/calendar.wxml
+++ b/components/calendar/calendar.wxml
@@ -1,4 +1,4 @@
-
+
@@ -25,4 +25,6 @@
{{item.date}}
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/components/calendar/calendar.wxss b/components/calendar/calendar.wxss
index 0825277..b5d9da5 100644
--- a/components/calendar/calendar.wxss
+++ b/components/calendar/calendar.wxss
@@ -1,5 +1,30 @@
@import "./icon/icon.wxss";
+.calendar_date{
+ width: 100%;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ z-index: 100000 !important;
+ background-color: white;
+ padding-bottom: 3rpx;
+}
+.calendar_select_date{
+ animation: transfer 1.3s linear;
+ animation-delay: -.5s;
+}
+@keyframes transfer{
+ 0%{
+ transform: translateY(100%);
+ }
+ 100%{
+ transform: translateY(0);
+ }
+}
+.calendar_unselect_date{
+ transition: all .8s ease;
+ transform: translateY(100%);
+}
.selected_date{
width: 100%;
@@ -90,4 +115,14 @@
.show_box{
padding: 20rpx;
font-size: 26rpx;
+}
+
+.calendar_task{
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 99999 !important;
+ background-color: rgba(0,0,0,.1);
}
\ No newline at end of file
diff --git a/pages/calendar/calendar.js b/pages/calendar/calendar.js
index dd29798..83073a1 100644
--- a/pages/calendar/calendar.js
+++ b/pages/calendar/calendar.js
@@ -5,7 +5,14 @@ Page({
* 页面的初始数据
*/
data: {
- dateTimes:[{day:'10-1',target:'国庆节'},{day:'10-2',target:'中秋节'}]
+ dateTimes:[{day:'10-1',target:'国庆节'},{day:'10-2',target:'中秋节'}],
+ selected:false
+ },
+
+ selected(){
+ this.setData({
+ selected:!this.data.selected
+ })
},
/**
diff --git a/pages/calendar/calendar.wxml b/pages/calendar/calendar.wxml
index 69dd8cd..6999525 100644
--- a/pages/calendar/calendar.wxml
+++ b/pages/calendar/calendar.wxml
@@ -1,3 +1,4 @@
-
+ 选择时间
+
\ No newline at end of file
--
GitLab