lujing-fe-rax-confirm
v1.0.0
Published
lujing fe rax confirm component
Downloads
2
Readme
lujing-fe-rax-confirm
组件功能
rax的confirm
组件部署
cnpm i lujing-fe-rax-confirm
组件用法(demo)
受控组件
import View from 'rax-view';
import Touchable from 'rax-touchable';
import Text from 'rax-text';
import Confirm from 'lujing-fe-rax-confirm';
class App extends Component {
constructor(context) {
super(context);
this.state = {
visible: false,
};
}
show() {
this.comfirm.show();
}
sure() {
window.alert('点击确认');
this.comfirm.hide();
}
render() {
return (
<View>
<Touchable onPress={() => this.show()}>点击</Touchable>
<Comfirm ref={(refs) => { this.comfirm = refs; }} onPress={() => this.sure()}>
<Text style={styles.refuseText}>确认拒绝签订?</Text>
</Comfirm>
</View>
);
}
}
详见demo