react-app-shell
Version:
react打包脚本和example, 这里的版本请忽略
55 lines (48 loc) • 1.36 kB
JavaScript
import React, {Component} from 'react';
import {BaseModal} from '../../../components/index';
import style from './style.less';
/**
* 手机客服弹窗
*/
export default class IphoneModal extends Component {
handelOk = () => {
const {onOk = null} = this.props;
setTimeout(function () {
onOk && onOk();
}, 100);
};
handelCancel= () => {
const {onCancel = null} = this.props;
onCancel && onCancel();
};
renderHead = () => {
return (
<div className={style['header']}>
提示
</div>
);
};
renderFooter = () => {
return (
<div>
<button className={style['cancel-button']} onClick={this.handelCancel}>取消</button>
<a href="tel:400-626-1626">
<button className={style['ok-button']} onClick={this.handelOk}>确定</button>
</a>
</div>
);
};
render() {
return (
<BaseModal
visible={true}
header={this.renderHead()}
footer={this.renderFooter()}
>
<div className={style['content']}>
确定拨打电话:400-626-1626吗?
</div>
</BaseModal>
);
}
}