In vue+typescript, use axios to report an error?

uses axios, in a new typescript project in vue-cli3.0, so it introduces

in main.ts.
import axios from "axios";
Vue.prototype.$axios = axios;
axios.defaults.baseURL = "http://192.168.1.225:8088";

error is reported in vue file

this is the method I used in js before. This time I started to use ts to report an error. How should I solve it? Thank you for your answer, thank you


in ts, $axios, cannot be hung on the prototype chain if it is not recognized under vue. It can be used in another way

import axios from 'axios'
import Vueaxios from 'vue-axios'
Vue.use(Vueaxios, axios)

then this.axios directly in vue


import axios form 'axios';
axios.post(
...
)

this.$XXX needs to be mounted in new vue

such as this.$router
this.$store
this.$t ()
this

import axios from 'axios' Direct axios. Just use it

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c2229a-32e1b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c2229a-32e1b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?