

<el-button-group >
<el-button type="primary" :plain='currSelect1' size="mini" @click="changeTag(1)">图表信息</el-button>
<el-button type="primary" :plain='currSelect2' size="mini" @click="changeTag(2)">数据信息</el-button>
</el-button-group>
currSelect1:false,
currSelect2:true,
changeTag(num){
if(num == 1){
this.currSelect1=false;
this.currSelect2=true;
}else{
this.currSelect2=false;
this.currSelect1=true;
}
},
这个示例展示了如何使用Element UI的按钮组组件实现图表信息和数据信息的切换。currSelect1和currSelect2分别表示两个按钮的默认选中状态,changeTag方法用于切换选中状态。点击按钮会更新当前选中的标签,实现功能交互。
974

被折叠的 条评论
为什么被折叠?



