mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
32 lines
454 B
Markdown
32 lines
454 B
Markdown
# Basic
|
|
```html
|
|
<n-button @click="handleStart">
|
|
start
|
|
</n-button>
|
|
<n-button @click="handleFinish">
|
|
finish
|
|
</n-button>
|
|
<n-button @click="handleError">
|
|
error
|
|
</n-button>
|
|
```
|
|
```js
|
|
export default {
|
|
methods: {
|
|
handleStart() {
|
|
this.$NLoadingBar.start();
|
|
},
|
|
handleFinish() {
|
|
this.$NLoadingBar.finish();
|
|
},
|
|
handleError() {
|
|
this.$NLoadingBar.error();
|
|
}
|
|
}
|
|
};
|
|
```
|
|
```css
|
|
.n-button {
|
|
margin: 0 12px 8px 0;
|
|
}
|
|
``` |