From cbfa64fcabb8fdaa932c9533b48548c2cacb10cb Mon Sep 17 00:00:00 2001 From: Phyng Date: Sun, 5 May 2019 20:05:39 +0800 Subject: [PATCH] [bugfix] PullRefresh: transform style (#3256) (#3258) --- packages/pull-refresh/index.js | 2 +- packages/pull-refresh/test/__snapshots__/demo.spec.js.snap | 2 +- packages/pull-refresh/test/__snapshots__/index.spec.js.snap | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/pull-refresh/index.js b/packages/pull-refresh/index.js index 90d07ca89..9baab8cbd 100644 --- a/packages/pull-refresh/index.js +++ b/packages/pull-refresh/index.js @@ -144,7 +144,7 @@ export default sfc({ const text = this[`${status}Text`] || t(status); const style = { transition: `${this.duration}ms`, - transform: `translate3d(0,${this.height}px, 0)` + transform: this.height ? `translate3d(0,${this.height}px, 0)` : '' }; const Status = this.slots(status) || [ diff --git a/packages/pull-refresh/test/__snapshots__/demo.spec.js.snap b/packages/pull-refresh/test/__snapshots__/demo.spec.js.snap index d2b343f62..b83f947f5 100644 --- a/packages/pull-refresh/test/__snapshots__/demo.spec.js.snap +++ b/packages/pull-refresh/test/__snapshots__/demo.spec.js.snap @@ -3,7 +3,7 @@ exports[`renders demo correctly 1`] = `
-
+

刷新次数: 0

diff --git a/packages/pull-refresh/test/__snapshots__/index.spec.js.snap b/packages/pull-refresh/test/__snapshots__/index.spec.js.snap index c48b8026c..acdc734de 100644 --- a/packages/pull-refresh/test/__snapshots__/index.spec.js.snap +++ b/packages/pull-refresh/test/__snapshots__/index.spec.js.snap @@ -46,7 +46,7 @@ exports[`change head content when pulling down 4`] = ` exports[`change head content when pulling down 5`] = `
-
+
@@ -54,7 +54,7 @@ exports[`change head content when pulling down 5`] = ` exports[`not in page top 1`] = `
-
+