【问题标题】:How can I disable clear button in react-native-signature-canvas如何禁用 react-native-signature-canvas 中的清除按钮
【发布时间】: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


    【解决方案1】:

    你可以试试这个: 网络风格 = .m-signature-pad {box-shadow: none; border: none;.m-signature-pad--body {border: none;}.m-signature-pad--footer {display: none; margin: 0px;}body,html {width: 100px; height: 100px;}

    【讨论】:

      猜你喜欢
      • 2023-02-24
      • 2022-11-10
      • 1970-01-01
      • 1970-01-01
      • 2018-08-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多