[feat][V]:添加axios简单用例

master
Romesum 5 years ago
parent 061b10da10
commit d9f1ca0401

@ -1,30 +1,36 @@
<template>
<div id="app">
<img src="../assets/logo.png">
<div>
<el-button @click="startHacking">Start</el-button>
<div id="app">
<img src="../assets/logo.png">
<div>
<el-button @click="startHacking">Start</el-button>
</div>
</div>
</div>
</template>
<script>
export default {
methods: {
startHacking () {
this.$notify({
title: 'It works!',
type: 'success',
message: 'We\'ve laid the ground work for you. It\'s time for you to build something epic!',
duration: 5000
})
import {post} from "~/utils";
export default {
methods: {
async startHacking() {
this.$notify({
title: 'It works!',
type: 'success',
message: 'We\'ve laid the ground work for you. It\'s time for you to build something epic!',
duration: 5000
})
await post('lb/lab/test', {
data: 'data'
})
}
}
}
}
}
</script>
<style>
#app {
font-family: Helvetica, sans-serif;
text-align: center;
}
#app {
font-family: Helvetica, sans-serif;
text-align: center;
}
</style>

Loading…
Cancel
Save