mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
33 lines
683 B
Markdown
33 lines
683 B
Markdown
# Async
|
|
|
|
```html
|
|
<n-button @click="handleClick">
|
|
Success
|
|
</n-button>
|
|
```
|
|
|
|
```css
|
|
.n-button {
|
|
margin: 0 12px 8px 0;
|
|
}
|
|
```
|
|
|
|
```js
|
|
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);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
};
|
|
```
|