Commit c4d88f85 authored by 田翔's avatar 田翔

fix: 标签颜色修复

parent 5638af02
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "5.6.5", "version": "5.6.6",
"description": "5.6.5 代码优化", "description": "5.6.6 标签颜色修复",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -3,7 +3,7 @@ import TagPack from '../../../../../components/TagPack' ...@@ -3,7 +3,7 @@ import TagPack from '../../../../../components/TagPack'
const SelectView = (props) => { const SelectView = (props) => {
const { value, sourceType, options } = props const { value, sourceType, options, color } = props
let tag = value ? value.split(',') : [] let tag = value ? value.split(',') : []
if (sourceType === '手动输入') { if (sourceType === '手动输入') {
...@@ -11,11 +11,11 @@ const SelectView = (props) => { ...@@ -11,11 +11,11 @@ const SelectView = (props) => {
<div> <div>
{ {
tag.map((v, i) => { tag.map((v, i) => {
let color = options.find(s => s.value === v)?.color let itemColor = options.find(s => s.value === v)?.color
return ( return (
<span key={v} style={{ margin: '0 5px' }}> <span key={v} style={{ margin: '0 5px' }}>
{ {
color ? <TagPack color={color} text={v} /> : v color ? <TagPack color={itemColor} text={v} /> : v
} }
</span> </span>
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment