Adding a default catch to the fetch function

后端 未结 0 1789
青春惊慌失措
青春惊慌失措 2020-12-01 18:07

I use Vue mixings to have a global way to send requests to an API:

Vue.mixin({
  methods: {
    api (method, path, data = null) {
      const init = { /* ...          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题