| | |
| | | <!-- |
| | | * @Date: 2024-01-05 23:47:53 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-20 20:58:01 |
| | | * @LastEditTime: 2024-01-20 21:04:26 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/mapPreview/Map.vue |
| | | --> |
| | | <template> |
| | |
| | | }, |
| | | id: { |
| | | handler () { |
| | | |
| | | if (this.move) { |
| | | this.marginLeft = 0 |
| | | this.$nextTick(() => { |
| | | let {width} = document.querySelector('.table div').getBoundingClientRect() |
| | | let {width: tableW} = document.querySelector('.table').getBoundingClientRect() |
| | | clearTimeout(timer) |
| | | if (width > tableW) { |
| | | this.leftMax = width - tableW |
| | | clearTimeout(timer) |
| | | this.moveFn() |
| | | } else { |
| | | this.leftMax = 0 |
| | | this.marginLeft = 0 |
| | | } |
| | | }) |
| | | } |