diff --git a/src/components/autocomplete/AutoComplete.vue b/src/components/autocomplete/AutoComplete.vue
index b0e130bb8..1ee63b1e1 100755
--- a/src/components/autocomplete/AutoComplete.vue
+++ b/src/components/autocomplete/AutoComplete.vue
@@ -14,29 +14,31 @@
-
-
-
-
-
- -
- {{getItemContent(item)}}
-
-
-
-
- -
- {{getOptionGroupLabel(optionGroup)}}
-
- -
- {{getItemContent(item)}}
+
+
+
+
+
+
+ -
+ {{getItemContent(item)}}
-
-
-
-
-
+
+
+ -
+ {{getOptionGroupLabel(optionGroup)}}
+
+ -
+ {{getItemContent(item)}}
+
+
+
+
+
+
+
+
@@ -89,7 +91,7 @@ export default {
},
appendTo: {
type: String,
- default: null
+ default: 'body'
},
forceSelection: {
type: Boolean,
@@ -127,7 +129,6 @@ export default {
}
},
beforeUnmount() {
- this.restoreAppend();
this.unbindOutsideClickListener();
this.unbindResizeListener();
@@ -154,7 +155,6 @@ export default {
},
onOverlayEnter() {
this.overlay.style.zIndex = String(DomHandler.generateZIndex());
- this.appendContainer();
this.alignOverlay();
this.bindOutsideClickListener();
this.bindScrollListener();
@@ -168,10 +168,8 @@ export default {
},
alignOverlay() {
let target = this.multiple ? this.$refs.multiContainer : this.$refs.input;
- if (this.appendTo)
- DomHandler.absolutePosition(this.overlay, target);
- else
- DomHandler.relativePosition(this.overlay, target);
+ this.overlay.style.minWidth = DomHandler.getOuterWidth(target) + 'px';
+ DomHandler.absolutePosition(this.overlay, target);
},
bindOutsideClickListener() {
if (!this.outsideClickListener) {
@@ -499,22 +497,6 @@ export default {
return selected;
},
- appendContainer() {
- if (this.appendTo) {
- if (this.appendTo === 'body')
- document.body.appendChild(this.overlay);
- else
- document.getElementById(this.appendTo).appendChild(this.overlay);
- }
- },
- restoreAppend() {
- if (this.overlay && this.appendTo) {
- if (this.appendTo === 'body')
- document.body.removeChild(this.overlay);
- else
- document.getElementById(this.appendTo).removeChild(this.overlay);
- }
- },
overlayRef(el) {
this.overlay = el;
}
diff --git a/src/components/calendar/Calendar.vue b/src/components/calendar/Calendar.vue
index a19bdcce5..6f3f1c4ee 100755
--- a/src/components/calendar/Calendar.vue
+++ b/src/components/calendar/Calendar.vue
@@ -3,130 +3,132 @@
-
-