File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change 5858 dataValue : {
5959 "default" : null
6060 } ,
61- appendToBody : {
62- type : Boolean ,
63- "default" : false
61+ container : {
62+ type : String ,
63+ "default" : ''
6464 } ,
6565 visibleArrow : {
6666 type : Boolean ,
135135 } ,
136136 created : function created ( ) {
137137 this . appendedArrow = false ;
138- this . appendedToBody = false ;
138+ this . appendedToContainer = false ;
139139 this . popperOptions = Object . assign ( this . popperOptions , this . options ) ;
140140 } ,
141141 mounted : function mounted ( ) {
200200 this . popperJS = null ;
201201 }
202202
203- if ( this . appendedToBody ) {
204- this . appendedToBody = false ;
205- document . body . removeChild ( this . popper . parentElement ) ;
203+ if ( this . appendedToContainer ) {
204+ this . appendedToContainer = false ;
205+ var container = document . querySelector ( this . container ) ;
206+ container . removeChild ( this . popper . parentElement ) ;
206207 }
207208 } ,
208209 createPopper : function createPopper ( ) {
213214 _this . appendArrow ( _this . popper ) ;
214215 }
215216
216- if ( _this . appendToBody && ! _this . appendedToBody ) {
217- _this . appendedToBody = true ;
218- document . body . appendChild ( _this . popper . parentElement ) ;
217+ if ( _this . container && ! _this . appendedToContainer ) {
218+ _this . appendedToContainer = true ;
219+ var container = document . querySelector ( _this . container ) ;
220+ container . appendChild ( _this . popper . parentElement ) ;
219221 }
220222
221223 if ( _this . popperJS && _this . popperJS . destroy ) {
You can’t perform that action at this time.
0 commit comments