Comments (10)
@MusicGo hi,点击待办事项,该天的待办事项标记点是会隐藏的,当点击其他日期的时候会再次自动显示出来。你这里的标记点消失是指所有的待办事项标记点都消失了?
from wx_calendar.
日期从后台获取的情况下,点击待办事项,该天的待办事项标记点隐藏,这个没问题,问题是当点击其他日期的时候会不会再次自动显示了
from wx_calendar.
我这边试了下master
代码,点击其他日期该有事件标记的会再次显示出来
from wx_calendar.
days: [{
year: 2018,
month: 6,
day: 12,
}, {
year: 2018,
month: 6,
day: 15,
}]
days里边的日期数组不要这样写死,从后台获取试下就会出现我说的问题了
from wx_calendar.
afterCalendarRender() {
setTodoLabels({
pos: 'bottom',
dotColor: '#cc5226',
days: res.data.content,
});
}
这样
from wx_calendar.
你的接口是在哪里请求的,接口是异步的,你这样只要res.data.content
数据格式是对的,那跟本地写死有和区别呢,唯一的区别就在于调用setTodoLabels
的时机而已
from wx_calendar.
afterCalendarRender() {
wx.request({
url: 'http://127.0.0.1:8080/student_json',
header: {
'content-type': 'application/json'
},
success: function (res) {
setTodoLabels({
pos: 'bottom',
dotColor: '#DC143C',
days: res.data,
});
}
})
/*这是接口返回的数据结构(res.data)
[{
year: "2018",
month: "6",
day: "15",
}]
*/
},
});
from wx_calendar.
2539172542方便加下
from wx_calendar.
类型要求的是数字,因为你这里传入的是字符串,所以这里出现了问题,是底层处理疏忽了用户传入的类型导致,已修复。
{
year: "2018",
month: "6",
day: "15",
}
from wx_calendar.
嗯,我是在点击待办项时重新渲染,也能解决这个问题,只是性能欠佳,给作者点赞。
from wx_calendar.
Related Issues (20)
- 为什么现在周视图模式不支持jump了
- v2 disableMode不管用 HOT 1
- 使用calendar.chooseDateArea()跨年设置日期范围,再用calendar.getSelectedDates()获取选中的日期,获取到的日期不对 HOT 3
- afterTapDate方法名错误
- 切换月份后再调用周视图和月视图的切换当前月份会更改
- v2版本文档的快速开始,usingComponents的路径是v1的 HOT 1
- v2,单选模式,选中另一个日期时无法自动清空上一个日期的选中状态 HOT 1
- taro里获取实例为null HOT 1
- 日历上面的上个月下个月怎么触发? HOT 1
- chooseAreaMode: true下面获取this.calendar.getSelectedDay(),获取值会重复
- calendar.setSelectedDates渲染后,再去点击会出现中间空的情况
- 这个组件占了127k,源码能不能优化下
- 组件的setDateStyle不生效,源码里面有误
- 月份视图切换周视图BUG
- 希望增加滑动切换月份时的反馈
- 部分机型偶现,日期错乱 HOT 1
- 月视图切换到周视图,如果选择的天为30 或 31,到周视图的默认month是下个月的
- 设置多个不同月的指定选中日期,只有当前展示月份的会生效
- 在小程序安装使用文档不详细
- calendar.setDateStyle 比如在7月设置了选择日期的颜色,然后跳转到八月,再回来7月,选择的样式不存在了
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wx_calendar.