hide tips

This commit is contained in:
Qiuxia Fan 2022-07-07 11:17:40 +08:00
parent 937517dc2e
commit 2013fa9767

View File

@ -62,7 +62,6 @@ const available = computed(
onMounted(async () => { onMounted(async () => {
await setOptions(props.option); await setOptions(props.option);
chartRef.value && addResizeListener(unref(chartRef), resize); chartRef.value && addResizeListener(unref(chartRef), resize);
console.log(props.filters);
setTimeout(() => { setTimeout(() => {
const instance = getInstance(); const instance = getInstance();
@ -72,6 +71,15 @@ onMounted(async () => {
instance.on("click", (params: unknown) => { instance.on("click", (params: unknown) => {
emits("select", params); emits("select", params);
}); });
document.addEventListener(
"click",
() => {
instance.dispatchAction({
type: "hideTip",
});
},
true
);
}, 1000); }, 1000);
}); });
@ -90,7 +98,6 @@ watch(
watch( watch(
() => props.filters, () => props.filters,
() => { () => {
console.log(props.filters);
const instance = getInstance(); const instance = getInstance();
if (!instance) { if (!instance) {
return; return;
@ -101,10 +108,6 @@ watch(
dataIndex: props.filters.dataIndex, dataIndex: props.filters.dataIndex,
seriesIndex: 0, seriesIndex: 0,
}); });
} else {
instance.dispatchAction({
type: "hideTip",
});
} }
} }
); );