|
@@ -2,14 +2,14 @@
|
|
|
<button
|
|
|
class="el-button"
|
|
|
@click="handleClick"
|
|
|
- :disabled="disabled || loading"
|
|
|
+ :disabled="buttonDisabled || loading"
|
|
|
:autofocus="autofocus"
|
|
|
:type="nativeType"
|
|
|
:class="[
|
|
|
type ? 'el-button--' + type : '',
|
|
|
buttonSize ? 'el-button--' + buttonSize : '',
|
|
|
{
|
|
|
- 'is-disabled': disabled,
|
|
|
+ 'is-disabled': buttonDisabled,
|
|
|
'is-loading': loading,
|
|
|
'is-plain': plain,
|
|
|
'is-round': round
|
|
@@ -26,6 +26,9 @@
|
|
|
name: 'ElButton',
|
|
|
|
|
|
inject: {
|
|
|
+ elForm: {
|
|
|
+ default: ''
|
|
|
+ },
|
|
|
elFormItem: {
|
|
|
default: ''
|
|
|
}
|
|
@@ -58,6 +61,9 @@
|
|
|
},
|
|
|
buttonSize() {
|
|
|
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
|
|
|
+ },
|
|
|
+ buttonDisabled() {
|
|
|
+ return this.disabled || (this.elForm || {}).disabled;
|
|
|
}
|
|
|
},
|
|
|
|