Antd多选选定的商品颜色或自定义样式 [英] Antd multiselect selected Item color or custom style

查看:92
本文介绍了Antd多选选定的商品颜色或自定义样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是antd Antd多项选择

I am using this multi select of antd Antd multiselect

它运行得非常好,我想使它像多选设计

It is working perfectly fine bt i want to make it like that Multiselect Design

每个选中的项目都有特定的颜色.antd multiselect是否可以做到这一点?antd提供了一些诸如labelInValue之类的道具,但我很困惑如何使用它们却没有提供足够的细节.

Each selected item have specific color.Is this possible with antd multiselect?Antd provides some props like labelInValue but i am confused how to use they have not provided enough detail.

推荐答案

您可以使用css或更少的变量

You can modify the color of the selected items by using css or less variables link to antd instructions for less variables.

要使用CSS,请打开node_modules文件夹,找到antd,打开es文件夹,打开您正在使用的antd组件,打开样式文件夹,然后打开index.js文件.在这里,您可以找到可以修改的css元素.创建一个css文件,更改css元素上的颜色属性,然后将css文件连接到您的javascript/html multiselect.

To use css, open the node_modules folder, find antd, open the es folder, open the antd component you're using, open the style folder, and then open the index.js file. There you can find the css elements you can modify. Create a css file, change the color attributes on the css elements, and then connect the css file to your javascript/html multiselect.

这篇关于Antd多选选定的商品颜色或自定义样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