Closed MilesPan closed 2 months ago
const map = new Map(); map.set({ name: 1 }, 10); map.set({ name: 2 }, 10); <ReactJson value={{ map, key: 1 }} style={jsonTheme}></ReactJson> 目前预览效果是这样的。
const map = new Map(); map.set({ name: 1 }, 10); map.set({ name: 2 }, 10);
<ReactJson value={{ map, key: 1 }} style={jsonTheme}></ReactJson>
期望: 有没有办法实现DevTool中这种预览效果
@MilesPan 样式可以定义出来,但是你可以自己研究一下,参考官方示例
https://github.com/uiwjs/react-json-view/blob/32b34c1b57a73e9cb46022aea406110b89cb79cb/www/src/example/default.tsx#L25-L68
const map = new Map(); map.set({ name: 1 }, 10); map.set({ name: 2 }, 10);
<ReactJson value={{ map, key: 1 }} style={jsonTheme}></ReactJson>
目前预览效果是这样的。期望: 有没有办法实现DevTool中这种预览效果