bug fixed autocomplete and width dropdown
This commit is contained in:
parent
5b100e502c
commit
562ffed388
|
@ -33,6 +33,10 @@ class Autocomplete extends Component {
|
|||
this._preLoad = true;
|
||||
this.getItems();
|
||||
}
|
||||
if (value && !this.width) {
|
||||
let rectangle = this.$element[0].getBoundingClientRect();
|
||||
this.width = Math.round(rectangle.width) - 10;
|
||||
}
|
||||
this._showDropDown = value;
|
||||
}
|
||||
|
||||
|
@ -271,9 +275,6 @@ class Autocomplete extends Component {
|
|||
this.showDropDown = this.mouseFocus;
|
||||
});
|
||||
});
|
||||
|
||||
let rectangle = this.$element[0].getBoundingClientRect();
|
||||
this.width = Math.round(rectangle.width) - 10;
|
||||
}
|
||||
|
||||
$onDestroy() {
|
||||
|
@ -301,7 +302,6 @@ module.component('vnAutocomplete', {
|
|||
itemAs: '@?',
|
||||
field: '=',
|
||||
label: '@',
|
||||
itemTemplate: '@?',
|
||||
multiple: '@?'
|
||||
},
|
||||
transclude: {
|
||||
|
|
|
@ -187,7 +187,6 @@ export default class Watcher extends Component {
|
|||
if (response === 'ACCEPT') {
|
||||
Object.assign(this.data, this.orgData);
|
||||
this.$state.go(this.state);
|
||||
|
||||
} else {
|
||||
this.state = null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue