File tree Expand file tree Collapse file tree 5 files changed +1389
-899
lines changed
Expand file tree Collapse file tree 5 files changed +1389
-899
lines changed Original file line number Diff line number Diff line change 11<script >
22import Vue from ' vue' ;
33import ExpandingList from ' @/ExpandingList' ;
4+ import VirtualScroll from ' @/VirtualScroll' ;
45
56export default Vue .extend ({
67 name: ' ServeDev' ,
78 components: {
89 ExpandingList,
10+ VirtualScroll,
911 },
1012 data () {
1113 return {
1214 expandedGroup: - 1 ,
15+ flatItems: [1 , 2 , 3 , 4 ],
1316 items: {
1417 number: [
1518 1 ,
@@ -120,16 +123,31 @@ export default Vue.extend({
120123
121124<template >
122125 <div id =" app" >
123- <ExpandingList
124- :items =" items"
125- :expanded-group =" expandedGroup"
126- @expand =" onExpandGroup" >
127- <template #group =" { item } " >
128- <span v-text =" item" />
129- </template >
130- <template #item =" { item } " >
131- <li v-text =" item" />
132- </template >
133- </ExpandingList >
126+ <div class =" horizontal-wrapper" >
127+ <ExpandingList
128+ :items =" items"
129+ :expanded-group =" expandedGroup"
130+ @expand =" onExpandGroup" >
131+ <template #group =" { item } " >
132+ <span v-text =" item" />
133+ </template >
134+ <template #item =" { item } " >
135+ <li v-text =" item" />
136+ </template >
137+ </ExpandingList >
138+ <VirtualScroll :items =" flatItems" >
139+ <template #item =" { item } " >
140+ <li v-text =" item" />
141+ </template >
142+ </VirtualScroll >
143+ </div >
134144 </div >
135145</template >
146+
147+ <style lang="scss" scoped>
148+ .horizontal-wrapper {
149+ display : grid ;
150+ grid-column-gap : 24px ;
151+ grid-template-columns : max-content max-content ;
152+ }
153+ </style >
You can’t perform that action at this time.
0 commit comments