File tree Expand file tree Collapse file tree 2 files changed +6
-25
lines changed Expand file tree Collapse file tree 2 files changed +6
-25
lines changed Original file line number Diff line number Diff line change 25
25
/>
26
26
<span v-if =" node.key" class =" vjs-key" >{{ prettyKey }}:</span >
27
27
28
- <span class = " vjs-value__container " >
28
+ <span >
29
29
<brackets
30
30
v-if =" node.type !== 'content'"
31
31
:data =" node.content"
32
32
:collapsed-on-click-brackets =" collapsedOnClickBrackets"
33
33
@click =" onBracketsClick"
34
34
/>
35
35
36
- <template v-else >
37
- <span
38
- v-if =" customValueFormatter"
39
- :class =" valueClass"
40
- v-html =" customFormatter(node.content)"
41
- />
42
- <span v-else :class =" valueClass" >{{ defaultFormatter(node.content) }}</span >
43
- </template >
44
-
45
- <span v-if =" node.showComma" >,</span >
36
+ <span v-else :class =" valueClass" v-html =" valueFormatter(node.content)" />
46
37
47
38
<span v-if =" showLength && collapsed" class =" vjs-comment" > // {{ node.length }} items </span >
48
39
</span >
@@ -143,15 +134,17 @@ export default {
143
134
return text;
144
135
},
145
136
146
- customFormatter (data ) {
147
- return this .customValueFormatter
137
+ valueFormatter (data ) {
138
+ const basic = this .customValueFormatter
148
139
? this .customValueFormatter (
149
140
data,
150
141
this .node .key ,
151
142
this .node .path ,
152
143
this .defaultFormatter (data),
153
144
)
154
145
: this .defaultFormatter (data);
146
+
147
+ return this .node .showComma ? ` ${ basic} ,` : basic;
155
148
},
156
149
157
150
onBracketsClick () {
Original file line number Diff line number Diff line change 30
30
color : @comment-color ;
31
31
}
32
32
33
- .@{css-prefix} -value__container {
34
- white-space : nowrap ;
35
- & :after {
36
- content : ' ' ;
37
- clear : both ;
38
- }
39
- }
40
-
41
- .@{css-prefix} -value {
42
- float : left ;
43
- }
44
-
45
33
.@{css-prefix} -value__null {
46
34
.gen-value-style (@color-null );
47
35
}
You can’t perform that action at this time.
0 commit comments