@titaui/pc 1.7.101 → 1.8.3

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.
Files changed (61) hide show
  1. package/lib/components/dialog/index.css +7 -1
  2. package/lib/components/dialog/index.js +7 -6
  3. package/lib/components/form/form-fields/input/index.css +22 -7
  4. package/lib/components/form/form-fields/input/index.js +11 -8
  5. package/lib/components/form/form-fields/input-verification-code/index.css +117 -0
  6. package/lib/components/form/form-fields/input-verification-code/index.js +230 -0
  7. package/lib/components/form/form-fields/password/index.css +2 -2
  8. package/lib/components/form/form-fields/radios/index.js +1 -1
  9. package/lib/components/form/index.js +4 -1
  10. package/lib/components/nav-top/components/user-message/components/empty/index.js +4 -2
  11. package/lib/components/nav-top/components/user-message/msg/index.js +1 -1
  12. package/lib/components/table/index.css +4 -0
  13. package/lib/components/table/index.js +3 -0
  14. package/lib/components/upload/index.js +2 -2
  15. package/lib/components/upload-photo-modal/constant.js +29 -0
  16. package/lib/components/upload-photo-modal/img/browser-preview-bgc.png +0 -0
  17. package/lib/components/upload-photo-modal/index.css +288 -0
  18. package/lib/components/upload-photo-modal/index.js +439 -0
  19. package/lib/components/upload-photo-modal/request-api.js +62 -0
  20. package/lib/components/user-selector/request-apis.js +1 -1
  21. package/lib/index.js +8 -0
  22. package/lib/pages/personal-info/components/base-info/index.css +36 -1
  23. package/lib/pages/personal-info/components/base-info/index.js +22 -90
  24. package/lib/pages/personal-info/components/edit-info/index.css +19 -0
  25. package/lib/pages/personal-info/components/edit-info/index.js +209 -0
  26. package/lib/pages/personal-info/components/edit-info/input/index.css +89 -0
  27. package/lib/pages/personal-info/components/edit-info/input/index.js +199 -0
  28. package/lib/pages/personal-info/components/person-photo/index.css +88 -0
  29. package/lib/pages/personal-info/components/person-photo/index.js +86 -0
  30. package/lib/pages/personal-info/index.js +3 -1
  31. package/package.json +3 -1
  32. package/src/components/dialog/index.js +2 -1
  33. package/src/components/dialog/index.scss +6 -1
  34. package/src/components/form/form-fields/input/index.scss +19 -7
  35. package/src/components/form/form-fields/input/index.tsx +9 -4
  36. package/src/components/form/form-fields/input-verification-code/index.scss +108 -0
  37. package/src/components/form/form-fields/input-verification-code/index.tsx +171 -0
  38. package/src/components/form/form-fields/password/index.scss +2 -2
  39. package/src/components/form/form-fields/radios/index.tsx +2 -2
  40. package/src/components/form/index.tsx +2 -0
  41. package/src/components/nav-top/components/user-message/components/empty/index.tsx +3 -2
  42. package/src/components/nav-top/components/user-message/msg/index.tsx +1 -1
  43. package/src/components/table/index.js +1 -0
  44. package/src/components/table/index.scss +5 -0
  45. package/src/components/upload/index.tsx +4 -4
  46. package/src/components/upload-photo-modal/constant.ts +27 -0
  47. package/src/components/upload-photo-modal/img/browser-preview-bgc.png +0 -0
  48. package/src/components/upload-photo-modal/index.scss +258 -0
  49. package/src/components/upload-photo-modal/index.tsx +331 -0
  50. package/src/components/upload-photo-modal/request-api.ts +33 -0
  51. package/src/components/user-selector/request-apis.js +1 -1
  52. package/src/index.js +1 -0
  53. package/src/pages/personal-info/components/base-info/index.scss +30 -1
  54. package/src/pages/personal-info/components/base-info/index.tsx +26 -97
  55. package/src/pages/personal-info/components/edit-info/index.scss +20 -0
  56. package/src/pages/personal-info/components/edit-info/index.tsx +166 -0
  57. package/src/pages/personal-info/components/edit-info/input/index.scss +82 -0
  58. package/src/pages/personal-info/components/edit-info/input/index.tsx +145 -0
  59. package/src/pages/personal-info/components/person-photo/index.scss +80 -0
  60. package/src/pages/personal-info/components/person-photo/index.tsx +49 -0
  61. package/src/pages/personal-info/index.tsx +2 -0
