fix detail

This commit is contained in:
Qiuxia Fan 2022-05-04 13:41:01 +08:00
parent aa2664a4fc
commit 4562e59ceb

View File

@ -105,8 +105,12 @@ limitations under the License. -->
<span>{{ data.serviceCode }}</span> <span>{{ data.serviceCode }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
<div class="application" v-show="headerType === 'profile'"> <div
<span @click="viewSpan($event)">{{ t("view") }}</span> class="application"
v-show="headerType === 'profile'"
@click="viewSpan($event)"
>
<span>{{ t("view") }}</span>
</div> </div>
</div> </div>
<div <div
@ -139,7 +143,6 @@ import { useI18n } from "vue-i18n";
import { ref, computed, defineComponent } from "vue"; import { ref, computed, defineComponent } from "vue";
import type { PropType } from "vue"; import type { PropType } from "vue";
import SpanDetail from "../D3Graph/SpanDetail.vue"; import SpanDetail from "../D3Graph/SpanDetail.vue";
import { ClickHandler } from "d3-flame-graph";
const props = { const props = {
data: { type: Object as PropType<any>, default: () => ({}) }, data: { type: Object as PropType<any>, default: () => ({}) },
@ -197,7 +200,6 @@ export default defineComponent({
dom.style.background = "rgba(0, 0, 0, 0.1)"; dom.style.background = "rgba(0, 0, 0, 0.1)";
} }
function selectSpan(event: any) { function selectSpan(event: any) {
console.log(event);
const dom = event.path.find((d: any) => const dom = event.path.find((d: any) =>
d.className.includes("trace-item") d.className.includes("trace-item")
); );