|
@@ -76,19 +76,23 @@ export default {
|
|
|
console.log(this.floorIdArr)
|
|
|
const len = this.floorIdArr.length
|
|
|
let index = this.floorIdArr.findIndex(item => item === this.currentFloorId)
|
|
|
- console.log(index)
|
|
|
-
|
|
|
- if (flag) {
|
|
|
- this.currentFloorId = this.floorIdArr[index--]
|
|
|
- } else {
|
|
|
- this.currentFloorId = this.floorIdArr[index++]
|
|
|
+ console.log('---------------index:', index, '--------------')
|
|
|
+ if (flag === 1) {
|
|
|
+ index--
|
|
|
+ this.currentFloorId = this.floorIdArr[index]
|
|
|
+ } else if (flag === -1) {
|
|
|
+ index++
|
|
|
+ this.currentFloorId = this.floorIdArr[index]
|
|
|
}
|
|
|
- console.log(this.currentFloorId)
|
|
|
-
|
|
|
+ // 最上最下处理
|
|
|
if (index === 0) {
|
|
|
+ this.currentFloorId = this.floorIdArr[0]
|
|
|
+ console.log('currentFloorId', this.currentFloorId)
|
|
|
this.showT = false
|
|
|
this.showB = true
|
|
|
} else if (index === len - 1) {
|
|
|
+ this.currentFloorId = this.floorIdArr[len - 1]
|
|
|
+ console.log('currentFloorId', this.currentFloorId)
|
|
|
this.showT = true
|
|
|
this.showB = false
|
|
|
}
|
|
@@ -167,7 +171,7 @@ export default {
|
|
|
text-align: center;
|
|
|
.floor-out {
|
|
|
height: 160px;
|
|
|
- height: 290px;
|
|
|
+ height: 312px;
|
|
|
//TODO:
|
|
|
overflow: hidden;
|
|
|
// overflow-y: auto;
|
|
@@ -177,6 +181,8 @@ export default {
|
|
|
// }
|
|
|
|
|
|
.floor-center {
|
|
|
+ // TODO:
|
|
|
+ margin-top: 0 !important;
|
|
|
.floor-item {
|
|
|
width: 36px;
|
|
|
height: 32px;
|