<div class="operate"> <el-button>提交项目</el-button> <el-button type="primary">新建任务</el-button> </div> <el-tabs v-model="taskType" type="card"> <el-tab-pane label="常规任务" name="normal"> 常规任务 </el-tab-pane> <el-tab-pane label="修正任务" name="amendment"> 修正任务 </el-tab-pane> </el-tabs>
这样operate绝对定位后,el-button可能被el-tabs覆盖,所以不显示hover样式,此时将operate放在el-tabs后面,即:
<el-tabs v-model="taskType" type="card"> <el-tab-pane label="常规任务" name="normal"> 常规任务 </el-tab-pane> <el-tab-pane label="修正任务" name="amendment"> 修正任务 </el-tab-pane> </el-tabs> <div class="operate"> <el-button>提交项目</el-button> <el-button type="primary">新建任务</el-button> </div>