左右两箭头控制按钮组左右移动,双击到最左或最右边,功能比较简单。如下所示
<template>
<div class="demoButtons">
<div class="buttonF">
<el-row style="height:30px ">
<el-col class="lableI"><i class="el-icon-arrow-left " @click="moveButtons('left')" @dblclick="moveSide('left')" /></el-col>
<el-col ref="buttonBody" class="buttonBody">
<el-row id="buttonRow" ref="buttonRow">
<el-tag :style="{
'width':buttonWidth+'px'}" v-for="(item, index) in buttonData" :key="index" :type="index == clickIndex ? '' : 'info'" @click="resetData(index, item)">
<el-tooltip v-if="item.name && item.name.length > parseInt(buttonWidth/12) -