|
1 | | -import { App, ComponentInternalInstance, getCurrentInstance, nextTick, onUnmounted, unref } from 'vue'; |
| 1 | +import { App, ComponentInternalInstance, getCurrentInstance, nextTick, onUnmounted, toValue, unref } from 'vue'; |
2 | 2 | import { setupDevtoolsPlugin } from '@vue/devtools-api'; |
3 | 3 | import type { InspectorNodeTag, CustomInspectorState, CustomInspectorNode } from '@vue/devtools-kit'; |
4 | 4 | import { PathState, PrivateFieldContext, PrivateFormContext } from './types'; |
@@ -216,7 +216,7 @@ function mapFormForDevtoolsInspector(form: PrivateFormContext): CustomInspectorN |
216 | 216 |
|
217 | 217 | const formTreeNodes = {}; |
218 | 218 | Object.values(form.getAllPathStates()).forEach(state => { |
219 | | - setInPath(formTreeNodes, unref(state.path), mapPathForDevtoolsInspector(state, form)); |
| 219 | + setInPath(formTreeNodes, toValue(state.path), mapPathForDevtoolsInspector(state, form)); |
220 | 220 | }); |
221 | 221 |
|
222 | 222 | function buildFormTree(tree: any[] | Record<string, any>, path: string[] = []): CustomInspectorNode { |
@@ -271,7 +271,7 @@ function mapFormForDevtoolsInspector(form: PrivateFormContext): CustomInspectorN |
271 | 271 | function mapPathForDevtoolsInspector(state: PathState, form?: PrivateFormContext): CustomInspectorNode { |
272 | 272 | return { |
273 | 273 | id: encodeNodeId(form, state), |
274 | | - label: unref(state.path), |
| 274 | + label: toValue(state.path), |
275 | 275 | tags: getFieldNodeTags(state.multiple, state.fieldsCount, state.type, state.valid, form), |
276 | 276 | }; |
277 | 277 | } |
|
0 commit comments