mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 17:05:10 +00:00
conditionally render graph based on route fullview
This commit is contained in:
parent
efc4bcd61a
commit
ed3433c01e
@ -21,7 +21,9 @@ limitations under the License. -->
|
||||
:is-resizable="dashboardStore.editMode"
|
||||
v-if="dashboardStore.layout.length"
|
||||
>
|
||||
<FullVue v-if="isFullview" :items="dashboardStore.layout"></FullVue>
|
||||
<grid-item
|
||||
v-else
|
||||
v-for="item in dashboardStore.layout"
|
||||
:x="item.x"
|
||||
:y="item.y"
|
||||
@ -39,17 +41,23 @@ limitations under the License. -->
|
||||
<div class="no-data-tips" v-else>{{ t("noWidget") }}</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent, onBeforeUnmount } from "vue";
|
||||
import { defineComponent, computed, onBeforeUnmount } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||
import { useSelectorStore } from "@/store/modules/selectors";
|
||||
import { LayoutConfig } from "@/types/dashboard";
|
||||
import controls from "../controls/index";
|
||||
import FullVue from "@/components/FullVue.vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
export default defineComponent({
|
||||
name: "Layout",
|
||||
components: { ...controls },
|
||||
components: { ...controls, FullVue },
|
||||
setup() {
|
||||
const { path } = useRoute();
|
||||
const isFullview = computed(() => {
|
||||
return path.includes("fullview");
|
||||
});
|
||||
const { t } = useI18n();
|
||||
const dashboardStore = useDashboardStore();
|
||||
const selectorStore = useSelectorStore();
|
||||
@ -69,6 +77,7 @@ export default defineComponent({
|
||||
dashboardStore.setConfigPanel(false);
|
||||
});
|
||||
return {
|
||||
isFullview,
|
||||
dashboardStore,
|
||||
clickGrid,
|
||||
t,
|
||||
|
Loading…
Reference in New Issue
Block a user