Skip to content

Commit 6aed6fe

Browse files
committed
Added virtual lines and an autoHeight prop
1 parent e74d358 commit 6aed6fe

File tree

3 files changed

+10460
-12
lines changed

3 files changed

+10460
-12
lines changed

example/VirtualList.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66

77
<h3>Options:</h3>
88
<div class="options">
9+
<div>
10+
<label>virtualLines</label>
11+
<input v-model="state.virtualLines" type="number" />
12+
</div>
13+
<div>
14+
<label>autoHeight</label>
15+
<input v-model="state.autoHeight" type="checkbox" />
16+
</div>
917
<div>
1018
<label>showLine</label>
1119
<input v-model="state.showLine" type="checkbox" />
@@ -27,8 +35,9 @@
2735
<div class="block">
2836
<h3>vue-json-pretty(1000+ items):</h3>
2937
<vue-json-pretty
30-
style="height: 200px"
3138
:virtual="true"
39+
:virtualLines="state.virtualLines"
40+
:autoHeight="state.autoHeight"
3241
:data="state.data"
3342
:deep="state.deep"
3443
:show-line="state.showLine"
@@ -64,6 +73,8 @@ export default defineComponent({
6473
showLine: true,
6574
collapsedOnClickBrackets: true,
6675
deep: 3,
76+
virtualLines: 15,
77+
autoHeight: true
6778
});
6879
6980
watch(

0 commit comments

Comments
 (0)