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

master
Romesum 5 years ago
parent 061b10da10
commit d9f1ca0401

@ -8,23 +8,29 @@
</template> </template>
<script> <script>
export default { import {post} from "~/utils";
export default {
methods: { methods: {
startHacking () {
async startHacking() {
this.$notify({ this.$notify({
title: 'It works!', title: 'It works!',
type: 'success', type: 'success',
message: 'We\'ve laid the ground work for you. It\'s time for you to build something epic!', message: 'We\'ve laid the ground work for you. It\'s time for you to build something epic!',
duration: 5000 duration: 5000
}) })
await post('lb/lab/test', {
data: 'data'
})
}
} }
} }
}
</script> </script>
<style> <style>
#app { #app {
font-family: Helvetica, sans-serif; font-family: Helvetica, sans-serif;
text-align: center; text-align: center;
} }
</style> </style>

Loading…
Cancel
Save