Giter Site home page Giter Site logo

Comments (6)

huanghaibin-dev avatar huanghaibin-dev commented on April 27, 2024

农历这个是逻辑实现的,每个人都有不同的需求,不同农历不同颜色这种设计不应该又框架来提供,当然你可以自定义UI,然后做个静态配置,对特定的农历标记不同的颜色

from calendarview.

hao-li avatar hao-li commented on April 27, 2024

感谢快速回复,我的考虑是这样的:

目前框架提供的 lunar 实际上由 solar、term、festival、或 numToChinese 等不同类型构成。
不同颜色、不同事件处理等虽然属于具体业务层逻辑,但是识别 lunar 的实际类型应该属于通用的功能。
如果框架可以直接提供的话,应该会使框架更加方便、强大。

PS: 我本意是倾向建议增加类型的,不过看到 Scheme 分别提供了 getSchemeColor/setSchemeColor 的方法,风格统一起见建议增加颜色或类型

from calendarview.

huanghaibin-dev avatar huanghaibin-dev commented on April 27, 2024

@hao-li 你是这个意思啊,对传统节日、24节气、公历定义的节日做个区分对吧,这种应该是属于框架范畴的,的确可以考虑,目前倒是还不太建议增加

from calendarview.

hao-li avatar hao-li commented on April 27, 2024

是这个意思,如果框架做了区分的话,就不用上层业务自行解析了;)

from calendarview.

lbx2015 avatar lbx2015 commented on April 27, 2024

我现在也有这个需求,美工给我标注了不同的农历颜色,24节气是一个颜色。元旦这样的一个颜色,有demo吗?

from calendarview.

huanghaibin-dev avatar huanghaibin-dev commented on April 27, 2024

@lbx2015 Calendar里面有单独的api getSolarTerm(); getGregorianFestival(); 等,自行判断一下不为空,就是对应的二十四节气、公历节日等,然后自定义画笔,用对应的画笔即可。

from calendarview.

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.