From 305041a79d7f9806319038411c4bf11f75782199 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 29 Jan 2019 18:26:21 +0800 Subject: [PATCH] :lipstick: update table demo --- .../__tests__/__snapshots__/demo.test.js.snap | 20 +++++++++---------- components/table/demo/basic.md | 8 +++++++- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/components/table/__tests__/__snapshots__/demo.test.js.snap b/components/table/__tests__/__snapshots__/demo.test.js.snap index 53e219c789..0d3ee743e0 100755 --- a/components/table/__tests__/__snapshots__/demo.test.js.snap +++ b/components/table/__tests__/__snapshots__/demo.test.js.snap @@ -259,14 +259,14 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` >
- nice + NICE
- developer + DEVELOPER
@@ -322,9 +322,9 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` >
- loser + LOSER
@@ -380,14 +380,14 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` >
- cool + COOL
- teacher + TEACHER
diff --git a/components/table/demo/basic.md b/components/table/demo/basic.md index 6794ecd2ea..1e46a1595b 100644 --- a/components/table/demo/basic.md +++ b/components/table/demo/basic.md @@ -35,7 +35,13 @@ const columns = [{ dataIndex: 'tags', render: tags => ( - {tags.map(tag => {tag})} + {tags.map(tag => { + let color = tag.length > 5 ? 'geekblue' : 'green'; + if (tag === 'loser') { + color = 'volcano'; + } + return {tag.toUpperCase()}; + })} ), }, {