vue-json-pretty
vue-json-pretty copied to clipboard
Custom Formatter
Ιs there a way to highlight a specific node (key-value) if it has a specific value? customValueFormatter prop highlight only the value.
I have 2 suggestions:
- Mark each node with the class attribute, you can add styles according to different class names, for example, you can use the path of the current node, but when the level is very deep, the class name will become very long.
- Add a new attribute, such as
pathHighlightList
, which can automatically highlight at the component layer if it meets the conditions.
Now, you can use slot
to achieve.