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
898 B

<template>
<div>
<AntButton type="primary" loading>
Loading
</AntButton>
<AntButton type="primary" size="small" loading>
Loading
</AntButton>
<br />
<AntButton type="primary" :loading="loading" @mouseenter="enterLoading">
mouseenter me!
</AntButton>
<AntButton type="primary" icon="poweroff" :loading="iconLoading" @click="enterIconLoading">
1s
</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 = { delay: 1000 }
},
},
components: {
AntButton: Button,
},
}
</script>