/
App.vue
72 lines (65 loc) · 1.6 KB
/
App.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<template>
<div>
<IconSymbols />
<Summary />
<div class="layout-col mt-12">
<div class="tabs">
<Tabs v-model="tab" v-bind="{ customTabs }" />
<div class="tab-main">
<Details v-bind="{ tab }" />
</div>
</div>
</div>
</div>
</template>
<script>
import IconSymbols from './Icons/IconSymbols.vue';
import Summary from './Summary.vue';
import Tabs from './Tabs.vue';
import Details from './Details.vue';
export default {
props: {
report: { required: true },
config: { required: true },
solutions: { required: true },
telescopeUrl: { required: true },
shareEndpoint: { required: true },
defaultTab: { required: true },
defaultTabProps: { required: false },
},
data() {
return {
customTabs: window.tabs,
tab: {
component: this.defaultTab,
props: this.defaultTabProps || {},
},
};
},
provide() {
return {
config: this.config,
report: this.report,
solutions: this.solutions,
telescopeUrl: this.telescopeUrl,
shareEndpoint: this.shareEndpoint,
setTab: this.setTab,
};
},
components: {
Summary,
Tabs,
Details,
IconSymbols,
},
methods: {
setTab(component, props = {}) {
this.tab = {
component,
props,
};
},
},
created() {},
};
</script>