fix set title :review by huangyi
Showing
1 changed file
with
8 additions
and
4 deletions
@@ -38,10 +38,14 @@ export default { | @@ -38,10 +38,14 @@ export default { | ||
38 | if (!setTitle) { | 38 | if (!setTitle) { |
39 | return this.title; | 39 | return this.title; |
40 | } | 40 | } |
41 | - if (this.title) { | ||
42 | - setTitle(this.title); | ||
43 | - this.$xianyu.setXianyuTitle({ title: this.title }); | ||
44 | - } | 41 | + |
42 | + setTimeout(() => { | ||
43 | + if (this.title) { | ||
44 | + setTitle(this.title); | ||
45 | + this.$xianyu.setXianyuTitle({ title: this.title }); | ||
46 | + } | ||
47 | + }, 100); | ||
48 | + | ||
45 | this.setTitle = setTitle; | 49 | this.setTitle = setTitle; |
46 | }, | 50 | }, |
47 | computed: { | 51 | computed: { |
-
Please register or login to post a comment