Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
恪愚
yunUI
提交
603722ec
Y
yunUI
项目概览
恪愚
/
yunUI
2022-11-02 05:11:01同步失败
通知
22
Star
9
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yunUI
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
603722ec
编写于
10月 14, 2020
作者:
恪愚
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化组件展示、修复一些兼容性bug
上级
3dde83a9
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
67 addition
and
6 deletion
+67
-6
app.json
app.json
+1
-1
components/calendar/calendar.js
components/calendar/calendar.js
+17
-1
components/calendar/calendar.wxml
components/calendar/calendar.wxml
+4
-2
components/calendar/calendar.wxss
components/calendar/calendar.wxss
+35
-0
pages/calendar/calendar.js
pages/calendar/calendar.js
+8
-1
pages/calendar/calendar.wxml
pages/calendar/calendar.wxml
+2
-1
未找到文件。
app.json
浏览文件 @
603722ec
...
...
@@ -10,7 +10,7 @@
"window"
:{
"backgroundTextStyle"
:
"light"
,
"navigationBarBackgroundColor"
:
"#fff"
,
"navigationBarTitleText"
:
"
WeChat
"
,
"navigationBarTitleText"
:
"
yunUI—微信小程序自定义扩展组件库
"
,
"navigationBarTextStyle"
:
"black"
},
"style"
:
"v2"
,
...
...
components/calendar/calendar.js
浏览文件 @
603722ec
...
...
@@ -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
})
}
}
}
})
components/calendar/calendar.wxml
浏览文件 @
603722ec
<view class="calendar_date {{(before_show==0)?'calendar_select_date':''}} {{(closed)?'':'calendar_unselect_date'}}">
<view class="selected_date">
<view bindtap="preMonth">
<i class="iconfont icon-fanhui-copy"></i>
...
...
@@ -25,4 +25,6 @@
{{item.date}}</view>
</view>
</view>
</view>
\ No newline at end of file
</view>
</view>
<view class="calendar_task" wx:if="{{task_show && closed}}" bindtap="closed"></view>
\ No newline at end of file
components/calendar/calendar.wxss
浏览文件 @
603722ec
@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
pages/calendar/calendar.js
浏览文件 @
603722ec
...
...
@@ -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
})
},
/**
...
...
pages/calendar/calendar.wxml
浏览文件 @
603722ec
<view>
<y-calendar dateTimes="{{dateTimes}}" bind:timeload="timeload" bind:timechanged="timechanged"></y-calendar>
<view class="select" bindtap="selected">选择时间</view>
<y-calendar wx:if="{{selected}}" before_show="0" task_show="1" dateTimes="{{dateTimes}}" bind:timeload="timeload" bind:timechanged="timechanged"></y-calendar>
</view>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录