tag color

This commit is contained in:
caishi 2020-12-14 14:12:41 +08:00
parent e95ef11058
commit 5f36f9306a
2 changed files with 2 additions and 2 deletions

View File

@ -212,7 +212,7 @@ class order extends Component {
<Menu.Item
key={item.id}
onClick={(e) => this.getOption(e, id, item.name, toGet)}
style={{textAlign:item.color ? "left" :"center"}}
style={{textAlign:item.color ? "left" :"center",padding:"6px 15px"}}
>
{/* 标签前面的颜色tag */}
{item.color && <span className="tagColor" style={{backgroundColor:`${item.color}`}}></span>}

View File

@ -118,7 +118,7 @@ class order_form extends Component {
return list.map((item, key) => {
return (
<Option key={key + 1} value={String(item.id)}>
{item.name}
{item.color && <span className="tagColor" style={{backgroundColor:`${item.color}`}}></span>}{item.name}
</Option>
);
});