Giter Site home page Giter Site logo

发现一个bug about wx_calendar HOT 10 CLOSED

treadpit avatar treadpit commented on April 28, 2024
发现一个bug

from wx_calendar.

Comments (10)

treadpit avatar treadpit commented on April 28, 2024

@MusicGo hi,点击待办事项,该天的待办事项标记点是会隐藏的,当点击其他日期的时候会再次自动显示出来。你这里的标记点消失是指所有的待办事项标记点都消失了?

from wx_calendar.

MusicGo avatar MusicGo commented on April 28, 2024

日期从后台获取的情况下,点击待办事项,该天的待办事项标记点隐藏,这个没问题,问题是当点击其他日期的时候会不会再次自动显示了

from wx_calendar.

treadpit avatar treadpit commented on April 28, 2024

我这边试了下master代码,点击其他日期该有事件标记的会再次显示出来

s

from wx_calendar.

MusicGo avatar MusicGo commented on April 28, 2024

days: [{
year: 2018,
month: 6,
day: 12,
}, {
year: 2018,
month: 6,
day: 15,
}]
days里边的日期数组不要这样写死,从后台获取试下就会出现我说的问题了

from wx_calendar.

MusicGo avatar MusicGo commented on April 28, 2024

afterCalendarRender() {
setTodoLabels({
pos: 'bottom',
dotColor: '#cc5226',
days: res.data.content,
});
}
这样

from wx_calendar.

treadpit avatar treadpit commented on April 28, 2024

你的接口是在哪里请求的,接口是异步的,你这样只要res.data.content数据格式是对的,那跟本地写死有和区别呢,唯一的区别就在于调用setTodoLabels的时机而已

from wx_calendar.

MusicGo avatar MusicGo commented on April 28, 2024

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.

MusicGo avatar MusicGo commented on April 28, 2024

2539172542方便加下

from wx_calendar.

treadpit avatar treadpit commented on April 28, 2024

类型要求的是数字,因为你这里传入的是字符串,所以这里出现了问题,是底层处理疏忽了用户传入的类型导致,已修复。

{
    year: "2018",
    month: "6",
    day: "15",
}

from wx_calendar.

MusicGo avatar MusicGo commented on April 28, 2024

嗯,我是在点击待办项时重新渲染,也能解决这个问题,只是性能欠佳,给作者点赞。

from wx_calendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.