Skip to content

Commit 537469e

Browse files
committed
feat: 合并代码
2 parents b8441b5 + 6f18a60 commit 537469e

66 files changed

Lines changed: 37651 additions & 28336 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
dist/
22
docs/
33
loader/
4-
*.min.js
4+
*.min.js
5+
cloud-react-site/
6+
src/**/test/
7+
src/**/__test__/
8+
src/components/icon/libs/
9+
src/components/index.js
10+
scripts/
11+
*.config.js
12+
tests/

.eslintrc

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
}
1515
},
1616
"rules": {
17+
"prefer-regex-literals": "off",
1718
"prefer-object-spread": 0,
1819
"react/jsx-props-no-spreading": 0,
1920
"react/destructuring-assignment": 0,
@@ -38,7 +39,6 @@
3839
"react/forbid-elements": [1, { "forbid": [] }],
3940

4041
//// -----
41-
"no-unused-vars": ["error", { "vars": "all" }],
4242
"indent": ["error", 2, { "SwitchCase": 1 }],
4343

4444
"react/jsx-no-target-blank": "error",
@@ -51,9 +51,8 @@
5151
"error",
5252
{ "allowShortCircuit": true, "allowTernary": true }
5353
],
54-
"no-param-reassign": ["error", { "props": true }],
5554
"no-return-assign": "error",
56-
"max-len": ["error", { "code": 140, "comments": 140 }],
55+
"max-len": ["error", { "code": 200, "comments": 200 }],
5756
"quote-props": ["error", "as-needed"],
5857
"eqeqeq": "error",
5958
"new-cap": "error",
@@ -69,7 +68,7 @@
6968
],
7069
"template-curly-spacing": ["error", "never"],
7170
"space-infix-ops": ["error"],
72-
"arrow-body-style": ["error", "as-needed"],
71+
"arrow-body-style": "off",
7372
"no-undef": "error",
7473
"no-multi-assign": "error",
7574
"no-nested-ternary": "error",
@@ -102,18 +101,51 @@
102101
{ "extensions": [".js", ".jsx"] }
103102
],
104103
"react/jsx-no-duplicate-props": ["error"],
105-
"react/jsx-indent-props": ["error", 2],
106-
"react/jsx-indent": ["error", 2],
104+
"react/jsx-indent-props": "off",
105+
"react/jsx-indent": "off",
106+
"no-promise-executor-return": "off",
107+
"no-param-reassign": "off",
108+
"class-methods-use-this": "off",
107109
"react/jsx-first-prop-new-line": ["error", "multiline"],
108110
"react/prop-types": "off",
109111
"react/no-children-prop": "off",
110112

