|
|
@@ -78,8 +78,8 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
style() {
|
|
|
- const { height, background } = this;
|
|
|
- return { height, "line-height": height, background };
|
|
|
+ const {height, background} = this;
|
|
|
+ return {height, "line-height": height, background};
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -125,7 +125,7 @@ export default {
|
|
|
const downX = event.clientX;
|
|
|
//三、给文档注册鼠标移动事件
|
|
|
document.onmousemove = (e) => {
|
|
|
- //1.获取鼠标移动后的水平位置
|
|
|
+ //1.获取鼠标移动后的水平位置
|
|
|
const moveX = e.clientX;
|
|
|
//2.得到鼠标水平位置的偏移量(鼠标移动时的位置 - 鼠标按下时的位置)
|
|
|
let offsetX = moveX - downX;
|