# op-components

> ## Getting Started

Latest version **1.0.0** (published 2023-06-23) · 0 weekly downloads

## Install

```sh
npm install op-components
pnpm add op-components
yarn add op-components
bun add op-components
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-06-23 |
| First published | 2023-06-23 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 12 |
| Unpacked size | 312.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | teamwang |

## Links

- npm: https://www.npmjs.com/package/op-components
- npm.io page: https://npm.io/package/op-components

## Dependencies (12)

- [antd](https://npm.io/package/antd.md) ^3.26.20
- [react](https://npm.io/package/react.md) ^16.14.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [moment](https://npm.io/package/moment.md) ^2.24.0
- [kts-xui](https://npm.io/package/kts-xui.md) ^2.0.2
- [numeral](https://npm.io/package/numeral.md) ^2.0.6
- [classnames](https://npm.io/package/classnames.md) ^2.3.2
- [superagent](https://npm.io/package/superagent.md) ^5.1.1
- [react-script](https://npm.io/package/react-script.md) ^2.0.5
- [@formily/antd](https://npm.io/package/@formily/antd.md) ^1.3.17
- [styled-components](https://npm.io/package/styled-components.md) ^5.2.3
- [@formily/antd-components](https://npm.io/package/@formily/antd-components.md) ^1.3.17

## Recent versions

- 1.0.0 (latest) — 2023-06-23

## README

# kts-components

## Getting Started

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

```tsx
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,

```bash
$ npm i kts-components
```

Start the dev server,

```bash
$ npm start
```

Build documentation,

```bash
$ npm run docs:build
```

Build library via `father-build`,

```bash
$ 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 参数放进去。

---
_Source: https://npm.io/package/op-components · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
