公司新启动了一个后台项目,在使用element-ui的多层弹窗时发现第一次点击时会刷新页面,后来经过多次测试发现是在弹窗上使用btn的缘故,无论是原生btn还是el-btn都会触发这个bug,所以只能使用其他标签伪装成btn来触发点击事件
‘<div class="btn_addStation" @click="dialogFormStation = true">新 增’
‘.btn_addStation { float: right; height: 34px; width: 80px; background-color: #fff; border: 1px solid #4c70e8; text-align: center; line-height: 34px; color: #4c70e8; cursor: pointer; }’