Skip to content

Commit dad46f1

Browse files
committed
修改 Dialog 取消和确定按钮位置 修改框选图层 属性页面 图层名称最多显示2行
1 parent 20c5e59 commit dad46f1

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

‎src/components/Dialog/Dialog.js‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,25 +85,25 @@ export default class Dialog extends PureComponent {
8585
if (!this.props.showBtns) return null
8686
return (
8787
<View style={this.props.onlyOneBtn ? styles.oneBtn : styles.btns}>
88-
{this.props.confirmBtnVisible && (
88+
{this.props.cancelBtnVisible && (
8989
<TouchableOpacity
9090
activeOpacity={this.props.activeOpacity}
91-
style={[styles.btnStyle, this.props.confirmBtnStyle]}
92-
onPress={this.confirm}
91+
style={[styles.btnStyle, this.props.cancelBtnStyle]}
92+
onPress={this.cancel}
9393
>
94-
<Text style={[styles.btnTitle, this.props.confirmTitleStyle]}>
95-
{this.props.confirmBtnTitle}
94+
<Text style={[styles.btnTitle, this.props.cancelTitleStyle]}>
95+
{this.props.cancelBtnTitle}
9696
</Text>
9797
</TouchableOpacity>
9898
)}
99-
{this.props.cancelBtnVisible && (
99+
{this.props.confirmBtnVisible && (
100100
<TouchableOpacity
101101
activeOpacity={this.props.activeOpacity}
102-
style={[styles.btnStyle, this.props.cancelBtnStyle]}
103-
onPress={this.cancel}
102+
style={[styles.btnStyle, this.props.confirmBtnStyle]}
103+
onPress={this.confirm}
104104
>
105-
<Text style={[styles.btnTitle, this.props.cancelTitleStyle]}>
106-
{this.props.cancelBtnTitle}
105+
<Text style={[styles.btnTitle, this.props.confirmTitleStyle]}>
106+
{this.props.confirmBtnTitle}
107107
</Text>
108108
</TouchableOpacity>
109109
)}

‎src/components/ImageButton.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export default class ImageButton extends React.Component {
7171
</View>
7272
{this.props.title && (
7373
<Text
74+
numberOfLines={2}
7475
style={[
7576
styles.iconTitle,
7677
this.props.direction === 'column' && { marginTop: scaleSize(10) },
@@ -105,6 +106,7 @@ const styles = StyleSheet.create({
105106
width: scaleSize(50),
106107
},
107108
iconTitle: {
109+
flexWrap: 'wrap',
108110
fontSize: setSpText(20),
109111
color: color.blue2,
110112
backgroundColor: 'transparent',

0 commit comments

Comments
 (0)