3.3.0 • Published 9 months ago

@pansy/smart-captcha v3.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

阿里巴巴集团提供的一种智能验证码解决方案。

coverage CI deploy CI NPM version NPM downloads codecov license issues Percentage of issues still open Average time to resolve an issue dumi

📝 阿里文档

文档

🏗 安装

# npm install
npm install @pansy/smart-captcha --save

# yarn install
yarn add @pansy/smart-captcha

# pnpm install
pnpm i @pansy/smart-captcha

🔨 使用

import { SmartCaptcha } from '@pansy/smart-captcha';

export default () => {
  <SmartCaptcha />
}

注意:

qiankun 项目中 使用时由于沙盒的原因导致组件加载不出来,可通过 excludeAssetFilter 配置排除 //g.alicdn.com/AWSC/AWSC/awsc.js;

如果使用 umi 只需要在基座项目里中的 src/app.ts 文件里添加如下代码即可

const cdnUrls =  [
  '//g.alicdn.com/AWSC/AWSC/awsc.js',
];

function isQuankuExclude(value: string) {
  let result = false;

  for (let i = 0; i < cdnUrls.length; i++) {
    if (value.includes(cdnUrls[i])) {
      result = true;
      break;
    }
  }

  return result;
}

export const qiankun = Promise.resolve().then(() => ({
  excludeAssetFilter: (assetUrl: string) => {
    return isQuankuExclude(assetUrl);
  }
}));
3.3.0

9 months ago

3.2.0

9 months ago

3.1.0

9 months ago

3.0.1

9 months ago

3.0.0

9 months ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago