Как правильно решить проблему с axios?
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
data() {
return {
form: {
customer_name: '',
customer_phone: '',
customer_message: '',
},
}
},
methods: {
sendOrder() {
this.$axios
.$post('/v1/order', this.form)
.then((response) => {
if (response.error) {
this.$swal({
icon: 'error',
title: response.message,
timerProgressBar: true,
})
}
})
.catch((error) => {
this.$swal({
icon: 'error',
title: Object.values(error.response.data.errors).flat().join(''),
timerProgressBar: true,
})
})
},
},
})
</script>
выдает
Property '$axios' does not exist on type 'CombinedVueInstance<Vue, { form: { customer_name: string; customer_phone: string; customer_message: string; }; page: { title: string; description: string; }; }, { sendOrder(): any; }, unknown, Readonly<Record<never, any>>>'.