naive-ui/demo/documentation/components/confirm/enUS/async.md
songwanli2025@163.com 4f90dd3b05 merge from upstream
2019-12-17 14:36:37 +08:00

683 B

Async

<n-button @click="handleClick">
  Success
</n-button>
.n-button {
  margin: 0 12px 8px 0;
}
export default {
  methods: {
    handleClick(e) {
      const confirmInstance = this.$NConfirm.success({
        title: "Success",
        content:
          "Premium designed icons for use in web, iOS, Android, and desktop apps. Support for SVG and web font. Completely open source, MIT licensed and built by the Ionic Framework team.",
        onPositiveClick: hide => {
          confirmInstance.loading = true;
          this.$NMessage.success("count down 1 second");
          window.setTimeout(hide, 1000);
        }
      });
    }
  }
};