diff --git a/packages/select/src/select.vue b/packages/select/src/select.vue index 907bd4d4e58..b86d3c206da 100644 --- a/packages/select/src/select.vue +++ b/packages/select/src/select.vue @@ -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; diff --git a/test/unit/specs/select.spec.js b/test/unit/specs/select.spec.js index cb1898ab950..264ed066723 100644 --- a/test/unit/specs/select.spec.js +++ b/test/unit/specs/select.spec.js @@ -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); });