You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/button/demo/loading.vue

43 lines
878 B

<template>
<div>
<AntButton type="primary" loading>
Loading
</AntButton>
<AntButton type="primary" size="small" loading>
Loading
</AntButton>
<br />
<AntButton type="primary" :loading="loading" @click="enterLoading">
Click me!
</AntButton>
<AntButton type="primary" icon="poweroff" :loading="iconLoading" @click="enterIconLoading">
Click me!
</AntButton>
<br />
<AntButton shape="circle" loading />
<AntButton type="primary" shape="circle" loading />
</div>
</template>
<script>
import { Button } from 'antd'
export default {
data () {
return {
loading: false,
iconLoading: false,
}
},
methods: {
enterLoading () {
this.loading = true
},
enterIconLoading () {
this.iconLoading = true
},
},
components: {
AntButton: Button,
},
}
</script>