replace api

This commit is contained in:
Qiuxia Fan 2022-05-11 11:02:33 +08:00
parent 021b771be3
commit 8685bdb5fb

View File

@ -200,9 +200,10 @@ export default defineComponent({
dom.style.background = "rgba(0, 0, 0, 0.1)";
}
function selectSpan(event: any) {
const dom = event.path.find((d: any) =>
d.className.includes("trace-item")
);
console.log(event.composedPath());
const dom = event
.composedPath()
.find((d: any) => d.className.includes("trace-item"));
emit("select", props.data);
if (props.headerType === "profile") {
@ -212,9 +213,9 @@ export default defineComponent({
viewSpanDetail(dom);
}
function viewSpan(event: any) {
const dom = event.path.find((d: any) =>
d.className.includes("trace-item")
);
const dom = event
.composedPath()
.find((d: any) => d.className.includes("trace-item"));
emit("select", props.data);
viewSpanDetail(dom);
}