【发布时间】:2022-08-12 13:50:53
【问题描述】:
我正在使用 react-native-signature-canvas 来绘制签名。它工作正常,但现在我想禁用库提供的“清除”按钮。我已经浏览了文档,但我还没有找到任何道具或方法来做到这一点。任何解决方法或线索?
<Signature
onOK={(img) => {
const { signatureCount } = this.state;
if (signatureCount < 1) {
this.setState({ signature: img }, () => {
utils.showToast(\"Signature Saved\");
});
this.setState({ signatureCount: 1 });
} else {
utils.showToast(\"Signature can\'t be save more than once\");
}
}}
ref={this.signatureRef}
bgWidth={imgWidth}
bgHeight={imgHeight}
clearText=\"Clear\"
confirmText=\"Save\"
onBegin={() => this.setState({ scroll: false })}
onEnd={() => this.setState({ scroll: true })}
webStyle={style}
imageType=\"image/png\"
onClear={() => {
this.signatureRef.current.redo();
}}
/>
标签: javascript reactjs react-native