正在显示
2 个修改的文件
包含
16 行增加
和
4 行删除
| @@ -22,6 +22,22 @@ export default { | @@ -22,6 +22,22 @@ export default { | ||
| 22 | key() { | 22 | key() { |
| 23 | return this.$route.path | 23 | return this.$route.path |
| 24 | } | 24 | } |
| 25 | + }, | ||
| 26 | + watch: { | ||
| 27 | + $route() { | ||
| 28 | + this.addIframe() | ||
| 29 | + } | ||
| 30 | + }, | ||
| 31 | + mounted() { | ||
| 32 | + this.addIframe() | ||
| 33 | + }, | ||
| 34 | + methods: { | ||
| 35 | + addIframe() { | ||
| 36 | + const {name} = this.$route | ||
| 37 | + if (name && this.$route.meta.link) { | ||
| 38 | + this.$store.dispatch('tagsView/addIframeView', this.$route) | ||
| 39 | + } | ||
| 40 | + } | ||
| 25 | } | 41 | } |
| 26 | } | 42 | } |
| 27 | </script> | 43 | </script> |
| @@ -133,11 +133,7 @@ export default { | @@ -133,11 +133,7 @@ export default { | ||
| 133 | const { name } = this.$route | 133 | const { name } = this.$route |
| 134 | if (name) { | 134 | if (name) { |
| 135 | this.$store.dispatch('tagsView/addView', this.$route) | 135 | this.$store.dispatch('tagsView/addView', this.$route) |
| 136 | - if (this.$route.meta.link) { | ||
| 137 | - this.$store.dispatch('tagsView/addIframeView', this.$route) | ||
| 138 | - } | ||
| 139 | } | 136 | } |
| 140 | - return false | ||
| 141 | }, | 137 | }, |
| 142 | moveToCurrentTag() { | 138 | moveToCurrentTag() { |
| 143 | const tags = this.$refs.tag | 139 | const tags = this.$refs.tag |
-
请 注册 或 登录 后发表评论