From 65b41a2d6f73314771e6035f94ea5bbeee39e65c Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Mon, 10 Apr 2017 22:43:24 +0800 Subject: [PATCH] fixed #635 --- examples/routers/cascader.vue | 154 ++++++++++++++++++++++++++-------------------------------------------------------------------------------------------------------------------------------- src/components/cascader/cascader.vue | 3 ++- 2 files changed, 28 insertions(+), 129 deletions(-) diff --git a/examples/routers/cascader.vue b/examples/routers/cascader.vue index c1517c1..246881a 100644 --- a/examples/routers/cascader.vue +++ b/examples/routers/cascader.vue @@ -1,141 +1,39 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/components/cascader/cascader.vue b/src/components/cascader/cascader.vue index abc0074..5768d1e 100644 --- a/src/components/cascader/cascader.vue +++ b/src/components/cascader/cascader.vue @@ -112,7 +112,7 @@ ]; }, showCloseIcon () { - return this.currentValue && this.currentValue.length && this.clearable; + return this.currentValue && this.currentValue.length && this.clearable && !this.disabled; }, displayRender () { let label = []; @@ -125,6 +125,7 @@ }, methods: { clearSelect () { + if (this.disabled) return false; const oldVal = JSON.stringify(this.currentValue); this.currentValue = this.selected = this.tmpSelected = []; this.handleClose(); -- libgit2 0.21.4