@tsingroc/tsingroc-components 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -0
- package/dist/components/Button/index.d.ts +5 -0
- package/dist/components/Button/index.js +8 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/tsingrocCom.d.ts +15 -0
- package/dist/components/tsingrocCom.js +967 -0
- package/dist/components/tsingrocCom.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/package.json +35 -14
- package/.babelrc +0 -3
- package/build.config.js +0 -55
- package/dist/bundle.js +0 -11220
- package/dist/index.html +0 -11
- package/example/public/index.html +0 -11
- package/example/src/App.js +0 -17
- package/example/src/index.js +0 -11
- package/index.js +0 -6
- package/src/components/Button/index.js +0 -10
- package/src/components/index.js +0 -3
- package/src/components/tsingrocCom.js +0 -1121
- package/src/index.js +0 -39
- package/test/test.js +0 -2
- package/webpack.config.js +0 -41
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# 清鹏智能公共组件库
|
|
2
|
+
|
|
3
|
+
本仓库包含了清鹏智能的前端公共组件。
|
|
4
|
+
|
|
5
|
+
# 用法
|
|
6
|
+
|
|
7
|
+
用以下指令在前端项目中引入公共组件库。
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
$ npm install -S @tsingroc/tsingroc-components
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
# 开发
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
$ git clone git@git.tsingroc.com:web/tsingroc-components.git
|
|
17
|
+
$ cd tsingroc-components
|
|
18
|
+
$ npm install
|
|
19
|
+
$ npm run dev # 启动开发环境,开发环境的源代码位于 dev/
|
|
20
|
+
$ npm run lint # 运行 ESLint 检查代码中的易错点
|
|
21
|
+
$ npm run format # 格式化代码
|
|
22
|
+
$ npm run docs:dev # 启动文档站点的开发环境,文档站点的源代码位于 docs/
|
|
23
|
+
$ npm run docs:build # 构建文档站点,产物位于 doc_build/
|
|
24
|
+
$ npm run docs:preview # 预览构建完成的文档站点
|
|
25
|
+
$ npm run build # 构建组件库
|
|
26
|
+
$ npm publish
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
本项目正在逐步迁移到 TypeScript,新代码请使用 TypeScript 编写。在开发环境和文档站点中,请使用 `import {...} from "@";` 导入组件库的组件。
|
|
30
|
+
|
|
31
|
+
## 编辑器配置
|
|
32
|
+
|
|
33
|
+
可以安装 ESLint 插件、MDX 插件和 Prettier 插件。VSCode 上可以在侧栏的“扩展”标签中看到工作区推荐的插件。
|
|
34
|
+
|
|
35
|
+
## 项目结构
|
|
36
|
+
|
|
37
|
+
```hs
|
|
38
|
+
.
|
|
39
|
+
├── .vscode/
|
|
40
|
+
├── dev/ -- 开发环境的源代码
|
|
41
|
+
│ ├── public/ -- 开发环境的 HTML 模板
|
|
42
|
+
│ └── src/ -- 开发环境的 JavaScript 源代码
|
|
43
|
+
├── dist/ -- 组件库的构建产物
|
|
44
|
+
├── doc_build/ -- 文档站点的构建产物
|
|
45
|
+
├── docs/ -- 文档站点的源代码
|
|
46
|
+
│ ├── public/ -- 文档站点的静态资产
|
|
47
|
+
│ └── zh/
|
|
48
|
+
│ ├── api/ -- 自动生成的 API 文档
|
|
49
|
+
│ └── examples/ -- 组件用法示例
|
|
50
|
+
├── node_modules/
|
|
51
|
+
├── src/ -- 组件库的源代码
|
|
52
|
+
├── test/ -- 测试的源代码(暂时无效)
|
|
53
|
+
├── .gitignore
|
|
54
|
+
├── .prettierignore -- Prettier 需要忽略的文件列表
|
|
55
|
+
├── eslint.config.js -- ESLint 的配置文件
|
|
56
|
+
├── package-lock.json
|
|
57
|
+
├── package.json
|
|
58
|
+
├── README.md
|
|
59
|
+
├── rsbuild.config.ts -- Rsbuild 的配置文件,用于构建开发环境
|
|
60
|
+
├── rspress.config.ts -- Rspress 的配置文件,用于构建文档站点
|
|
61
|
+
├── tsconfig.json
|
|
62
|
+
├── tsconfig.lib.json -- 组件库的 TypeScript 配置
|
|
63
|
+
└── tsconfig.web.json -- 开发环境和文档站点的 TypeScript 配置
|
|
64
|
+
```
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button as AntdButton } from "antd";
|
|
3
|
+
import React from "react";
|
|
4
|
+
const Button = ({ children, ...props }) => {
|
|
5
|
+
return (_jsxs(AntdButton, { ...props, children: [_jsx("div", { children: "AntdButton" }), children] }));
|
|
6
|
+
};
|
|
7
|
+
export default Button;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Button/index.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACxC,OAAO,CACL,MAAC,UAAU,OAAK,KAAK,aACnB,uCAAqB,EACpB,QAAQ,IACE,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Button };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.js"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function ImageBac(props: any): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export const EchartMult: React.NamedExoticComponent<object>;
|
|
3
|
+
export const RiskEchartMult: React.NamedExoticComponent<object>;
|
|
4
|
+
export function TsingrocDatePick(props: any): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export function RadarEchart(props: any): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export function TsingrocPie(props: any): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export function CircularProgress({ progress, color }: {
|
|
8
|
+
progress: any;
|
|
9
|
+
color?: string | undefined;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export const WindFlow: React.NamedExoticComponent<object>;
|
|
12
|
+
export function BoxplotEchart(props: any): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export function EchartJustOneLine(props: any): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export function TsingrocMonthPick(props: any): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
import React from "react";
|