提交 582db185 authored 作者: 钟是志's avatar 钟是志

签名组件修改

上级 5e04f253
...@@ -114,6 +114,8 @@ export default class Signature extends Component { ...@@ -114,6 +114,8 @@ export default class Signature extends Component {
showSignImage = () => { showSignImage = () => {
const { url } = this.state; const { url } = this.state;
Modal.info({ Modal.info({
okText: '确定',
cancelText: '取消',
title: '查看签名', title: '查看签名',
content: <div className={styles.showDiv}> content: <div className={styles.showDiv}>
<img src={queryFileUrl(url)}/> <img src={queryFileUrl(url)}/>
...@@ -129,10 +131,11 @@ export default class Signature extends Component { ...@@ -129,10 +131,11 @@ export default class Signature extends Component {
// 移动端签名组件 // 移动端签名组件
MobileSign = () => { MobileSign = () => {
const { url } = this.state; const { url } = this.state;
const EditIcon = this.EditIcon;
if (url) { if (url) {
return ( return (
<div className={styles.mobileSign}> <div className={styles.mobileSign}>
<this.EditIcon /> <EditIcon />
{/* <Button {/* <Button
type={'primary'} type={'primary'}
onClick={this.changeShowModal} onClick={this.changeShowModal}
...@@ -145,7 +148,7 @@ export default class Signature extends Component { ...@@ -145,7 +148,7 @@ export default class Signature extends Component {
} else { } else {
return ( return (
<div className={styles.mobileSign2}> <div className={styles.mobileSign2}>
<this.EditIcon /> <EditIcon />
{/*<Button type={'primary'} onClick={this.changeShowModal}> {/*<Button type={'primary'} onClick={this.changeShowModal}>
点击开始签名 点击开始签名
</Button>*/} </Button>*/}
...@@ -226,12 +229,13 @@ export default class Signature extends Component { ...@@ -226,12 +229,13 @@ export default class Signature extends Component {
WebSign = () => { WebSign = () => {
const { width, height } = this.props; const { width, height } = this.props;
const EditIcon = this.EditIcon;
// console.log(this.props); // console.log(this.props);
const { url } = this.state; const { url } = this.state;
if (url) { if (url) {
return ( return (
<div className={styles.webSign}> <div className={styles.webSign}>
<this.EditIcon /> <EditIcon />
<img <img
onClick={this.showSignImage} onClick={this.showSignImage}
src={queryFileUrl(url)} src={queryFileUrl(url)}
...@@ -245,7 +249,7 @@ export default class Signature extends Component { ...@@ -245,7 +249,7 @@ export default class Signature extends Component {
} else { } else {
return ( return (
<div className={styles.mobileSign2}> <div className={styles.mobileSign2}>
<this.EditIcon /> <EditIcon />
</div> </div>
); );
} }
...@@ -253,24 +257,27 @@ export default class Signature extends Component { ...@@ -253,24 +257,27 @@ export default class Signature extends Component {
}; };
render() { render() {
// return null;
// console.log('签名组件'); // console.log('签名组件');
const { width, height, get } = this.props; const { width, height, get } = this.props;
const { url } = this.state; const { url } = this.state;
if (get === 'mobile') { if (get === 'mobile') {
// const MobileSign = this.MobileSign; const MobileSign = this.MobileSign;
// const MobileModal = this.MobileModal; const MobileModal = this.MobileModal;
return ( return (
<> <>
<this.MobileSign /> <MobileSign />
<this.MobileModal /> <MobileModal />
</> </>
); );
} else { } else {
const WebSign = this.WebSign;
const WebModal = this.WebModal;
return ( return (
<> <>
<this.WebSign /> <WebSign />
<this.WebModal /> <WebModal />
</> </>
); );
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论