File tree Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change
1
+ export default function ( count = 1 ) {
2
+ // @vue /component
3
+ return {
4
+ data ( ) {
5
+ return {
6
+ displayPriority : 0
7
+ }
8
+ } ,
9
+
10
+ mounted ( ) {
11
+ this . runDislayPriority ( )
12
+ } ,
13
+
14
+ methods : {
15
+ runDislayPriority ( ) {
16
+ const step = ( ) => {
17
+ requestAnimationFrame ( ( ) => {
18
+ this . displayPriority ++
19
+ if ( this . displayPriority < count ) {
20
+ step ( )
21
+ }
22
+ } )
23
+ }
24
+ step ( )
25
+ }
26
+ }
27
+ }
28
+ }
Original file line number Diff line number Diff line change 74
74
</VueGroup >
75
75
</div >
76
76
77
- <div class =" content" >
77
+ <div v-if = " displayPriority >= 2 " class =" content" >
78
78
<TerminalView
79
79
ref =" terminal"
80
80
:class =" {
130
130
131
131
<script >
132
132
import Prompts from ' ../mixins/Prompts'
133
+ import DisplayPriority from ' ../mixins/DisplayPriority'
133
134
134
135
import TASK from ' ../graphql/task.gql'
135
136
import TASK_LOGS from ' ../graphql/taskLogs.gql'
@@ -154,7 +155,8 @@ export default {
154
155
Prompts ({
155
156
field: ' task' ,
156
157
query: TASK
157
- })
158
+ }),
159
+ DisplayPriority (2 )
158
160
],
159
161
160
162
metaInfo () {
@@ -192,6 +194,9 @@ export default {
192
194
await this .$nextTick ()
193
195
this .currentView = data .task .defaultView
194
196
}
197
+ },
198
+ skip () {
199
+ return this .displayPriority < 1
195
200
}
196
201
},
197
202
@@ -212,6 +217,9 @@ export default {
212
217
data .taskLogs .logs .forEach (terminal .addLog )
213
218
}
214
219
}
220
+ },
221
+ skip () {
222
+ return this .displayPriority < 2
215
223
}
216
224
},
217
225
@@ -229,6 +237,9 @@ export default {
229
237
const terminal = this .$refs .terminal
230
238
terminal .addLog (data .taskLogAdded )
231
239
}
240
+ },
241
+ skip () {
242
+ return this .displayPriority < 2
232
243
}
233
244
}
234
245
}
@@ -254,6 +265,7 @@ export default {
254
265
this .currentView = ' _output'
255
266
this .$_init = false
256
267
this .open ()
268
+ this .runDisplayPriority ()
257
269
}
258
270
},
259
271
You can’t perform that action at this time.
0 commit comments