File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 11<template >
2- <Button size =" icon-sm" variant =" ghost" @click.prevent =" copy(text)" >
2+ <Button size =" icon-sm" variant =" ghost" @click.prevent.stop =" copy(text)" >
33 <Check v-if =" copied" class =" h-3.5 w-3.5" />
44 <Copy v-else class =" h-3.5 w-3.5" />
55 </Button >
Original file line number Diff line number Diff line change 99 </tr >
1010 <tr v-if =" value.defaultValue" >
1111 <td >Default</td >
12- <CodeInline :code =" value.defaultValue.toString()" language =" javascript" />
12+ <template v-if =" value .type === ' object' || value .type === ' array' " >
13+ <Popover v-if =" value.defaultValue" >
14+ <PopoverTrigger >
15+ <button class =" inline-flex items-center capitalize italic text-muted-foreground" >
16+ <span >{{ value.type }}</span >
17+ <ChevronRight class =" h-4" />
18+ </button >
19+ </PopoverTrigger >
20+ <PopoverContent >
21+ <CodeBlock :code =" JSON.stringify(value.defaultValue, null, 2)" language =" javascript" />
22+ </PopoverContent >
23+ </Popover >
24+ </template >
25+ <template v-else >
26+ <CodeInline :code =" JSON.stringify(value.defaultValue)" language =" javascript" />
27+ </template >
1328 </tr >
1429 </table >
1530 <hr class =" my-2" />
@@ -44,6 +59,9 @@ import ValueType from '@/components/core/ValueType.vue';
4459import CodeInline from ' @/components/core/code/CodeInline.vue' ;
4560import { Action } from ' @/enum' ;
4661import { useBridge } from ' @/composables/useBridge.ts' ;
62+ import { Popover , PopoverContent , PopoverTrigger } from ' @/components/ui/popover' ;
63+ import CodeBlock from ' @/components/core/CodeBlock.vue' ;
64+ import { ChevronRight } from ' lucide-vue-next' ;
4765
4866const { executeAction } = useBridge ();
4967
You can’t perform that action at this time.
0 commit comments