crazycode2

1.代码

<Input
  onCopy={(e)=>{
    // 禁止拷贝
    e.preventDefault();
  }}
  onPaste={(e)=>{
    // 禁止粘贴
    e.preventDefault();
  }}
  onCut={(e)=>{
    // 禁止剪切
    e.preventDefault();
  }}
/>

该功能,多用于 type="password" 的情况

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-03-04
  • 2022-01-10
  • 2022-02-02
  • 2021-07-05
  • 2021-12-31
  • 2021-12-31
猜你喜欢
  • 2021-12-31
  • 2022-12-23
  • 2021-12-31
  • 2021-12-31
  • 2021-12-31
  • 2022-12-23
  • 2021-12-31
相关资源
相似解决方案