luffyzh / dynamic-antd-theme Goto Github PK
View Code? Open in Web Editor NEW🌈 A simple plugin to dynamic change ant-design theme whether less or css.
Home Page: https://dynamic-antd-theme.luffyzh.now.sh/
License: MIT License
🌈 A simple plugin to dynamic change ant-design theme whether less or css.
Home Page: https://dynamic-antd-theme.luffyzh.now.sh/
License: MIT License
根据源码:
dynamic-antd-theme/src/dynamic-antd-theme.js
Lines 35 to 46 in ba762e9
而用户第一次打开站点的时候,localeStorage里是没有颜色的键值的,所以不会调用到changeThemeColor修改主题颜色。
修改建议:
在storageColor为空时使用primaryColor为参数调用changeThemeColor函数。
Hi,
Appreciate your great effort for this wonderful package. Could you add the demo code in a folder called "example" , its better to have all the example codes in a seperate example folder. It will be easy to follow the example by the developers also .
Thanks.
怎么配合less修改其他页面的背景色或者图标色,变量怎么插入到less中啊
Is there a way to change font-family and other variables?
Are you planning to support this in the future?
Does this can change the fontSize of the whole website through the specific variable?
首先,感谢亲提供了这么方便的组件 (づ ̄3 ̄)づ╭❤~
不过,现在的组件只能通过自带的colorPicker选择了颜色后改变theme
我现在有这样一个需求,有以下2个按钮
<Button onClick={()=>this.setState(color: 'red')}>点击变红色</Button>
<Button onClick={()=>this.setState(color: 'green')}>点击变绿色</Button>
能否给该组件填加个props,可以通过手动传入的颜色来改变theme,比如
<DynamicAntdTheme customColor={this.state.color} />
这样,不单单只能通过colorPicker修改颜色了,也能通过手动传颜色值改变颜色 😇
如题,插件不支持IE11。点击不会改变主题样式
shadow color, active color, hover color
Would it be a good idea to add other variables to the configuration? As far as I can tell you can only change the main color, but it would be worth adding options for warning and success colors, border-radius, active-color etc. I see there's a similar thread on this but sadly I don't speak mandarin :(
刷新时会有一个从默认色到设置的主题色的过程,有办法处理么
我本地用npm link了项目和这个插件,
我修改了theme.css,然后run pre build 然后build。发现代码是变了,但是我新写的代码在style里并没有出现,想问一下如何本地调试你的代码
包括选择框、已选行、分页等颜色均未能改变
另外树控件的颜色可能也没有生效,至少已选项目的背景色是没变化的,其他我没试过
declare module
如题
我这边的组件库是基于antd 3.0 版本的组件二次封装的,引用该组件换肤大部分颜色可以置换,二次封装过的组件修改过颜色 无法换色,求给点思路和解决方案
作者大才!试用了发现换肤效果很棒!
but ,如题,取色器的快捷颜色能和Ant Design的12个主色一致就好了。
12个主色参考地址
changeAntdTheme的定义没有更新
目前发现的两个组件:
Tabs:active的TabPane页头
Select: 边框颜色、被选中的Option的背景色
比如react、tinycolor2这些代码里有导入的包。目前都是放在devDependencies里,那么我们使用dynamic-antd-theme的时候包管理器并不会去下载那些包,导致找不到文件或定义。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.