Giter Site home page Giter Site logo

怎么动态添加日期标记圆圈啊,我这边是拿后台返回的数据去循环日期有相等的日期就标记圆圈 about vue-hash-calendar HOT 11 OPEN

wo139472 avatar wo139472 commented on May 30, 2024
怎么动态添加日期标记圆圈啊,我这边是拿后台返回的数据去循环日期有相等的日期就标记圆圈

from vue-hash-calendar.

Comments (11)

TangSY avatar TangSY commented on May 30, 2024

取出需要被标记的日期,给 markDate 赋值就可以了

from vue-hash-calendar.

wo139472 avatar wo139472 commented on May 30, 2024

那我应该放在哪里操作呢,我放在计算属性和filters里好像都不行,用的那个dayslot插槽

from vue-hash-calendar.

wo139472 avatar wo139472 commented on May 30, 2024

image

from vue-hash-calendar.

wo139472 avatar wo139472 commented on May 30, 2024

image

from vue-hash-calendar.

TangSY avatar TangSY commented on May 30, 2024

你在获取到日期之后,筛选出需要被标记的日期给 markDate 赋值即可,不需要使用 slot。
或者使用 watch 监听接口返回的数据,然后赋值也行

from vue-hash-calendar.

wo139472 avatar wo139472 commented on May 30, 2024

但是你日历这边的日期我不知道哦,我是要拿你组件这边返回的日期范围去循环我接口返回的日期范围去判断有没有相等的时间才标记圆圈

from vue-hash-calendar.

TangSY avatar TangSY commented on May 30, 2024

你按我说的做就好了,不需要你自己匹配日期,要是设计这样的 API 用着不累吗?你直接传需要标记的日期就好了

from vue-hash-calendar.

TangSY avatar TangSY commented on May 30, 2024

我文档也没说让你自己匹配呀

from vue-hash-calendar.

wo139472 avatar wo139472 commented on May 30, 2024

现在理解了,我反应太慢了,多谢

from vue-hash-calendar.

wo139472 avatar wo139472 commented on May 30, 2024

还有一个问题,这个切换日历展示类型时第一次点击时方法里面的内容不触发,我打印console.log第一次的时候不会触发
image

from vue-hash-calendar.

GT11070123 avatar GT11070123 commented on May 30, 2024

想请教一下:如何拿到日历当前展示的起至日期呢?

from vue-hash-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.