From 7796894e0121699155f3c874c80fbd25fa762a0d Mon Sep 17 00:00:00 2001 From: tanjinzhou <415800467@qq.com> Date: Fri, 14 Aug 2020 14:00:25 +0800 Subject: [PATCH] fix: comment actions not work --- .../__tests__/__snapshots__/demo.test.js.snap | 24 ++++++++++---- components/comment/index.jsx | 9 +++--- .../__tests__/__snapshots__/demo.test.js.snap | 32 +++++++++++++++---- examples/App.vue | 2 +- 4 files changed, 50 insertions(+), 17 deletions(-) diff --git a/components/comment/__tests__/__snapshots__/demo.test.js.snap b/components/comment/__tests__/__snapshots__/demo.test.js.snap index 85ef97aa1..26176681c 100644 --- a/components/comment/__tests__/__snapshots__/demo.test.js.snap +++ b/components/comment/__tests__/__snapshots__/demo.test.js.snap @@ -73,7 +73,9 @@ exports[`renders ./antdv-demo/docs/comment/demo/list.md correctly 1`] = `

We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure), to help people create their product prototypes beautifully and efficiently.

- + @@ -90,7 +92,9 @@ exports[`renders ./antdv-demo/docs/comment/demo/list.md correctly 1`] = `

We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure), to help people create their product prototypes beautifully and efficiently.

- + @@ -117,7 +121,9 @@ exports[`renders ./antdv-demo/docs/comment/demo/nested.md correctly 1`] = `

We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure).

- +
@@ -131,7 +137,9 @@ exports[`renders ./antdv-demo/docs/comment/demo/nested.md correctly 1`] = `

We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure).

- +
@@ -145,7 +153,9 @@ exports[`renders ./antdv-demo/docs/comment/demo/nested.md correctly 1`] = `

We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure).

- +
@@ -160,7 +170,9 @@ exports[`renders ./antdv-demo/docs/comment/demo/nested.md correctly 1`] = `

We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure).

- + diff --git a/components/comment/index.jsx b/components/comment/index.jsx index 0d489e09b..8811bd461 100644 --- a/components/comment/index.jsx +++ b/components/comment/index.jsx @@ -55,10 +55,11 @@ const Comment = { ); - const actionDom = - actions && actions.length ? ( - - ) : null; + const actionDom = actions ? ( + + ) : null; const authorContent = (
diff --git a/components/mentions/__tests__/__snapshots__/demo.test.js.snap b/components/mentions/__tests__/__snapshots__/demo.test.js.snap index df621fc7b..3b893ea53 100644 --- a/components/mentions/__tests__/__snapshots__/demo.test.js.snap +++ b/components/mentions/__tests__/__snapshots__/demo.test.js.snap @@ -1,8 +1,16 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`renders ./antdv-demo/docs/mentions/demo/async.md correctly 1`] = `
`; +exports[`renders ./antdv-demo/docs/mentions/demo/async.md correctly 1`] = ` +
+ +
+`; -exports[`renders ./antdv-demo/docs/mentions/demo/basic.md correctly 1`] = `
`; +exports[`renders ./antdv-demo/docs/mentions/demo/basic.md correctly 1`] = ` +
+ +
+`; exports[`renders ./antdv-demo/docs/mentions/demo/form.md correctly 1`] = `
@@ -32,15 +40,27 @@ exports[`renders ./antdv-demo/docs/mentions/demo/form.md correctly 1`] = `
`; -exports[`renders ./antdv-demo/docs/mentions/demo/placement.md correctly 1`] = `
`; +exports[`renders ./antdv-demo/docs/mentions/demo/placement.md correctly 1`] = ` +
+ +
+`; -exports[`renders ./antdv-demo/docs/mentions/demo/prefix.md correctly 1`] = `
`; +exports[`renders ./antdv-demo/docs/mentions/demo/prefix.md correctly 1`] = ` +
+ +
+`; exports[`renders ./antdv-demo/docs/mentions/demo/readonly.md correctly 1`] = `
-
+
+ +
+
+
+
-
`; diff --git a/examples/App.vue b/examples/App.vue index c678a019f..c3727a804 100644 --- a/examples/App.vue +++ b/examples/App.vue @@ -4,7 +4,7 @@