...
|
...
|
@@ -17,6 +17,7 @@ import { |
|
|
Easing,
|
|
|
ScrollView,
|
|
|
NativeModules,
|
|
|
Alert,
|
|
|
} from 'react-native'
|
|
|
|
|
|
import AssertsPicker from './AssertsPicker';
|
...
|
...
|
@@ -79,6 +80,9 @@ export default class Posting extends Component { |
|
|
}
|
|
|
|
|
|
showBoardPannel() {
|
|
|
if (this.props.fromSection) {
|
|
|
return;
|
|
|
}
|
|
|
this.boardInView= true;
|
|
|
|
|
|
this.setState({boardState:this.boardSelectionHeight,imageState:0});
|
...
|
...
|
@@ -147,6 +151,8 @@ export default class Posting extends Component { |
|
|
maxLength={30}
|
|
|
numberOfLines={1}
|
|
|
autoFocus={true}
|
|
|
autoCapitalize={'none'}
|
|
|
autoCorrect={false}
|
|
|
onChangeText={
|
|
|
(text)=>{
|
|
|
this.titleLength = text.length;
|
...
|
...
|
@@ -155,7 +161,9 @@ export default class Posting extends Component { |
|
|
}
|
|
|
onKeyPress={
|
|
|
(event)=>{
|
|
|
|
|
|
if (this.titleLength>=30) {
|
|
|
Alert.alert('抱歉','超出30字符最长限制');
|
|
|
console.log('满了');
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -177,9 +185,11 @@ export default class Posting extends Component { |
|
|
this.props.contentEdited(text);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
onKeyPress={
|
|
|
(event)=>{
|
|
|
if (this.contentLength>=2000) {
|
|
|
Alert.alert('抱歉','超出2000字符最长限制');
|
|
|
console.log('满了');
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -215,10 +225,11 @@ export default class Posting extends Component { |
|
|
<View style={[styles.boardSelectionContainer,{height:this.state.boardState,}]} opacity={this.state.boardState}>
|
|
|
<View style={styles.boardSelectionScroll}>
|
|
|
{this.props.boards.map((item,i)=>{
|
|
|
let bgColor = item.forumName === this.props.selectedBoard?'#cccccc':'white'
|
|
|
return(
|
|
|
<Text
|
|
|
key={i}
|
|
|
style={styles.boardSelectionItem}
|
|
|
style={[styles.boardSelectionItem,{backgroundColor: bgColor}]}
|
|
|
onPress={event=>{
|
|
|
this.props.onBoardPress(item.forumName,item.forumCode);
|
|
|
// this.blurAll();
|
...
|
...
|
@@ -249,7 +260,7 @@ const styles = StyleSheet.create({ |
|
|
left: 0,
|
|
|
top:0,
|
|
|
height:44,
|
|
|
padding:15,
|
|
|
padding:14,
|
|
|
color: 'black',
|
|
|
fontSize: 15,
|
|
|
},
|
...
|
...
|
|