Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ant-credit/bean-sdk

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ant-credit/bean-sdk

bean 组件 sdk

  • 1.3.0-rc.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@ant-credit/bean-sdk

bean 组件 sdk

安装依赖

npm i @ant-credit/bean-sdk --save

代码中使用

添加组件挂在节点
<body>
  <div id="BusinessInfo_PC"></div>
</body>
初始化 bean-sdk 并调用组件
import beanSdk from '@ant-credit/bean-sdk';
import { getMockComponentToken } from './your-own-utils';

async function main() {
  const componentToken = await getMockComponentToken(); // replace with your own get componenttoken function

  if (!componentToken) {
    return;
  }

  await beanSdk.init({
    componentToken,
  });

  const BusinessInfo_PC_Component = await beanSdk.create({
    name: 'BusinessInfo_PC',
    props: {
      crn: '911000001000013428',
      useInnerDataSource: true,
    },
    style: `
      body {
        width: 900px !important;
      }
    `,
  });
  BusinessInfo_PC_Component.render('#BusinessInfo_PC');
}

main();

SDK API

beanSdk 实例

beanSdk.init(param)
  • param
    • componentToken
    • debug
    • globalEnv
    • onComponentTokenExpired
beanSdk.create(param)
  • param
    • name
    • props
    • style
    • globalEnv
beanSdk.render(container)
  • container

FAQs

Package last updated on 08 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc