Commit d956022a authored by hetech's avatar hetech Committed by GitHub

Cascader: remove unnecessary DOM operation (#14788)

* Cascader: remove unnecessary DOM operation

* update cascader test
parent a1498288
......@@ -239,10 +239,6 @@ export default {
currentValue(value) {
this.dispatch('ElFormItem', 'el.form.change', [value]);
},
currentLabels(value) {
const inputLabel = this.showAllLevels ? value.join('/') : value[value.length - 1] ;
this.$refs.input.$refs.input.setAttribute('value', inputLabel);
},
options: {
deep: true,
handler(value) {
......
......@@ -82,6 +82,7 @@ describe('Cascader', () => {
expect(vm.selectedOptions[0]).to.be.equal('zhejiang');
expect(vm.selectedOptions[1]).to.be.equal('hangzhou');
expect(vm.selectedOptions[2]).to.be.equal('xihu');
expect(vm.$refs.cascader.$el.querySelector('.el-input__inner').value).to.be.equal('');
triggerEvent(vm.$refs.cascader.$el, 'mouseenter');
vm.$nextTick(_ => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment