Skip to content

Commit 2af5b02

Browse files
committed
Merge branch 'v1-master' of github.com:ShuyunFF2E/cloud-react into feat-select-tips
2 parents 28f2778 + 4b14ba3 commit 2af5b02

386 files changed

Lines changed: 22032 additions & 17950 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
.env.local
2121

2222
# ide
23-
/.vscode
2423
/.idea
2524

2625
# jest

.vscode/extensions.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"recommendations": [
3+
"esbenp.prettier-vscode",
4+
"dbaeumer.vscode-eslint",
5+
"bradlc.vscode-tailwindcss",
6+
"ms-vscode.vscode-typescript-next",
7+
"formulahendry.auto-rename-tag",
8+
"christian-kohler.path-intellisense",
9+
"ms-vscode.vscode-json"
10+
]
11+
}

.vscode/settings.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.codeActionsOnSave": {
4+
"source.fixAll.eslint": "explicit",
5+
"source.organizeImports": "never"
6+
},
7+
"editor.defaultFormatter": "esbenp.prettier-vscode",
8+
"[javascript]": {
9+
"editor.defaultFormatter": "esbenp.prettier-vscode"
10+
},
11+
"[javascriptreact]": {
12+
"editor.defaultFormatter": "esbenp.prettier-vscode"
13+
},
14+
"[typescript]": {
15+
"editor.defaultFormatter": "esbenp.prettier-vscode"
16+
},
17+
"[typescriptreact]": {
18+
"editor.defaultFormatter": "esbenp.prettier-vscode"
19+
},
20+
"[json]": {
21+
"editor.defaultFormatter": "esbenp.prettier-vscode"
22+
},
23+
"[css]": {
24+
"editor.defaultFormatter": "esbenp.prettier-vscode"
25+
},
26+
"[less]": {
27+
"editor.defaultFormatter": "esbenp.prettier-vscode"
28+
},
29+
"[html]": {
30+
"editor.defaultFormatter": "esbenp.prettier-vscode"
31+
},
32+
"eslint.validate": [
33+
"javascript",
34+
"javascriptreact",
35+
"typescript",
36+
"typescriptreact"
37+
],
38+
"prettier.requireConfig": false,
39+
"prettier.useEditorConfig": false,
40+
"files.associations": {
41+
"*.jsx": "javascriptreact",
42+
"*.tsx": "typescriptreact"
43+
},
44+
"emmet.includeLanguages": {
45+
"javascript": "javascriptreact",
46+
"typescript": "typescriptreact"
47+
}
48+
}

package-lock.json

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
"prettier": "2.8.8",
124124
"rimraf": "3.0.2",
125125
"rollup-plugin-postcss": "4.0.2",
126+
"typescript": "^5.8.3",
126127
"umi-lint": "2.0.2",
127128
"virtuallist-antd": "^0.8.0-beta.1",
128129
"yargs": "17.7.2"

src/components/avatar/demos/basic-avatar.md

Lines changed: 121 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -5,89 +5,130 @@ desc: 可切换大小的面包屑
55
---
66

