From 0c32d1679d3ca97b2e5620dd167d29d86aae72ce Mon Sep 17 00:00:00 2001 From: tanjinzhou <415800467@qq.com> Date: Thu, 30 Jul 2020 16:26:28 +0800 Subject: [PATCH] fix: cascader popup width not correct --- components/cascader/index.jsx | 4 ++-- components/empty/empty.jsx | 4 ++-- components/empty/simple.jsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/cascader/index.jsx b/components/cascader/index.jsx index b8f716b7d..a714a46c3 100644 --- a/components/cascader/index.jsx +++ b/components/cascader/index.jsx @@ -486,8 +486,8 @@ const Cascader = { } // The default value of `matchInputWidth` is `true` const resultListMatchInputWidth = showSearch.matchInputWidth !== false; - if (resultListMatchInputWidth && (inputValue || isNotFound) && this.$refs.input) { - dropdownMenuColumnStyle.width = findDOMNode(this.input).offsetWidth + 'px'; + if (resultListMatchInputWidth && (inputValue || isNotFound) && this.input) { + dropdownMenuColumnStyle.width = findDOMNode(this.input.input).offsetWidth + 'px'; } // showSearch时,focus、blur在input上触发,反之在ref='picker'上触发 const inputProps = { diff --git a/components/empty/empty.jsx b/components/empty/empty.jsx index 1c9c2fc06..06f278543 100644 --- a/components/empty/empty.jsx +++ b/components/empty/empty.jsx @@ -1,10 +1,10 @@ const Empty = () => { return ( - + { return ( - + - +