From 2aa0aa6e6fc94048cb81f776d5d8bd312e957a0f Mon Sep 17 00:00:00 2001 From: Rijn Date: Fri, 24 Feb 2017 21:04:39 -0600 Subject: [PATCH] fix bug: cascader still can be opened if set to disabled --- src/components/cascader/cascader.vue | 1 + test/routers/cascader.vue | 10 ++++++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/components/cascader/cascader.vue b/src/components/cascader/cascader.vue index 9f3bceb..4ebfdb9 100644 --- a/src/components/cascader/cascader.vue +++ b/src/components/cascader/cascader.vue @@ -129,6 +129,7 @@ this.visible = false; }, toggleOpen () { + if (this.disabled) return false; if (this.visible) { this.handleClose(); } else { diff --git a/test/routers/cascader.vue b/test/routers/cascader.vue index eb45d84..d8ebc3f 100644 --- a/test/routers/cascader.vue +++ b/test/routers/cascader.vue @@ -3,11 +3,21 @@ 选择 + + + + Disabled + + + + +