@@ -0,0 +1,80 @@
1
+ .titaui-personal-info-person-photo {
2
+ background: #ffffff;
3
+ box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
4
+ border-radius: 12px;
5
+ padding: 20px 32px;
6
+ margin-top: 10px;
7
+ font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
8
+ &__header {
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: space-between;
12
+ margin-bottom: 12px;
13
+ &-title {
14
+ font-size: 16px;
15
+ font-weight: 600;
16
+ color: #141c28;
17
+ line-height: 24px;
18
+ position: relative;
19
+ display: inline-flex;
20
+ align-items: center;
21
+ &::before {
22
+ content: "";
23
+ width: 4px;
24
+ height: 16px;
25
+ background: linear-gradient(90deg, #4e90ff 0%, #2879ff 100%);
26
+ border-radius: 2px;
27
+ display: inline-block;
28
+ position: absolute;
29
+ left: -8px;
30
+ top: 3px;
31
+ }
32
+ }
33
+ }
34
+ &__main {
35
+ display: flex;
36
+ align-items: center;
37
+ &-mask {
38
+ position: absolute;
39
+ width: 160px;
40
+ height: 32px;
41
+ box-sizing: border-box;
42
+ padding: 7px 52px;
43
+ background: rgba(20, 28, 40, 0.5);
44
+ // filter: blur(4px);
45
+ font-size: 12px;
46
+ color: #FFFFFF;
47
+ line-height: 18px;
48
+ }
49
+ & > span {
50
+ margin-left: 24px;
51
+ font-size: 12px;
52
+ color: #A4ACB9;
53
+ line-height: 20px;
54
+ }
55
+ }
56
+ .titaui-pc-avator-container {
57
+ cursor: pointer;
58
+ }
59
+ .titaui-pc-avator-wrapper {
60
+ &::before {
61
+ position: absolute;
62
+ bottom:0;
63
+ display: block;
64
+ content: "点击修改";
65
+ width: 160px;
66
+ height: 32px;
67
+ background: rgba(20, 28, 40, 0.5);
68
+ color: #FFFFFF;
69
+ font-size: 12px;
70
+ line-height: 18px;
71
+ text-align: center;
72
+ box-sizing: border-box;
73
+ padding: 7px 0;
74
+ backdrop-filter: blur(4px);
75
+ }
76
+ &:hover::before {
77
+ background: rgba(20, 28, 40, 0.4);
78
+ }
79
+ }
80
+ }
@@ -0,0 +1,49 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import classNames from 'classnames';
3
+ import { getUserInfo } from '../../../../utils/bs-global';
4
+ import Avatar from '../../../../components/avatar';
5
+ import ChangePhotoModal from '../../../../components/upload-photo-modal';
6
+ import './index.scss';
7
+
8
+ const prefix = 'titaui-personal-info-person-photo';
9
+
10
+ const { Id, Name, UserAvatar } = getUserInfo();
11
+
12
+ const PersonPhoto = () => {
13
+
14
+ const [visible, setVisible] = useState(false);
15
+
16
+ const handleChangePhoto = () => {
17
+ setVisible(true);
18
+ }
19
+
20
+ const handleCancel = () => {
21
+ setVisible(false);
22
+ }
23
+
24
+ return (
25
+ <div className={prefix}>
26
+ <div className={`${prefix}__header`}>
27
+ <span className={`${prefix}__header-title`}>上传头像</span>
28
+ </div>
29
+ <div className={`${prefix}__main`}>
30
+ <Avatar
31
+ userId={Id}
32
+ name={Name}
33
+ color={UserAvatar.Color}
34
+ src={UserAvatar.Large}
35
+ size={{
36
+ width: 160,
37
+ textNum: 1,
38
+ fontSize: 24
39
+ }}
40
+ onClick={handleChangePhoto}
41
+ />
42
+ <span>· 建议图片最小尺寸 150*150px</span>
43
+ </div>
44
+ <ChangePhotoModal visible={visible} onCancel={handleCancel} type="person"/>
45
+ </div>
46
+ );
47
+ };
48
+
49
+ export default PersonPhoto;
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import BaseInfo from "./components/base-info";
3
+ import PersonPhoto from './components/person-photo'
3
4
  import Aha2021Page from '../aha2021';
4
5
  import "./index.scss";
5
6
 
@@ -10,6 +11,7 @@ const PersonalInfo = () => {
10
11
  <Aha2021Page.ContentTemplate>
11
12
  <div className={prefix}>
12
13
  <BaseInfo />
14
+ <PersonPhoto />
13
15
  </div>
14
16
  </Aha2021Page.ContentTemplate>
15
17
  );