diff --git a/src/components/cascader/cascader.vue b/src/components/cascader/cascader.vue
index e088ec7a..4f981898 100644
--- a/src/components/cascader/cascader.vue
+++ b/src/components/cascader/cascader.vue
@@ -7,7 +7,7 @@
:element-id="elementId"
ref="input"
:readonly="!filterable"
- :disabled="disabled"
+ :disabled="itemDisabled"
:value="displayInputRender"
@on-change="handleInput"
:size="size"
@@ -34,7 +34,7 @@
ref="caspanel"
:prefix-cls="prefixCls"
:data="data"
- :disabled="disabled"
+ :disabled="itemDisabled"
:change-on-select="changeOnSelect"
:trigger="trigger">
@@ -63,13 +63,14 @@
import { oneOf } from '../../utils/assist';
import Emitter from '../../mixins/emitter';
import Locale from '../../mixins/locale';
+ import mixinsForm from '../../mixins/form';
const prefixCls = 'ivu-cascader';
const selectPrefixCls = 'ivu-select';
export default {
name: 'Cascader',
- mixins: [ Emitter, Locale ],
+ mixins: [ Emitter, Locale, mixinsForm ],
components: { iInput, Drop, Icon, Caspanel },
directives: { clickOutside, TransferDom },
props: {
@@ -165,13 +166,13 @@
[`${prefixCls}-show-clear`]: this.showCloseIcon,
[`${prefixCls}-size-${this.size}`]: !!this.size,
[`${prefixCls}-visible`]: this.visible,
- [`${prefixCls}-disabled`]: this.disabled,
+ [`${prefixCls}-disabled`]: this.itemDisabled,
[`${prefixCls}-not-found`]: this.filterable && this.query !== '' && !this.querySelections.length
}
];
},
showCloseIcon () {
- return this.currentValue && this.currentValue.length && this.clearable && !this.disabled;
+ return this.currentValue && this.currentValue.length && this.clearable && !this.itemDisabled;
},
displayRender () {
let label = [];
@@ -271,7 +272,7 @@
},
methods: {
clearSelect () {
- if (this.disabled) return false;
+ if (this.itemDisabled) return false;
const oldVal = JSON.stringify(this.currentValue);
this.currentValue = this.selected = this.tmpSelected = [];
this.handleClose();
@@ -283,7 +284,7 @@
this.visible = false;
},
toggleOpen () {
- if (this.disabled) return false;
+ if (this.itemDisabled) return false;
if (this.visible) {
if (!this.filterable) this.handleClose();
} else {