mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
924 B
924 B
加载中
按钮有加载状态。
<n-button
:loading="loading"
@click="loading = !loading"
>
<template v-slot:icon>
<md-save />
</template>
加载中
</n-button>
<br>
<n-button
:loading="loading"
icon-placement="right"
@click="loading = !loading"
>
<template v-slot:icon>
<md-save />
</template>
加载中
</n-button>
<br>
<n-button
:loading="loading"
size="small"
@click="loading = !loading"
>
加载中
</n-button>
<br>
<n-button
:loading="loading"
size="large"
@click="loading = !loading"
>
加载中
</n-button>
<br>
<n-button
:loading="loading"
type="primary"
size="large"
round
@click="loading = !loading"
>
加载中
</n-button>
import mdSave from 'naive-ui/lib/icons/md-save'
export default {
components: {
mdSave
},
data () {
return {
loading: false
}
}
}
.n-button {
margin: 0 8px 8px 0;
}