2.1.2 • Published 11 months ago

@pansy/smart-captcha v2.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 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);
  }
}));
2.1.2

11 months ago

2.1.1

11 months ago

2.1.0

1 year ago

2.0.3

1 year ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago