update style

This commit is contained in:
Qiuxia Fan 2022-03-20 17:35:57 +08:00
parent dd030b28bc
commit e72aa2f99b
3 changed files with 9 additions and 10 deletions

View File

@ -32,7 +32,6 @@ defineProps({
},
});
const dashboardStore = useDashboardStore();
console.log(dashboardStore.entity);
const isSankey = ref<boolean>(
[EntityType[2].value, EntityType[3].value].includes(dashboardStore.entity)
);

View File

@ -95,8 +95,8 @@ const { t } = useI18n();
const selectorStore = useSelectorStore();
const topologyStore = useTopologyStore();
const dashboardStore = useDashboardStore();
const height = ref<number>(document.body.clientHeight);
const width = ref<number>(document.body.clientWidth);
const height = ref<number>(0);
const width = ref<number>(0);
const loading = ref<boolean>(false);
const simulation = ref<any>(null);
const svg = ref<Nullable<any>>(null);
@ -128,7 +128,7 @@ onMounted(async () => {
ElMessage.error(resp.errors);
}
const dom = document.querySelector(".topology")?.getBoundingClientRect() || {
height: 0,
height: 40,
width: 0,
};
height.value = dom.height - 40;

View File

@ -96,8 +96,8 @@ const dashboardStore = useDashboardStore();
const selectorStore = useSelectorStore();
const topologyStore = useTopologyStore();
const loading = ref<boolean>(false);
const height = ref<number>(document.body.clientHeight);
const width = ref<number>(document.body.clientWidth);
const height = ref<number>(0);
const width = ref<number>(0);
const showSettings = ref<boolean>(false);
const settings = ref<any>({});
const operationsPos = reactive<{ x: number; y: number }>({ x: NaN, y: NaN });
@ -120,11 +120,11 @@ async function loadTopology(id: string) {
ElMessage.error(resp.errors);
}
const dom = document.querySelector(".topology")?.getBoundingClientRect() || {
height: 0,
width: 0,
height: 70,
width: 5,
};
height.value = dom.height - 40;
width.value = dom.width;
height.value = dom.height - 70;
width.value = dom.width - 5;
}
function inspect() {