I want to pop up a dialog, with two input every time axios sends a request. What should I do with elementUI?

I don"t want to write an extra dialog,. I want to use the wheel built by elementUI. If I can"t satisfy it, I have to write it myself

.

I can play one messageBox, at a time now, but I don"t know how to play dialog with two input boxes

// request interceptor
service.interceptors.request.use(config => {
  MessageBox("", "", {
    confirmButtonText: ""
  })
  // Do something before request is sent
  if (getToken()) {
    config.headers["token"] = getToken()
  } else {
    console.log("token")
  }
  return config
}, error => {
  // Do something with request error
  console.log(error) // for debug
  Promise.reject(error)
})

write a dialog component to hang on DOM, which is hidden by default, and can be displayed by DOM during callback


is not in the vue example. Maybe you don't have Vue.use (elementUi)?

Menu