Преглед на файлове

1.修改SeekBar的使用方法

zhangmengjie преди 5 години
родител
ревизия
6f40eeadb1
променени са 1 файла, в които са добавени 5 реда и са изтрити 2 реда
  1. 5 2
      pages/components/SeekBar.js

+ 5 - 2
pages/components/SeekBar.js

@@ -205,7 +205,10 @@ const styles = StyleSheet.create({});
             progress={this.state.curprogress}
           />
 
-
+  state = {
+    curprogress: 0,
+    max: 100
+  };
  touch_up_callback(progress) {
     //抬起之后,获取算出来的progress
     this.setState({
@@ -222,7 +225,7 @@ const styles = StyleSheet.create({});
         });
       }
 
-      if (this.state.curprogress >= 100) {
+      if (this.state.curprogress >= this.state.max) {
         alert("100了");
       } else {
         this.setProgressIcon();