Skip to content

Commit

Permalink
#78 exute start show loading in result tab (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
githubnameting authored Feb 14, 2022
1 parent 833e4c4 commit 4c613af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/page/Workspace/Notebook/CellBox/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<ActionButton :actions="actions" />
</div>
<div v-if="editType === 'Byzer-lang' || editType === 'Python'">
<div class="excute-result" v-if="status !== 'NEW'">
<div class="excute-result" v-if="status !== 'NEW' || loadingExcute" v-loading="loadingExcute">
<el-tabs v-model="activeTab" class="tabs_button">
<el-tab-pane label="Result" name="result">
<ExcuteResult :result="excuteResult" :status="status" :innerMaxHeight="innerMaxHeight" />
Expand Down Expand Up @@ -98,7 +98,8 @@ export default {
showAddCode: false,
editType: this.cellInfo.editType || 'Byzer-lang', // 编辑器类型
mdMode: 'preview',
innerMaxHeight: ''
innerMaxHeight: '',
loadingExcute: false
}
},
components: {
Expand Down Expand Up @@ -237,10 +238,13 @@ export default {
cell_id: this.cellInfo.id
}
try {
this.loadingExcute = true
const res = await this.excuteCell(params)
this.loadingExcute = false
this.jobId = res.data.job_id
this.getStatus(this.jobId)
} catch (err) {
this.loadingExcute = false
this.excuteResult = err.data
this.loading = false
this.changeStatus('-1')
Expand Down

0 comments on commit 4c613af

Please sign in to comment.