Leon 2 years ago
parent
commit
22099bc6f5

+ 4 - 2
src/components/input/Slider.scss

@@ -18,7 +18,7 @@
     border-radius: 56px;
     left: 4px;
     top: 6px;
-    background-color: #ffffff66;
+    background-color: #ffffff;
     overflow: hidden;
 }
 
@@ -66,6 +66,7 @@
     height: 120px;
     align-items: center;
     justify-content: center;
+    pointer-events: none;
 }
 
 .slider-arrow-bg {
@@ -77,6 +78,7 @@
     height: 120px;
     align-items: center;
     justify-content: center;
+    pointer-events: none;
 }
 
 .slider-text {
@@ -149,7 +151,7 @@
     flex-direction: column;
     align-items: center;
     justify-content: center;
-    background-color: red;
+    // background-color: red;
 }
 
 .slider-tip-title {

+ 2 - 0
src/components/input/Slider.tsx

@@ -29,6 +29,7 @@ export default function (props: { onChanged?: Function, value?: number, edit?: b
     };
 
     const handleTouchMove = (event) => {
+        console.log('aaaa',isSliding)
         if (isSliding) {
             const { touches } = event;
             const touchX = touches[0].clientX;
@@ -49,6 +50,7 @@ export default function (props: { onChanged?: Function, value?: number, edit?: b
     };
 
     const handleTouchEnd = () => {
+        
         setIsSliding(false);
         if (props.onChanged) {
 

+ 1 - 1
src/features/food/FoodConsole.tsx

@@ -250,7 +250,7 @@ export default function Component(props: { addItem: Function, firstItem: any })
         }
         else {
             if (modeOn){
-                return -rpxToPx(60)
+                return 0//-rpxToPx(60)
             }
             else {
                 return 0