Select: set value to null when cleared (#14322) (#14650)

pull/17081/head
aaronfulkerson 2019-03-28 08:16:30 -07:00 committed by Jiewei Qian
parent c698bbbe02
commit 6a766097e2
2 changed files with 2 additions and 2 deletions

View File

@ -742,7 +742,7 @@
deleteSelected(event) {
event.stopPropagation();
const value = this.multiple ? [] : '';
const value = this.multiple ? [] : null;
this.$emit('input', value);
this.emitChange(value);
this.visible = false;

View File

@ -288,7 +288,7 @@ describe('Select', () => {
const iconClear = vm.$el.querySelector('.el-input__icon.el-icon-circle-close');
expect(iconClear).to.exist;
iconClear.click();
expect(vm.value).to.equal('');
expect(vm.value).to.equal(null);
done();
}, 100);
});