Vue vux use, $vux.confirm how to stop running down

when using the confirm confirmation box of vux, the pop-up box comes out, but the program has not yet been confirmed, and the program has continued to run. May I ask how to solve this problem, such as. Then, you have to run well above before you continue to run below, or is there something wrong with my code?

clipboard.png

clipboard.png

this section is written in the service.interceptors.response of axios
ask for help on how to solve


was invited for the second time, so I checked the document . It doesn't say that confirm () will return a Promise object, so naturally you can't use .then () only callbacks.

so why doesn't the subject take a look at the document himself? You have chosen to use this component library, can't you take a good look at the document?

if you want to use Promise, you can package it yourself and go to this issue to declare your position.

export const myConfirm(options) {
  return new Promise((resolve, reject) => {
    Vue.$vux.confirm({
      ...options,
      onConfirm() {
        resolve();
      },
      onCancel() {
        reject();
      },
    });
  });
}
Menu