2
0
mirror of https://github.com/tenrok/vue-tribute.git synced 2026-06-15 04:02:25 +03:00

fix undefined default slot when rendering complex components

This commit is contained in:
Vaclav Loffelmann
2020-02-09 12:16:33 +01:00
parent 8a1e75dd6f
commit 854e0b561a
6 changed files with 43 additions and 27 deletions
+10 -6
View File
@@ -19,16 +19,20 @@ var VueTribute = {
handler: function handler() {
var _this = this;
var $el = this.$slots.default[0].elm;
if (this.tribute) {
this.tribute.detach($el);
setTimeout(function () {
_this.tribute = new Tribute(_this.options);
var $el = _this.$slots.default[0].elm;
_this.tribute.attach($el);
_this.tribute.detach($el);
$el.tributeInstance = _this.tribute;
setTimeout(function () {
var $el = _this.$slots.default[0].elm;
_this.tribute = new Tribute(_this.options);
_this.tribute.attach($el);
$el.tributeInstance = _this.tribute;
}, 0);
}, 0);
}
}
+10 -6
View File
@@ -15,16 +15,20 @@ var VueTribute = {
handler: function handler() {
var _this = this;
var $el = this.$slots.default[0].elm;
if (this.tribute) {
this.tribute.detach($el);
setTimeout(function () {
_this.tribute = new Tribute(_this.options);
var $el = _this.$slots.default[0].elm;
_this.tribute.attach($el);
_this.tribute.detach($el);
$el.tributeInstance = _this.tribute;
setTimeout(function () {
var $el = _this.$slots.default[0].elm;
_this.tribute = new Tribute(_this.options);
_this.tribute.attach($el);
$el.tributeInstance = _this.tribute;
}, 0);
}, 0);
}
}
+10 -6
View File
@@ -1810,16 +1810,20 @@
handler: function handler() {
var _this = this;
var $el = this.$slots.default[0].elm;
if (this.tribute) {
this.tribute.detach($el);
setTimeout(function () {
_this.tribute = new Tribute(_this.options);
var $el = _this.$slots.default[0].elm;
_this.tribute.attach($el);
_this.tribute.detach($el);
$el.tributeInstance = _this.tribute;
setTimeout(function () {
var $el = _this.$slots.default[0].elm;
_this.tribute = new Tribute(_this.options);
_this.tribute.attach($el);
$el.tributeInstance = _this.tribute;
}, 0);
}, 0);
}
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+11 -7
View File
@@ -13,14 +13,18 @@ const VueTribute = {
immediate: false,
deep: true,
handler() {
const $el = this.$slots.default[0].elm
if (this.tribute) {
this.tribute.detach($el)
setTimeout(() => {
this.tribute = new Tribute(this.options)
this.tribute.attach($el)
$el.tributeInstance = this.tribute
}, 0)
setTimeout( () => {
var $el = this.$slots.default[0].elm;
this.tribute.detach($el);
setTimeout( () => {
$el = this.$slots.default[0].elm;
this.tribute = new Tribute(this.options);
this.tribute.attach($el);
$el.tributeInstance = this.tribute;
}, 0);
}, 0);
}
}
}