From 4a08343b388b4b2f491e5b70b20747d826774908 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 31 Oct 2024 23:49:55 +0800 Subject: [PATCH] fix: custom inspector bugs --- .../custom-inspector/components/state/Index.vue | 17 ++++++++++------- .../src/modules/custom-inspector/index.vue | 2 ++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/applet/src/modules/custom-inspector/components/state/Index.vue b/packages/applet/src/modules/custom-inspector/components/state/Index.vue index 54f3f7f80..f1985bb35 100644 --- a/packages/applet/src/modules/custom-inspector/components/state/Index.vue +++ b/packages/applet/src/modules/custom-inspector/components/state/Index.vue @@ -2,7 +2,7 @@ import type { CustomInspectorNode, CustomInspectorOptions, CustomInspectorState } from '@vue/devtools-kit' import { DevToolsMessagingEvents, onRpcConnected, rpc } from '@vue/devtools-core' import { parse } from '@vue/devtools-kit' -import { vTooltip, VueIcIcon } from '@vue/devtools-ui' +import { vTooltip, VueIcIcon, VueInput } from '@vue/devtools-ui' import { until } from '@vueuse/core' import { Pane, Splitpanes } from 'splitpanes' import { computed, onUnmounted, ref, watch } from 'vue' @@ -151,7 +151,7 @@ function getInspectorTree(filter = '') { }) } -until(inspectorId).toBeTruthy().then(getInspectorTree) +until(inspectorId).toBeTruthy().then(() => getInspectorTree()) function onInspectorTreeUpdated(_data: string) { const data = parse(_data) as { @@ -198,7 +198,10 @@ onUnmounted(() => { - diff --git a/packages/applet/src/modules/custom-inspector/index.vue b/packages/applet/src/modules/custom-inspector/index.vue index fe956e0ed..4208e0856 100644 --- a/packages/applet/src/modules/custom-inspector/index.vue +++ b/packages/applet/src/modules/custom-inspector/index.vue @@ -68,6 +68,8 @@ function getInspectorInfo() { logo: payload?.logo, timelineLayerIds: payload?.timelineLayers.map(item => item.id), pluginId: props.pluginId, + treeFilterPlaceholder: payload.treeFilterPlaceholder, + stateFilterPlaceholder: payload.stateFilterPlaceholder, } inspectorState.value = state restoreRouter()