feat: lgbSelect 支持初始化 disabled 属性
This commit is contained in:
parent
dc9b4b7dee
commit
3eaa058585
|
@ -50,6 +50,10 @@
|
|||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.form-select.is-disabled .form-select-append {
|
||||
color: #c0c4cc;
|
||||
}
|
||||
|
||||
.form-select-input {
|
||||
color: #606266;
|
||||
outline: none;
|
||||
|
|
|
@ -119,6 +119,12 @@
|
|||
if (value !== undefined) attrs.push({ name: v, value: value });
|
||||
});
|
||||
|
||||
var disabled = this.$element.prop('disabled');
|
||||
// set disabled property
|
||||
if (disabled) {
|
||||
this.disabled();
|
||||
}
|
||||
|
||||
// replace element select -> input hidden
|
||||
this.$element.remove();
|
||||
this.$element = $('<input type="hidden" data-toggle="lgbSelect" />').val(that.val()).insertBefore(this.$input);
|
||||
|
|
Loading…
Reference in New Issue