77
```jsx
8-
9-
/**
10-
* title: 基础
11-
* desc: 头像有六种尺寸,两种形态
12-
*/
13-
import React from 'react';
14-
import { Avatar, Icon } from 'cloud-react';
15-
import './style.less';
8+
/**
9+
* title: 基础
10+
* desc: 头像有六种尺寸,两种形态
11+
*/
12+
import React from "react";
13+
import { Avatar, Icon } from "cloud-react";
14+
import "./style.less";
1615

1716
class AvatarDemos extends React.Component {
18-
19-
render() {
20-
return (
21-
<div className="avatar-basic-demo" >
22-
<div>
23-
<h5>24px</h5>
24-
<div>
25-
<Avatar src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png" size={24}/>
26-
<Avatar src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png" size={24} shape="square"/>
27-
<Avatar size={24} icon={<Icon type="user-fill"/>} />
28-
<Avatar size={24} icon={<Icon type="user-fill"/>} shape="square" />
29-
<Avatar size={24}>A</Avatar>
30-
<Avatar size={24} group shape="square">A</Avatar>
31-
</div>
32-
</div>
33-
<div>
34-
<h5>32px</h5>
35-
<div>
36-
<Avatar src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png" size={32}/>
37-
<Avatar src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png" size={32} shape="square"/>
38-
<Avatar size={32} icon={<Icon type="user-fill"/>} />
39-
<Avatar size={32} icon={<Icon type="user-fill"/>} shape="square" />
40-
<Avatar size={32}>A</Avatar>
41-
<Avatar size={32} group shape="square">A</Avatar>
42-
</div>
43-
</div>
44-
<div>
45-
<h5>40px</h5>
46-
<div>
47-
<Avatar src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png" size={40}/>
48-
<Avatar src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png" size={40} shape="square"/>
49-
<Avatar size={40} icon={<Icon type="user-fill"/>} />
50-
<Avatar size={40} icon={<Icon type="user-fill"/>} shape="square" />
51-
<Avatar size={40}>A</Avatar>
52-
<Avatar size={40} group shape="square">A</Avatar>
53-
</div>
54-
</div>
55-
<div>
56-
<h5>48px</h5>
57-
<div>
58-
<Avatar src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png" size={48}/>
59-
<Avatar src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png" size={48} shape="square"/>
60-
<Avatar size={48} icon={<Icon type="user-fill"/>} />
61-
<Avatar size={48} icon={<Icon type="user-fill"/>} shape="square" />
62-
<Avatar size={48}>A</Avatar>
63-
<Avatar size={48} group shape="square">A</Avatar>
64-
</div>
65-
</div>
66-
<div>
67-
<h5>60px</h5>
68-
<div>
69-
<Avatar src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png" size={60}/>
70-
<Avatar src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png" size={60} shape="square"/>
71-
<Avatar size={60} icon={<Icon type="user-fill"/>} />
72-
<Avatar size={60} icon={<Icon type="user-fill"/>} shape="square" />
73-
<Avatar size={60}>A</Avatar>
74-
<Avatar size={60} group shape="square">A</Avatar>
75-
</div>
76-
</div>
77-
<div>
78-
<h6>size 非数字</h6>
79-
<div>
80-
<Avatar size="small" shape="square"/>
81-
<Avatar size="default" shape="square"/>
82-
<Avatar size="large" shape="square"/>
83-
</div>
84-
</div>
85-
</div>
86-
87-
);
88-
}
17+
render() {
18+
return (
19+
<div className="avatar-basic-demo">
20+
<div>
21+
<h5>24px</h5>
22+
<div>
23+
<Avatar
24+
src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png"
25+
size={24}
26+
/>
27+
<Avatar
28+
src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png"
29+
size={24}
30+
shape="square"
31+
/>
32+
<Avatar size={24} icon={<Icon type="user-fill" />} />
33+
<Avatar size={24} icon={<Icon type="user-fill" />} shape="square" />
34+
<Avatar size={24}>A</Avatar>
35+
<Avatar size={24} group shape="square">
36+
A
37+
</Avatar>
38+
</div>
39+
</div>
40+
<div>
41+
<h5>32px</h5>
42+
<div>
43+
<Avatar
44+
src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png"
45+
size={32}
46+
/>
47+
<Avatar
48+
src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png"
49+
size={32}
50+
shape="square"
51+
/>
52+
<Avatar size={32} icon={<Icon type="user-fill" />} />
53+
<Avatar size={32} icon={<Icon type="user-fill" />} shape="square" />
54+
<Avatar size={32}>A</Avatar>
55+
<Avatar size={32} group shape="square">
56+
A
57+
</Avatar>
58+
</div>
59+
</div>
60+
<div>
61+
<h5>40px</h5>
62+
<div>
63+
<Avatar
64+
src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png"
65+
size={40}
66+
/>
67+
<Avatar
68+
src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png"
69+
size={40}
70+
shape="square"
71+
/>
72+
<Avatar size={40} icon={<Icon type="user-fill" />} />
73+
<Avatar size={40} icon={<Icon type="user-fill" />} shape="square" />
74+
<Avatar size={40}>A</Avatar>
75+
<Avatar size={40} group shape="square">
76+
A
77+
</Avatar>
78+
</div>
79+
</div>
80+
<div>
81+
<h5>48px</h5>
82+
<div>
83+
<Avatar
84+
src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png"
85+
size={48}
86+
/>
87+
<Avatar
88+
src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png"
89+
size={48}
90+
shape="square"
91+
/>
92+
<Avatar size={48} icon={<Icon type="user-fill" />} />
93+
<Avatar size={48} icon={<Icon type="user-fill" />} shape="square" />
94+
<Avatar size={48}>A</Avatar>
95+
<Avatar size={48} group shape="square">
96+
A
97+
</Avatar>
98+
</div>
99+
</div>
100+
<div>
101+
<h5>60px</h5>
102+
<div>
103+
<Avatar
104+
src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png"
105+
size={60}
106+
/>
107+
<Avatar
108+
src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png"
109+
size={60}
110+
shape="square"
111+
/>
112+
<Avatar size={60} icon={<Icon type="user-fill" />} />
113+
<Avatar size={60} icon={<Icon type="user-fill" />} shape="square" />
114+
<Avatar size={60}>A</Avatar>
115+
<Avatar size={60} group shape="square">
116+
A
117+
</Avatar>
118+
</div>
119+
</div>
120+
<div>
121+
<h6>size 非数字</h6>
122+
<div>
123+
<Avatar size="small" shape="square" />
124+
<Avatar size="default" shape="square" />
125+
<Avatar size="large" shape="square" />
126+
</div>
127+
</div>
128+
</div>
129+
);
130+
}
89131
}
90132

91133
export default AvatarDemos;
92134
```
93-

