在 Vue.js 中使用 element-ui 的 el-button 组件时,可以通过在绑定的按钮上使用 disabled 属性来判断是否禁用按钮。

例如:

<template>
  <el-button :disabled="isDisabled">点我</el-button>
</template>

<script>
export default {
  data() {
    return {
      isDisabled: true,
    }
  },
}
</script>
Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