File tree Expand file tree Collapse file tree
web/lrm/client/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 105105 : 'mdi-magnify-minus-outline'
106106 }}</v-icon >
107107 </v-btn >
108+ <v-btn
109+ icon
110+ variant =" text"
111+ size =" x-small"
112+ color =" primary"
113+ @click =" expandAll"
114+ >
115+ <v-icon size =" 24" >mdi-unfold-more-vertical</v-icon >
116+ </v-btn >
117+ <v-btn
118+ icon
119+ variant =" text"
120+ size =" x-small"
121+ color =" primary"
122+ @click =" collapseAll"
123+ >
124+ <v-icon size =" 24" >mdi-unfold-less-vertical</v-icon >
125+ </v-btn >
108126 </span >
109127 </v-row >
110128
111129 <json-viewer
112130 v-if =" !dense"
131+ :key =" jsonViewerKey"
113132 :value ="
114133 showFullMessage
115134 ? body
116135 : body.content[0].jsonContent.embeddedJsonContent.message
117136 "
118- :expand-depth =" jsonDepth "
137+ :expand-depth =" jsonDepthLocal "
119138 :copyable =" { copyText: 'Copier', copiedText: 'Copié !', timeout: 1000 }"
120139 expanded
121140 theme =" json-theme"
@@ -247,6 +266,19 @@ const sendAck = (refused = false) => {
247266 }
248267};
249268
269+ const jsonViewerKey = ref (0 );
270+ const jsonDepthLocal = ref (props .jsonDepth );
271+
272+ const expandAll = () => {
273+ jsonDepthLocal .value = 99 ;
274+ jsonViewerKey .value ++ ;
275+ };
276+
277+ const collapseAll = () => {
278+ jsonDepthLocal .value = 1 ;
279+ jsonViewerKey .value ++ ;
280+ };
281+
250282// on mounted, send ack if autoAckConfig is enabled
251283onMounted (() => {
252284 if (autoAckConfig .value ) {
You can’t perform that action at this time.
0 commit comments