|
|
@@ -5,19 +5,28 @@
|
|
5
|
5
|
:key="item.path"
|
|
6
|
6
|
:iframeId="'iframe' + index"
|
|
7
|
7
|
v-show="$route.path === item.path"
|
|
8
|
|
- :src="item.meta.link"
|
|
|
8
|
+ :src="iframeUrl(item.meta.link, item.query)"
|
|
9
|
9
|
></inner-link>
|
|
10
|
10
|
</transition-group>
|
|
11
|
11
|
</template>
|
|
12
|
12
|
|
|
13
|
13
|
<script>
|
|
14
|
|
-import InnerLink from "../InnerLink/index"
|
|
|
14
|
+import InnerLink from "../InnerLink/index";
|
|
15
|
15
|
|
|
16
|
16
|
export default {
|
|
17
|
17
|
components: { InnerLink },
|
|
18
|
18
|
computed: {
|
|
19
|
19
|
iframeViews() {
|
|
20
|
|
- return this.$store.state.tagsView.iframeViews
|
|
|
20
|
+ return this.$store.state.tagsView.iframeViews;
|
|
|
21
|
+ }
|
|
|
22
|
+ },
|
|
|
23
|
+ methods: {
|
|
|
24
|
+ iframeUrl(url, query) {
|
|
|
25
|
+ if (Object.keys(query).length > 0) {
|
|
|
26
|
+ let params = Object.keys(query).map((key) => key + "=" + query[key]).join("&");
|
|
|
27
|
+ return url + "?" + params;
|
|
|
28
|
+ }
|
|
|
29
|
+ return url;
|
|
21
|
30
|
}
|
|
22
|
31
|
}
|
|
23
|
32
|
}
|