Skip to content

Commit 681628c

Browse files
author
Daniel
authored
Merge pull request #110 from LukeFinch/dev
#109 Prop to set visibleCount number of lines in virtual mode
2 parents e74d358 + 3ee5972 commit 681628c

File tree

3 files changed

+10451
-15
lines changed

3 files changed

+10451
-15
lines changed

example/VirtualList.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66

77
<h3>Options:</h3>
88
<div class="options">
9-
<div>
9+
<div>
10+
<label>virtualLines</label>
11+
<input v-model="state.virtualLines" type="number" />
12+
</div>
13+
<div>
1014
<label>showLine</label>
1115
<input v-model="state.showLine" type="checkbox" />
1216
</div>
@@ -27,8 +31,9 @@
2731
<div class="block">
2832
<h3>vue-json-pretty(1000+ items):</h3>
2933
<vue-json-pretty
30-
style="height: 200px"
34+
style="height:400px"
3135
:virtual="true"
36+
:virtualLines="state.virtualLines"
3237
:data="state.data"
3338
:deep="state.deep"
3439
:show-line="state.showLine"
@@ -64,7 +69,8 @@ export default defineComponent({
6469
showLine: true,
6570
collapsedOnClickBrackets: true,
6671
deep: 3,
67-
});
72+
virtualLines: 20,
73+
});
6874
6975
watch(
7076
() => state.val,

0 commit comments

Comments
 (0)