Browse Source

增加选填

zhangchao 4 years ago
parent
commit
95aceb0b42
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      src/RichTextEditor.js

+ 5
- 4
src/RichTextEditor.js View File

200
   }
200
   }
201
 
201
 
202
   _renderLinkModal() {
202
   _renderLinkModal() {
203
-    const {linkOption} = this.props;
203
+    const {linkOption,optionalText} = this.props;
204
     return (
204
     return (
205
         <Modal
205
         <Modal
206
             animationType={"fade"}
206
             animationType={"fade"}
213
               <Text style={styles.inputTitle}>{linkOption.titleText}</Text>
213
               <Text style={styles.inputTitle}>{linkOption.titleText}</Text>
214
               <View style={styles.inputWrapper}>
214
               <View style={styles.inputWrapper}>
215
                 <TextInput
215
                 <TextInput
216
-                    style={styles.input}
217
-                    onChangeText={(text) => this.setState({linkTitle: text})}
218
-                    value={this.state.linkTitle}
216
+                  style={styles.input}
217
+                  onChangeText={(text) => this.setState({linkTitle: text})}
218
+                  value={this.state.linkTitle}
219
+                  placeholder={optionalText}
219
                 />
220
                 />
220
               </View>
221
               </View>
221
               <Text style={[styles.inputTitle ,{marginTop: 10}]}>{linkOption.urlText}</Text>
222
               <Text style={[styles.inputTitle ,{marginTop: 10}]}>{linkOption.urlText}</Text>