File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed
Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 7777 </VueGroup >
7878 </div >
7979
80- <div v-if =" displayPriority >= 2" class =" content" >
80+ <div v-if =" !defer(3)" class =" content placeholder-content" >
81+ <div class =" view card" />
82+ </div >
83+
84+ <div v-else class =" content" >
8185 <TerminalView
8286 ref =" terminal"
8387 :class =" {
133137
134138<script >
135139import Prompts from ' @/mixins/Prompts'
136- import DisplayPriority from ' @/mixins/DisplayPriority '
140+ import Defer from ' @/mixins/Defer '
137141
138142import TASK from ' @/graphql/task/task.gql'
139143import TASK_LOGS from ' @/graphql/task/taskLogs.gql'
@@ -159,7 +163,7 @@ export default {
159163 field: ' task' ,
160164 query: TASK
161165 }),
162- DisplayPriority ( 2 )
166+ Defer ( )
163167 ],
164168
165169 metaInfo () {
@@ -199,7 +203,7 @@ export default {
199203 }
200204 },
201205 skip () {
202- return this .displayPriority < 1
206+ return ! this .defer ( 2 )
203207 }
204208 },
205209
@@ -222,7 +226,7 @@ export default {
222226 }
223227 },
224228 skip () {
225- return this .displayPriority < 2
229+ return ! this .defer ( 3 )
226230 }
227231 },
228232
@@ -242,7 +246,7 @@ export default {
242246 }
243247 },
244248 skip () {
245- return this .displayPriority < 2
249+ return ! this .defer ( 3 )
246250 }
247251 }
248252 }
@@ -259,6 +263,7 @@ export default {
259263 return id
260264 }
261265 }
266+ return null
262267 }
263268 },
264269
@@ -370,6 +375,7 @@ export default {
370375 margin 0 $padding-item $padding-item
371376 position relative
372377
378+ .placeholder-content .view ,
373379.terminal-view
374380 position absolute
375381 top 0
Original file line number Diff line number Diff line change 1- export default function ( count = 1 ) {
1+ export default function ( count = 10 ) {
22 // @vue /component
33 return {
44 data ( ) {
@@ -13,6 +13,7 @@ export default function (count = 1) {
1313
1414 methods : {
1515 runDisplayPriority ( ) {
16+ this . displayPriority = 0
1617 const step = ( ) => {
1718 requestAnimationFrame ( ( ) => {
1819 this . displayPriority ++
@@ -22,6 +23,10 @@ export default function (count = 1) {
2223 } )
2324 }
2425 step ( )
26+ } ,
27+
28+ defer ( priority ) {
29+ return this . displayPriority >= priority
2530 }
2631 }
2732 }
You can’t perform that action at this time.
0 commit comments