调试发现:disabled绑定的值和显示没有保持一致,发现是disabled属性失效
解决方式:
给标签添加key
比如:key=“isOldVersion”
<el-form-item>
<el-button type="primary" style="margin-left: 100px;" @click="snoreDialogVisible=false">返回</el-button>
<el-button v-if="isNewVersion==false" key="isOldVersion" type="danger" style="margin-left: 100px;" @click="endSnoreParams">设置</el-button>
<el-button v-if="isNewVersion" key="isNewVersion" type="danger" style="margin-left: 100px;" :disabled="selectBedSide===''" @click="endSnoreParams">设置</el-button>
</el-form-item>