naive-ui/demo/documentation/components/loadingBar/enUS/basic.md
2019-10-08 14:14:30 +08:00

454 B

Basic

<n-button @click="handleStart">
  start
</n-button>
<n-button @click="handleFinish">
  finish
</n-button>
<n-button @click="handleError">
  error
</n-button>
export default {
  methods: {
    handleStart() {
      this.$NLoadingBar.start();
    },
    handleFinish() {
      this.$NLoadingBar.finish();
    },
    handleError() {
      this.$NLoadingBar.error();
    }
  }
};
.n-button {
  margin: 0 12px 8px 0;
}