Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
恪愚
yunUI
提交
0cb014b9
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 搜索 >>
提交
0cb014b9
编写于
10月 22, 2020
作者:
恪愚
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化自定义事件,优化首页布局
上级
3393c394
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
12 deletion
+13
-12
components/calendar/calendar.js
components/calendar/calendar.js
+3
-0
components/calendar/calendar.wxml
components/calendar/calendar.wxml
+1
-0
components/calendar/calendar.wxss
components/calendar/calendar.wxss
+2
-6
pages/calendar/calendar.js
pages/calendar/calendar.js
+1
-1
pages/index/index.wxss
pages/index/index.wxss
+6
-5
未找到文件。
components/calendar/calendar.js
浏览文件 @
0cb014b9
...
...
@@ -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
...
...
components/calendar/calendar.wxml
浏览文件 @
0cb014b9
...
...
@@ -20,6 +20,7 @@
</view>
<view class="calendar_box" wx:for="{{dateList}}" wx:for-item="week"
style="{{index==0?'justify-content:flex-end':''}}">
<!-- 此处view的data-不是为了向js传值,而只是自定义属性向css伪元素传attr() -->
<view class="weekday_label {{(item.value==selectedDate)?'active_date':''}} {{(item.value==now_selectedDate)?'active_dates':''}} {{(item.event)?'actived_date':''}}" wx:for="{{week}}" data-event="{{item.event}}">
<view class="" bindtap="selectDate" data-date="{{item}}">
{{item.date}}</view>
...
...
components/calendar/calendar.wxss
浏览文件 @
0cb014b9
...
...
@@ -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;
}
...
...
pages/calendar/calendar.js
浏览文件 @
0cb014b9
...
...
@@ -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
},
...
...
pages/index/index.wxss
浏览文件 @
0cb014b9
...
...
@@ -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: 96
rpx;
background-color: rgba(0,0,0,.
2
);
width:
46
%;
min-height: 231
rpx;
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
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录