Skip to content

Commit

Permalink
feat: cancel command
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Mar 10, 2021
1 parent 8e676de commit 1431bf3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pages/scan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<!-- {{ currentScanPage }} / {{ currentScanQueue }} -->
<el-progress :percentage="currentScanPercent" :format="showCurrentScan"></el-progress>
<i v-if="currentScanPage" class="el-icon-loading"></i>
<el-button v-if="currentScanPercent" type="primary" @click="cancelTask">Cancel</el-button>
</div>

</el-row>
Expand Down Expand Up @@ -616,6 +617,10 @@ export default {
// console.log('res: ', res);
},
async cancelTask() {
this.socket.emit('cancel', {});
},
auth() {
if (this.socket.connected && this.$store.state.user?.uid && this.isNeedAuth) {
this.isNeedAuth = false;
Expand Down

0 comments on commit 1431bf3

Please sign in to comment.