Browse Source

08/27 10:09

111
mo 4 years ago
parent
commit
478cbd8eed

+ 4 - 4
src/App.vue

@@ -297,20 +297,20 @@ input[type="number"] {
   }
 }
 ::-webkit-scrollbar {
-  width: 5px; /* 纵向滚动条*/
-  height: 5px; /* 横向滚动条 */
+  width: 8px; /* 纵向滚动条*/
+  height: 8px; /* 横向滚动条 */
   background-color: #fff;
 }
 
 /*定义滚动条轨道 内阴影*/
 ::-webkit-scrollbar-track {
-  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
+  -webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0);
   background-color: #fff;
 }
 
 /*定义滑块 内阴影*/
 ::-webkit-scrollbar-thumb {
-  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
+  -webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0);
   background-color: #d5d5d5;
 }
 .el-input.is-disabled .el-input__inner {

+ 7 - 4
src/views/teacherManager/teacherDetail/components/weeklyCalendar.vue

@@ -190,17 +190,20 @@ export default {
         //鼠标按下,计算当前元素距离可视区的距离
         let disX = e.clientX - oDiv.offsetLeft;
         let disY = e.clientY - oDiv.offsetTop;
-
+        let wrapW = document.querySelector('.timer').offsetWidth
+        let imgW = document.querySelector('.imgWrap').offsetWidth
+        console.log(imgW - wrapW)
         document.onmousemove = function (e) {
           //通过事件委托,计算移动的距离
           let l = e.clientX - disX;
           let t = e.clientY - disY;
-          console.log(oDiv.offsetWidth, l, oDiv.offsetLeft)
+          // console.log(oDiv.offsetWidth, l, oDiv.offsetLeft)
           //移动当前元素
+
           if (l > 0) {
             l = 0;
-          } else if (l < -978) {
-            l = -978
+          } else if (l < -(imgW - wrapW) + 2) {
+            l = -(imgW - wrapW) + 2
           }
 
           oDiv.style.left = l + "px";