fix: update style

This commit is contained in:
Qiuxia Fan 2022-02-16 17:45:21 +08:00
parent 57e6fc342d
commit 4ad5962fcc
4 changed files with 11 additions and 26 deletions

View File

@ -37,11 +37,12 @@ const props = defineProps({
});
onMounted(() => {
setOptions(props.option);
const instance = getInstance();
instance.on("click", (params: any) => {
emits("select", params);
});
setOptions(props.option);
addResizeListener(unref(chartRef), resize);
});

View File

@ -152,7 +152,6 @@ export default defineComponent({
if (dashboardStore.entity === EntityType[0].value) {
return;
}
console.log("enter");
queryMetrics();
}
);

View File

@ -403,7 +403,7 @@ function updateSettings(config: any) {
if (config.nodeDashboard) {
items.value.push({
id: "dashboard",
title: "Dashboard",
title: "View Dashboard",
func: handleGoDashboard,
});
}
@ -455,7 +455,7 @@ onBeforeUnmount(() => {
span {
display: block;
height: 30px;
width: 100px;
width: 140px;
line-height: 30px;
text-align: center;
}
@ -505,27 +505,6 @@ onBeforeUnmount(() => {
font-size: 11px;
opacity: 0.8;
}
.topo-tool {
display: none;
}
.topo-tool-i {
cursor: pointer;
.tool-hexagon {
fill: #3f4450;
stroke: #217ef2;
stroke-width: 2;
stroke-opacity: 0.5;
}
&:hover {
.tool-hexagon {
stroke-opacity: 1;
}
}
}
}
.d3-tip {

View File

@ -42,6 +42,7 @@ limitations under the License. -->
class="sankey"
:style="`height:${height}px;width:${width}px;`"
v-loading="loading"
@click="handleClick"
>
<Sankey @click="selectNodeLink" />
</div>
@ -153,7 +154,6 @@ function backToTopology() {
function selectNodeLink(d: any) {
if (d.dataType === "edge") {
console.log(d.data);
topologyStore.setNode(null);
topologyStore.setLink(d.data);
if (!settings.value.linkDashboard) {
@ -195,6 +195,12 @@ async function getTopology(id: string) {
}
return resp;
}
function handleClick(event: any) {
if (event.target.nodeName === "svg") {
topologyStore.setNode(null);
topologyStore.setLink(null);
}
}
</script>
<style lang="scss" scoped>
.sankey {