< button v-if = "!loading" @ click = "submitForm" > 提交 </ button > < button v-else disabled > 加载中... </ button > </ div > </ template > < script > export default { data ( ) { return { loading : false methods : { async submitForm ( ) { this . loading = true try { // 提交逻辑 } finally { this . loading = false </ script >