|
@@ -266,16 +266,18 @@
|
|
|
<el-button type="primary" icon="el-icon-plus" size="mini" circle @click="addAddress"
|
|
|
style="margin-right: 1.25rem;"></el-button>
|
|
|
</el-tooltip>
|
|
|
-<!-- <el-tooltip v-else class="item" effect="dark" content="移动" placement="left">-->
|
|
|
-<!-- <div>-->
|
|
|
-<!-- <div class="single">-->
|
|
|
-<!-- <el-button type="text" icon="el-icon-arrow-up" size="mini"></el-button>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- <div class="single">-->
|
|
|
-<!-- <el-button type="text" icon="el-icon-arrow-down" size="mini"></el-button>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </div>-->
|
|
|
-<!-- </el-tooltip>-->
|
|
|
+ <div v-else style="margin: -5px auto">
|
|
|
+ <el-tooltip class="item" effect="dark" content="向上移动" placement="right" v-if="scope.$index > 1">
|
|
|
+ <div class="single" style="margin-bottom: -5px">
|
|
|
+ <el-button type="text" style="margin-right: -0.5rem" icon="el-icon-arrow-up" size="mini" @click="moveUp(scope.row,scope.$index)"></el-button>
|
|
|
+ </div>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-tooltip class="item" effect="dark" content="向下移动" placement="right" v-if="scope.$index > 0 && scope.$index < tableData.length-2">
|
|
|
+ <div class="single" style="margin-top: -5px">
|
|
|
+ <el-button type="text" style="margin-right: -0.5rem" icon="el-icon-arrow-down" size="mini" @click="moveDown(scope.row,scope.$index)"></el-button>
|
|
|
+ </div>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -1814,6 +1816,12 @@ export default {
|
|
|
addAddress() {
|
|
|
this.tableData.splice(this.tableData.length - 1, 0, {})
|
|
|
},
|
|
|
+ moveUp(row,index){
|
|
|
+ this.tableData[index] = this.tableData.splice(index -1 ,1,row)[0]
|
|
|
+ },
|
|
|
+ moveDown(row,index){
|
|
|
+ this.tableData[index] = this.tableData.splice(index +1 ,1,row)[0]
|
|
|
+ },
|
|
|
//返回主列表
|
|
|
backToList(value) {
|
|
|
if (value === 0) {
|
|
@@ -2164,6 +2172,6 @@ export default {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
.single ::v-deep .el-button--mini{
|
|
|
- padding: 0 15px;
|
|
|
+ padding: 0 0 !important;
|
|
|
}
|
|
|
</style>
|