<!-- 两个按钮之间只显示一个,满足条件就会触发一个按钮 --> <el-button v-if="leftTime>0" disabled>剩余{{leftTime}}s</el-button> <el-button v-else @click="getEmailCode">获取验证码</el-button>
v-if隐藏
原文:https://www.cnblogs.com/black-eyes/p/14300580.html