111113
"react/no-string-refs": "off", // close temporally
112-
"react/no-array-index-key": "error",
114+
"react/no-array-index-key": "warn",
113115
"react/jsx-boolean-value": "error",
114116
"react/no-deprecated": "warn",
115117
"react/require-default-props": "off",
116-
"react/jsx-wrap-multilines": "off"
118+
"react/jsx-wrap-multilines": "off",
119+
"no-mixed-spaces-and-tabs": "off",
120+
"no-tabs": "off",
121+
"react/no-danger": "off",
122+
"react/no-unknown-property": "off",
123+
"react/no-unused-class-component-methods": "off",
124+
"no-unused-vars": "warn",
125+
"max-classes-per-file": "off",
126+
"react/jsx-no-useless-fragment": "off",
127+
"react/jsx-no-constructed-context-values": "off",
128+
"brace-style": "off",
129+
"default-param-last": "off",
130+
"no-use-before-define": "off",
131+
"prefer-const": "warn",
132+
"react/jsx-closing-tag-location": "off",
133+
"react/state-in-constructor": "warn",
134+
135+
// 函数组件配置
136+
"react/function-component-definition": [
137+
"warn",
138+
{
139+
"namedComponents": [
140+
"function-declaration",
141+
"arrow-function",
142+
"function-expression"
143+
],
144+
"unnamedComponents": ["arrow-function", "function-expression"]
145+
}
146+
],
147+
"react/prefer-stateless-function": "off",
148+
"react/jsx-one-expression-per-line": "off"
117149
},
118150
"globals": {
119151
"window": true,

.fatherrc.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import NodePath from 'path';
22
import alias from '@rollup/plugin-alias';
3-
import { eslint } from 'rollup-plugin-eslint';
3+
// import { eslint } from 'rollup-plugin-eslint';
44
import copy from 'rollup-plugin-copy';
55
// import url from '@rollup/plugin-url';
66
import generatePackageJson from 'rollup-plugin-generate-package-json';
@@ -111,11 +111,11 @@ export default isBuild
111111
'shuyun-utils': '0.0.3',
112112
},
113113
}),
114-
eslint({
115-
throwOnError: true,
116-
include: [NodePath.resolve('src/components')],
117-
/* your options */
118-
}),
114+
// eslint({
115+
// throwOnError: false,
116+
// include: [NodePath.resolve('src/components')],
117+
// /* your options */
118+
// }),
119119
// url({
120120
// include: ['**/*.woff', '**/*.woff2'],
121121
// limit: Infinity,
@@ -234,11 +234,11 @@ export default isBuild
234234
'shuyun-utils': '0.0.3',
235235
},
236236
}),
237-
eslint({
238-
throwOnError: true,
239-
include: [NodePath.resolve('src/components')],
240-
/* your options */
241-
}),
237+
// eslint({
238+
// throwOnError: true,
239+
// include: [NodePath.resolve('src/components')],
240+
// /* your options */
241+
// }),
242242
// url({
243243
// include: ['**/*.woff', '**/*.woff2'],
244244
// limit: Infinity,
@@ -311,11 +311,11 @@ export default isBuild
311311
},
312312
},
313313
extraRollupPlugins: [
314-
eslint({
315-
throwOnError: true,
316-
include: [NodePath.resolve('src/components')],
317-
/* your options */
318-
}),
314+
// eslint({
315+
// throwOnError: true,
316+
// include: [NodePath.resolve('src/components')],
317+
// /* your options */
318+
// }),
319319
// url({
320320
// include: ['**/*.woff', '**/*.woff2'],
321321
// limit: Infinity,

.husky/_/.gitignore

Whitespace-only changes.

.husky/_/husky.sh

Lines changed: 0 additions & 36 deletions
This file was deleted.

.prettierignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 11 deletions
This file was deleted.

README.md

Lines changed: 117 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,142 @@
1-
# cloud-react
1+
# Cloud React
22

3-
## Getting Started
3+
[![npm package](https://img.shields.io/npm/v/cloud-react.svg?style=flat-square)](https://www.npmjs.org/package/cloud-react)
4+
[![NPM downloads](https://img.shields.io/npm/dm/cloud-react.svg?style=flat-square)](https://npmjs.org/package/cloud-react)
5+
[![GitHub license](https://img.shields.io/github/license/ShuyunFF2E/cloud-react.svg?style=flat-square)](https://github.com/ShuyunFF2E/cloud-react/blob/master/LICENSE)
46

5-
Install dependencies,
7+
数据赢家 React 组件库,提供丰富的企业级 UI 组件和解决方案。
8+
9+
## ✨ 特性
10+
11+
- **企业级设计** - 基于数据赢家设计规范,提供一致的用户体验
12+
- **开箱即用** - 提供 50+ 高质量组件,覆盖常见业务场景
13+
- **高性能** - 基于 React 16.8+ 构建,支持 Hooks
14+
- 🎯 **TypeScript** - 完整的 TypeScript 支持
15+
- **响应式** - 支持多种屏幕尺寸和设备
16+
- 🎨 **主题定制** - 支持主题色和样式自定义
17+
- 📖 **详细文档** - 提供完整的 API 文档和示例
18+
19+
## 📦 安装
620

721
```bash
8-
$ npm i
22+
npm install cloud-react --save
23+
#
24+
yarn add cloud-react
925
```
1026

11-
Start the dev server,
12-
```bash
13-
yarn add cloud-react --save
27+
## 🔨 使用
28+
29+
### 引入样式
30+
31+
```js
32+
// 引入完整样式
33+
import 'cloud-react/cloud-react.css';
34+
```
35+
36+
### 基础使用
37+
38+
```jsx
39+
import React from 'react';
40+
import { Button, Input, Modal } from 'cloud-react';
41+
42+
function App() {
43+
return (
44+
<div>
45+
<Button type="primary">点击我</Button>
46+
<Input placeholder="请输入内容" />
47+
<Modal title="标题" visible={true}>
48+
内容
49+
</Modal>
50+
</div>
51+
);
52+
}
1453
```
1554

1655
### 框架依赖版本
56+
1757
- `react` >= `16.8.6`
1858
- `react-dom` >= `16.8.6`
1959
- `react-router-dom` >= `5.0.0`
2060

21-
### 支持浏览器
22-
- `chrome` >= `56`
23-
- `firefox` >= `59`
61+
<!-- ### 按需加载
2462
25-
### 示例
26-
```js
27-
// 引入样式
28-
import 'cloud-react/cloud-react.css';
63+
```jsx
64+
// 按需引入组件
65+
import Button from 'cloud-react/lib/button';
66+
import 'cloud-react/lib/button/style';
67+
``` -->
68+
69+
## 🛠 开发
70+
71+
### 环境要求
72+
73+
- Node.js 16.20.0
74+
75+
### 安装依赖
2976

3077
```bash
31-
$ npm start
78+
npm install
3279
```
3380

34-
Build documentation,
81+
### 开发调试
3582

3683
```bash
37-
$ npm run docs:build
84+
# 启动开发服务器
85+
npm run dev
3886
```
3987

40-
Build library via `father-build`,
88+
### 构建
4189

4290
```bash
43-
$ npm run build
91+
# 构建组件库
92+
npm run build
93+
94+
# 构建文档
95+
npm run docs:build
96+
```
97+
98+
### 提交代码格式
99+
100+
```bash
101+
git commit -m "feat: [组件名称]提交内容"
102+
git commit -m "fix: [组件名称]提交内容"
44103
```
104+
105+
**项目配置了代码保存前进行eslint格式化和代码提交前进行eslint校验,如果提交有问题,请联系管理员**
106+
107+
## 🎯 浏览器支持
108+
109+
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome |
110+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
111+
| >= 59 | >= 56 |
112+
## 🔗 相关链接
113+
114+
- [在线文档](https://cloud-react.shuyun.com/v1/cloud-react/common/button)
115+
- [更新日志](https://github.com/ShuyunFF2E/cloud-react/blob/v1-master/docs/log.md)
116+
117+
## 🤝 贡献
118+
119+
我们欢迎所有形式的贡献,包括但不限于:
120+
121+
- Bug 报告
122+
- 💡 新功能建议
123+
- 📝 文档改进
124+
- 代码贡献
125+
126+
### 贡献指南
127+
128+
1. Fork 本仓库
129+
2. 创建你的特性分支 (`git checkout -b feature/AmazingFeature`)
130+
3. 提交你的更改 (`git commit -m 'Add some AmazingFeature'`)
131+
4. 推送到分支 (`git push origin feature/AmazingFeature`)
132+
5. 打开一个 Pull Request
133+
134+
## 🤝 致谢
135+
136+
感谢所有为这个项目做出贡献的开发者!
137+
138+
---
139+
140+
<div align="center">
141+
<strong>Made with ❤️ by 数云前端团队</strong>
142+
</div>

0 commit comments

Comments
 (0)