Replies: 2 comments 2 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
|
然后类似的错误很多。我依赖的antd版本是5.20.5。请问是什么原因呢? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
(下面统一称呼 antd-v5和formil-antd-v5为 antd-v5 .)
必要依赖:
less变量
完成上面步骤后,designable中formily生产的组件都会变成antd-v5,也就是会通过token改变,但是其余样式,比如画布仍然使用的less变量实现主体,当然可以去通过修改源码为token,但我认为成本较大,于是我们可以选择修改less变量去实现统一主题。
明暗模式
改变明暗模式也应该通过less,我们可以选择移除类名是"dn-app"的"dn-light",这样其余组件就会继承"dn-dark"中的less变量,此时就是暗黑模式
------------------------------------------------i am devision--------------------------------------------------------
(I will call both antd-v5 and formily-antd-v5 antd-v5 in following context .)
Dependencies:
process less variables
If you do the above way , formily component will use antd-v5 as version, so if you want to change their theme you need to use token . But other styles using less to control theme , giving you the example , the main canvas "CompositePanel" . so we should change it to be better using less variables rather than changing origin codes .
light and dark
we can get an DOM that have classname calling "dn-app" , it also have others classnames , "dn-light" and "dn-dark" . When we want to change the theme to dark mode , we only remove the "dn-light" , it's just ok .
Beta Was this translation helpful? Give feedback.
All reactions