src/components/avatar/demos/group-avatar.md

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,50 @@ desc: 可切换大小的面包屑
55
---
66

77
```jsx
8-
9-
/**
10-
* title: 类型
11-
* desc: 支持Icon、 图片、字符(其中图标和字符可自定义图标颜色以及背景)
12-
*/
13-
import React from 'react';
14-
import { Avatar, Icon } from 'cloud-react';
8+
/**
9+
* title: 类型
10+
* desc: 支持Icon、 图片、字符(其中图标和字符可自定义图标颜色以及背景)
11+
*/
12+
import React from "react";
13+
import { Avatar, Icon } from "cloud-react";
1514

1615
const styles = {
17-
display: 'inline-flex',
18-
alignItems: 'center',
19-
gap: 5,
20-
marginBottom: 20
21-
};
16+
display: "inline-flex",
17+
alignItems: "center",
18+
gap: 5,
19+
marginBottom: 20,
20+
};
2221
class AvatarDemos extends React.Component {
23-
24-
render() {
25-
return (
26-
<React.Fragment>
27-
<div style={styles}>
28-
<Avatar size="large"/>
29-
<Avatar size="large" group/>
30-
<Avatar src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png" size="large"/>
31-
<Avatar src="https://brand-guide.shuyun.com/IAM/af74a819da58.jpg" size="large" shape="square"/>
32-
<Avatar icon={<Icon type="people-add" style={{ color: '#ffffff' }}/>} size="large"/>
33-
<Avatar style={{ background: '#5280FF', fontSize: 10 }} size="large">
34-
<span>User</span>
35-
</Avatar>
36-
<Avatar size="large">A</Avatar>
37-
<Avatar size="large" group shape="square">B</Avatar>
38-
</div>
39-
</React.Fragment>
40-
);
41-
}
22+
render() {
23+
return (
24+
<React.Fragment>
25+
<div style={styles}>
26+
<Avatar size="large" />
27+
<Avatar size="large" group />
28+
<Avatar
29+
src="https://brand-guide.shuyun.com/IAM/0a06d4f03b56.png"
30+
size="large"
31+
/>
32+
<Avatar
33+
src="https://brand-guide.shuyun.com/IAM/af74a819da58.jpg"
34+
size="large"
35+
shape="square"
36+
/>
37+
<Avatar
38+
icon={<Icon type="people-add" style={{ color: "#ffffff" }} />}
39+
size="large"
40+
/>
41+
<Avatar style={{ background: "#5280FF", fontSize: 10 }} size="large">
42+
<span>User</span>
43+
</Avatar>
44+
<Avatar size="large">A</Avatar>
45+
<Avatar size="large" group shape="square">
46+
B
47+
</Avatar>
48+
</div>
49+
</React.Fragment>
50+
);
51+
}
4252
}
4353
export default AvatarDemos;
4454
```
45-

0 commit comments

Comments
 (0)