Skip to content

Commit

Permalink
Added TryFunction(URL) on front-end.
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowing committed Mar 10, 2020
1 parent a03268c commit ab63598
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions web/src/utils/api.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ export default {
} catch (err) {
throw new Error(err);
}
},
async TryFunction(url){
try{
await this.axios.get(url);
}catch(err){
this.$notify.error({
title: "Error",
message: err
})
}
}
}
};
Expand Down
2 changes: 2 additions & 0 deletions web/src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
<el-button round icon="el-icon-refresh-right" @click="form.queries = []">Flush queries</el-button>

<el-input :placeholder="URL" readonly></el-input>

<el-button round icon="el-icon-video-play" @click="TryFunction(URL)">Try!</el-button>
</el-form>
</div>
</template>
Expand Down

0 comments on commit ab63598

Please sign in to comment.