8
8
import { Component , Fragment } from 'react' ;
9
9
import Taro from '@tarojs/taro' ;
10
10
import { NativeModules } from 'react-native' ;
11
- import { View , Text , Image , Input , Button } from '@tarojs/components'
11
+ import { View , Text , Image } from '@tarojs/components'
12
12
import './index.scss'
13
13
14
14
const DevManager = NativeModules . RNDevManager ;
@@ -18,7 +18,6 @@ export default class Index extends Component<any, any> {
18
18
constructor ( props : any ) {
19
19
super ( props ) ;
20
20
this . state = {
21
- inputValue : 'localhost:8081' ,
22
21
list : [ ] ,
23
22
} ;
24
23
}
@@ -88,19 +87,6 @@ export default class Index extends Component<any, any> {
88
87
} )
89
88
}
90
89
91
- _onInputChange = e => {
92
- const value = e . detail . value ;
93
- this . setState ( {
94
- inputValue : value
95
- } ) ;
96
- }
97
-
98
- _onPressLoad = e => {
99
- const { inputValue } = this . state ;
100
- this . _loadBundleByUrl ( inputValue ) ;
101
- this . _saveUrlToStorage ( inputValue ) ;
102
- }
103
-
104
90
_clearBundles = async ( ) => {
105
91
try {
106
92
const res = await Taro . showModal ( { title : '确定清空吗?' , content : '清空后历史数据将不再保存' , confirmColor : '#6190E8' } ) ;
@@ -118,7 +104,7 @@ export default class Index extends Component<any, any> {
118
104
}
119
105
120
106
render ( ) {
121
- const { list = [ ] , inputValue } = this . state ;
107
+ const { list = [ ] } = this . state ;
122
108
return (
123
109
< View className = 'index' >
124
110
< View className = 'info' >
@@ -130,25 +116,12 @@ export default class Index extends Component<any, any> {
130
116
</ View >
131
117
< View className = 'load' >
132
118
< View className = 'load-header' >
133
- < Input
134
- name = 'input'
135
- type = 'text'
136
- placeholder = '请输入IP:8081'
137
- value = { inputValue }
138
- onInput = { this . _onInputChange }
139
- className = 'load-header-input'
140
- > </ Input >
141
119
< Image
142
120
src = { require ( '../../assets/common/icon_scan.png' ) }
143
121
className = 'load-header-icon'
144
122
onClick = { this . _onPressScan }
145
123
/>
146
124
</ View >
147
- < Button
148
- type = 'primary'
149
- className = 'load-btn'
150
- onClick = { this . _onPressLoad }
151
- > 加载</ Button >
152
125
</ View >
153
126
{ list . length > 0 && (
154
127
< View className = 'bundle' >
0 commit comments