afc163
6 years ago
No known key found for this signature in database
GPG Key ID: 738F973FCE5C6B48
2 changed files with
17 additions and
11 deletions
-
components/table/__tests__/__snapshots__/demo.test.js.snap
-
components/table/demo/basic.md
|
|
@ -259,14 +259,14 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` |
|
|
|
> |
|
|
|
<span> |
|
|
|
<div |
|
|
|
class="ant-tag ant-tag-blue" |
|
|
|
class="ant-tag ant-tag-green" |
|
|
|
> |
|
|
|
nice |
|
|
|
NICE |
|
|
|
</div> |
|
|
|
<div |
|
|
|
class="ant-tag ant-tag-blue" |
|
|
|
class="ant-tag ant-tag-geekblue" |
|
|
|
> |
|
|
|
developer |
|
|
|
DEVELOPER |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</td> |
|
|
@ -322,9 +322,9 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` |
|
|
|
> |
|
|
|
<span> |
|
|
|
<div |
|
|
|
class="ant-tag ant-tag-blue" |
|
|
|
class="ant-tag ant-tag-volcano" |
|
|
|
> |
|
|
|
loser |
|
|
|
LOSER |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</td> |
|
|
@ -380,14 +380,14 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` |
|
|
|
> |
|
|
|
<span> |
|
|
|
<div |
|
|
|
class="ant-tag ant-tag-blue" |
|
|
|
class="ant-tag ant-tag-green" |
|
|
|
> |
|
|
|
cool |
|
|
|
COOL |
|
|
|
</div> |
|
|
|
<div |
|
|
|
class="ant-tag ant-tag-blue" |
|
|
|
class="ant-tag ant-tag-geekblue" |
|
|
|
> |
|
|
|
teacher |
|
|
|
TEACHER |
|
|
|
</div> |
|
|
|
</span> |
|
|
|
</td> |
|
|
|
|
|
@ -35,7 +35,13 @@ const columns = [{ |
|
|
|
dataIndex: 'tags', |
|
|
|
render: tags => ( |
|
|
|
<span> |
|
|
|
{tags.map(tag => <Tag color="blue" key={tag}>{tag}</Tag>)} |
|
|
|
{tags.map(tag => { |
|
|
|
let color = tag.length > 5 ? 'geekblue' : 'green'; |
|
|
|
if (tag === 'loser') { |
|
|
|
color = 'volcano'; |
|
|
|
} |
|
|
|
return <Tag color={color} key={tag}>{tag.toUpperCase()}</Tag>; |
|
|
|
})} |
|
|
|
</span> |
|
|
|
), |
|
|
|
}, { |
|
|
|