New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

op-components

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

op-components

## Getting Started

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

kts-components

Getting Started

如果要查看业务组件,比如部门信息,请先设置 token

import React from 'react';
import { Input } from 'antd';
import SdkConfig from './src/sdk';
const onResetSchema = e => {
  console.log(e.target.value);
  SdkConfig.token = e.target.value;
};
export default () => (
  <div>
    <Input onChange={onResetSchema} placeholder="设置token" />
  </div>
);

Install dependencies,

$ npm i kts-components

Start the dev server,

$ npm start

Build documentation,

$ npm run docs:build

Build library via father-build,

$ npm run build

常见错误

regeneratorRuntime is not defined

1.npm i @babel/polyfill 2.在 config/polyfill.js 下加入这行代码 require("@babel/polyfill"); 3.自应用需要传递 sdk 给组件,导入{SdkConfig} from 'kts-components';SdkConfig.instance.sdk = sdk;

2.An accessor cannot be declared in ambient context 在 tsconfig.json 中加入此行 "compilerOptions": { "skipLibCheck": true } 3.无法发布 npm 源不对,处理:npm config set registry https://registry.npmjs.org/ -- 有些非官方源个人可能无权发布,比如淘宝镜像需要 admin 权限 ##更新 1.3.1 支持外部 JSX.element 通过 extra 参数放进去。

FAQs

Package last updated on 23 Jun 2023

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