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`] = `