Skip to content

Commit 97a51ef

Browse files
committed
fix: Missing comma #149
1 parent a1770fe commit 97a51ef

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

build/webpack.base.conf.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ module.exports = {
5050
{
5151
test: /\.vue$/,
5252
loader: 'vue-loader',
53+
options: {
54+
compilerOptions: {
55+
preserveWhitespace: false,
56+
},
57+
},
5358
},
5459
{
5560
test: /\.js[x]$/,

src/components/Brackets/index.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<template>
2-
<span class="vjs-tree__brackets" @click.stop="toggleBrackets">
3-
{{ data }}
4-
</span>
2+
<span class="vjs-tree__brackets" @click.stop="toggleBrackets">{{ data }}</span>
53
</template>
64

75
<script>

src/components/TreeNode/index.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,15 @@
3333
@click="onBracketsClick"
3434
/>
3535

36-
<span v-else-if="customValueFormatter" :class="valueClass" v-html="valueFormatter(node.content)"></span>
36+
<span
37+
v-else-if="customValueFormatter"
38+
:class="valueClass"
39+
v-html="valueFormatter(node.content)"
40+
></span>
3741
<span v-else :class="valueClass" v-text="valueFormatter(node.content)" />
3842

43+
<span v-if="node.showComma">,</span>
44+
3945
<span v-if="showLength && collapsed" class="vjs-comment"> // {{ node.length }} items </span>
4046
</span>
4147
</div>
@@ -141,11 +147,11 @@ export default {
141147
data,
142148
this.node.key,
143149
this.node.path,
144-
this.defaultFormatter(data),
150+
this.defaultFormatter(data)
145151
)
146152
: this.defaultFormatter(data);
147153
148-
return this.node.showComma ? `${basic},` : basic;
154+
return basic;
149155
},
150156
151157
onBracketsClick() {

0 commit comments

Comments
 (0)