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