@titaui/pc 1.9.3 → 1.9.7

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.
@@ -9,6 +9,7 @@
9
9
 
10
10
  .form-field-input-row .form-field-input__border {
11
11
  margin-left: 16px;
12
+ border: 1px solid #DFE3EA;
12
13
  flex: 1;
13
14
  }
14
15
 
@@ -88,6 +88,7 @@
88
88
  .form-field-input__hide-icon {
89
89
  position: absolute;
90
90
  right: 3px;
91
+ top: 10px;
91
92
  width: 16px;
92
93
  height: 16px;
93
94
  background: url("./yincang-s.svg") no-repeat;
@@ -23,6 +23,8 @@ var _avatar = _interopRequireDefault(require("../avatar"));
23
23
 
24
24
  var _precls = _interopRequireDefault(require("../../precls"));
25
25
 
26
+ var _getLocale = require("../../../../../../utils/getLocale");
27
+
26
28
  require("./index.css");
27
29
 
28
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -64,7 +66,7 @@ var _default = function _default(props) {
64
66
  className: (0, _classnames["default"])("".concat(_precls["default"], "__follower-node-cancel")),
65
67
  onClick: onCancelFollowHandler
66
68
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
67
- overlay: /*#__PURE__*/_react["default"].createElement("span", null, _i18n.locale.unsubscribe),
69
+ overlay: /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)(_i18n.locale.unsubscribe)),
68
70
  placement: "top",
69
71
  align: {
70
72
  'offset': [0, 5]
@@ -98,7 +98,7 @@ var SubmitDialog = function SubmitDialog(props) {
98
98
  destroyOnClose: true,
99
99
  noCloseIcon: true,
100
100
  getContainer: function getContainer() {
101
- return allViewAreaRef.current;
101
+ return document.body;
102
102
  }
103
103
  }, /*#__PURE__*/_react["default"].createElement("div", {
104
104
  className: "okr-cases-library__submitWindow"
@@ -6,19 +6,19 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.List = void 0;
7
7
  var List = [{
8
8
  id: 'person',
9
- accept: '.jpg,.jpeg,.gif,.png',
9
+ accept: '.jpg,.jpeg,.png',
10
10
  autoCropArea: 1,
11
11
  initialAspectRatio: 1,
12
- tips: '仅支持 jpg、jpeg、gif、png 格式 建议图片最小尺寸 150*150px',
12
+ tips: '仅支持 jpg、jpeg、png 格式 建议图片最小尺寸 150*150px',
13
13
  previewTitle: '预览',
14
14
  minCropBoxHeight: 60,
15
15
  minCropBoxWidth: 60
16
16
  }, {
17
17
  id: 'enterprise',
18
- accept: '.jpg,.jpeg,.gif,.png',
18
+ accept: '.jpg,.jpeg,.png',
19
19
  autoCropArea: 1,
20
20
  initialAspectRatio: 5,
21
- tips: '建议 logo 尺寸 400*80 logo 最佳适配颜色为白色 仅支持 jpg、jpeg、gif、png 格式',
21
+ tips: '建议 logo 尺寸 400*80 logo 最佳适配颜色为白色 仅支持 jpg、jpeg、png 格式',
22
22
  previewTitle: 'logo 预览',
23
23
  minCropBoxHeight: 20,
24
24
  minCropBoxWidth: 20
@@ -2,7 +2,7 @@
2
2
  background: #ffffff;
3
3
  box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
4
4
  border-radius: 12px;
5
- padding: 20px 32px 30px 36px;
5
+ padding: 20px 32px 20px 36px;
6
6
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
7
7
  }
8
8
 
@@ -10,7 +10,7 @@
10
10
  display: flex;
11
11
  align-items: center;
12
12
  justify-content: space-between;
13
- margin-bottom: 20px;
13
+ margin-bottom: 10px;
14
14
  }
15
15
 
16
16
  .titaui-personal-info-base-info__header-title {
@@ -71,34 +71,21 @@
71
71
  }
72
72
 
73
73
  .titaui-personal-info-base-info__form {
74
- width: 342px;
75
- }
76
-
77
- .titaui-personal-info-base-info__form .form-field-input__border--disabled input:disabled {
78
- color: #6F7886;
79
- cursor: default;
80
- }
81
-
82
- .titaui-personal-info-base-info .form-field-input__label {
83
- margin-bottom: 4px;
84
- }
85
-
86
- .titaui-personal-info-base-info .form-field-input__border {
87
- padding: 0;
88
- border: none;
89
- background-color: #fff;
74
+ box-sizing: border-box;
75
+ padding: 10px 0;
90
76
  }
91
77
 
92
- .titaui-personal-info-base-info .form-field-input__label-text {
78
+ .titaui-personal-info-base-info__form-title {
79
+ font-size: 14px;
93
80
  font-weight: 600;
81
+ color: #141C28;
82
+ line-height: 22px;
83
+ margin-bottom: 6px;
94
84
  }
95
85
 
96
- .titaui-personal-info-base-info .form-field-input__input {
86
+ .titaui-personal-info-base-info__form-value {
97
87
  font-size: 12px;
88
+ font-weight: normal;
89
+ color: #6F7886;
98
90
  line-height: 18px;
99
- background-color: #fff;
100
- }
101
-
102
- .titaui-personal-info-base-info .form-field-input__border--disabled input:disabled {
103
- background-color: #fff;
104
91
  }
@@ -9,15 +9,13 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _form = _interopRequireDefault(require("../../../../components/form"));
13
-
14
12
  var _requestApi = require("../../request-api");
15
13
 
16
- var _getLocale = require("../../../../utils/getLocale");
14
+ var _button = require("../../../../components/button");
17
15
 
18
16
  var _editBaseInfo = _interopRequireDefault(require("../edit-base-info"));
19
17
 
20
- var _button = require("../../../../components/button");
18
+ var _openData = require("../../../../utils/open-data");
21
19
 
22
20
  require("./index.css");
23
21
 
@@ -45,16 +43,14 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
45
43
 
46
44
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
47
45
 
48
- var Fields = _form["default"].Fields;
49
46
  var prefix = "titaui-personal-info-base-info";
50
47
 
51
48
  var BaseInfo = function BaseInfo() {
52
- var formRef = (0, _react.useRef)();
53
-
54
49
  var _useState = (0, _react.useState)({
55
50
  name: "",
56
51
  email: "",
57
- mobile: ""
52
+ mobile: "",
53
+ userId: ''
58
54
  }),
59
55
  _useState2 = _slicedToArray(_useState, 2),
60
56
  userInfo = _useState2[0],
@@ -92,9 +88,9 @@ var BaseInfo = function BaseInfo() {
92
88
  className: "".concat(prefix, "__header")
93
89
  }, /*#__PURE__*/_react["default"].createElement("span", {
94
90
  className: "".concat(prefix, "__header-title")
95
- }, (0, _getLocale.getLocale)('Per_Ass_New_title_text_BasicIn')), /*#__PURE__*/_react["default"].createElement(_button.RectBtn, {
91
+ }, getLocale('Per_Ass_New_title_text_BasicIn')), /*#__PURE__*/_react["default"].createElement(_button.RectBtn, {
96
92
  type: "primary",
97
- text: (0, _getLocale.getLocale)('Mod_Editor'),
93
+ text: getLocale('Mod_Editor'),
98
94
  onClick: handleClickEdit
99
95
  }), /*#__PURE__*/_react["default"].createElement(_editBaseInfo["default"], {
100
96
  visible: visible,
@@ -102,33 +98,26 @@ var BaseInfo = function BaseInfo() {
102
98
  handleSuccessEditBaseInfo: handleSuccessEditBaseInfo
103
99
  })), /*#__PURE__*/_react["default"].createElement("div", {
104
100
  className: "".concat(prefix, "__form")
105
- }, /*#__PURE__*/_react["default"].createElement(_form["default"], {
106
- ref: formRef
107
- }, /*#__PURE__*/_react["default"].createElement(Fields.Input, {
108
- name: "name",
109
- label: (0, _getLocale.getLocale)('Mod_UserName'),
110
- placeholder: "未设置",
111
- type: "text",
112
- verifies: [],
113
- value: userInfo.name,
114
- disabled: true
115
- }), /*#__PURE__*/_react["default"].createElement(Fields.Input, {
116
- name: "phone",
117
- type: "text",
118
- label: "手机号码",
119
- placeholder: "未设置",
120
- value: userInfo.mobile,
121
- verifies: [],
122
- disabled: true
123
- }), /*#__PURE__*/_react["default"].createElement(Fields.Input, {
124
- name: "email",
125
- type: "text",
126
- label: "电子邮箱",
127
- value: userInfo.email,
128
- placeholder: "未设置",
129
- verifies: [],
130
- disabled: true
131
- }))));
101
+ }, /*#__PURE__*/_react["default"].createElement("div", {
102
+ className: "".concat(prefix, "__form-title")
103
+ }, "\u59D3\u540D"), /*#__PURE__*/_react["default"].createElement("span", {
104
+ className: "".concat(prefix, "__form-value")
105
+ }, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
106
+ id: userInfo.userId,
107
+ name: userInfo.name
108
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
109
+ className: "".concat(prefix, "__form")
110
+ }, /*#__PURE__*/_react["default"].createElement("div", {
111
+ className: "".concat(prefix, "__form-title")
112
+ }, "\u624B\u673A\u53F7\u7801"), /*#__PURE__*/_react["default"].createElement("span", {
113
+ className: "".concat(prefix, "__form-value")
114
+ }, userInfo.mobile ? userInfo.mobile : "未设置")), /*#__PURE__*/_react["default"].createElement("div", {
115
+ className: "".concat(prefix, "__form")
116
+ }, /*#__PURE__*/_react["default"].createElement("div", {
117
+ className: "".concat(prefix, "__form-title")
118
+ }, "\u7535\u5B50\u90AE\u7BB1"), /*#__PURE__*/_react["default"].createElement("span", {
119
+ className: "".concat(prefix, "__form-value")
120
+ }, userInfo.email ? userInfo.email : "未设置")));
132
121
  };
133
122
 
134
123
  var _default = BaseInfo;
@@ -109,7 +109,7 @@ var EditBaseInfo = function EditBaseInfo(props) {
109
109
  };
110
110
 
111
111
  var handleSaveUserInfo = function handleSaveUserInfo() {
112
- if (!userInfo.email || !userInfo.mobile || !userInfo.name || userInfo.name.length > 50) {
112
+ if (!userInfo.mobile || !userInfo.name || userInfo.name.length > 50) {
113
113
  setIsDisable(true);
114
114
  return;
115
115
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.9.3",
3
+ "version": "1.9.7",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "src/index.js",
@@ -7,6 +7,7 @@
7
7
  }
8
8
  .form-field-input__border{
9
9
  margin-left: 16px;
10
+ border: 1px solid #DFE3EA;
10
11
  flex: 1;
11
12
  }
12
13
  }
@@ -81,6 +81,7 @@
81
81
  &__hide-icon {
82
82
  position: absolute;
83
83
  right: 3px;
84
+ top: 10px;
84
85
  width: 16px;
85
86
  height: 16px;
86
87
  background: url('./yincang-s.svg') no-repeat;
@@ -6,6 +6,7 @@ import Tooltip from '../../../../../tooltip';
6
6
  import { OkrMenusContext } from '../../../../context';
7
7
  import Avatar from '../avatar';
8
8
  import preCls from "../../precls";
9
+ import { getLocale } from "../../../../../../utils/getLocale";
9
10
 
10
11
  import "./index.scss";
11
12
 
@@ -35,7 +36,7 @@ export default (props) => {
35
36
 
36
37
  <span className={classNames(`${preCls}__follower-node-cancel`)} onClick={onCancelFollowHandler}>
37
38
  <Tooltip
38
- overlay={<span>{locale.unsubscribe}</span>}
39
+ overlay={<span>{getLocale(locale.unsubscribe)}</span>}
39
40
  placement="top"
40
41
  align={{ 'offset': [0, 5] }}
41
42
  >
@@ -44,7 +44,7 @@ export const SubmitDialog = (props: Props1) => {
44
44
 
45
45
 
46
46
  return (
47
- <Dialog visible={isShowSubmitOkrWindow} noFooter width="480px" destroyOnClose noCloseIcon getContainer={() => allViewAreaRef.current}>
47
+ <Dialog visible={isShowSubmitOkrWindow} noFooter width="480px" destroyOnClose noCloseIcon getContainer={() => document.body}>
48
48
  <div className="okr-cases-library__submitWindow">
49
49
  <img src={require('../image/submit小驴.svg')} />
50
50
  <div className="tu-icon-canceled" onClick={() => handleShowSubmitOkrWindow(false)} />
@@ -2,20 +2,20 @@
2
2
  export const List = [
3
3
  {
4
4
  id: 'person',
5
- accept: '.jpg,.jpeg,.gif,.png',
5
+ accept: '.jpg,.jpeg,.png',
6
6
  autoCropArea: 1,
7
7
  initialAspectRatio: 1,
8
- tips: '仅支持 jpg、jpeg、gif、png 格式 建议图片最小尺寸 150*150px',
8
+ tips: '仅支持 jpg、jpeg、png 格式 建议图片最小尺寸 150*150px',
9
9
  previewTitle: '预览',
10
10
  minCropBoxHeight: 60,
11
11
  minCropBoxWidth: 60,
12
12
  },
13
13
  {
14
14
  id: 'enterprise',
15
- accept: '.jpg,.jpeg,.gif,.png',
15
+ accept: '.jpg,.jpeg,.png',
16
16
  autoCropArea: 1,
17
17
  initialAspectRatio: 5,
18
- tips: '建议 logo 尺寸 400*80 logo 最佳适配颜色为白色 仅支持 jpg、jpeg、gif、png 格式',
18
+ tips: '建议 logo 尺寸 400*80 logo 最佳适配颜色为白色 仅支持 jpg、jpeg、png 格式',
19
19
  previewTitle: 'logo 预览',
20
20
  minCropBoxHeight: 20,
21
21
  minCropBoxWidth: 20,
@@ -2,14 +2,14 @@
2
2
  background: #ffffff;
3
3
  box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
4
4
  border-radius: 12px;
5
- padding: 20px 32px 30px 36px;
5
+ padding: 20px 32px 20px 36px;
6
6
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
7
7
  sans-serif, PingFang SC, Microsoft YaHei;
8
8
  &__header {
9
9
  display: flex;
10
10
  align-items: center;
11
11
  justify-content: space-between;
12
- margin-bottom: 20px;
12
+ margin-bottom: 10px;
13
13
  &-title {
14
14
  font-size: 16px;
15
15
  font-weight: 600;
@@ -62,29 +62,20 @@
62
62
  }
63
63
  }
64
64
  &__form {
65
- width: 342px;
66
- .form-field-input__border--disabled input:disabled {
65
+ box-sizing: border-box;
66
+ padding: 10px 0;
67
+ &-title {
68
+ font-size: 14px;
69
+ font-weight: 600;
70
+ color: #141C28;
71
+ line-height: 22px;
72
+ margin-bottom: 6px;
73
+ }
74
+ &-value {
75
+ font-size: 12px;
76
+ font-weight: normal;
67
77
  color: #6F7886;
68
- cursor: default;
78
+ line-height: 18px;
69
79
  }
70
80
  }
71
- .form-field-input__label {
72
- margin-bottom: 4px;
73
- }
74
- .form-field-input__border {
75
- padding: 0;
76
- border: none;
77
- background-color: #fff;
78
- }
79
- .form-field-input__label-text {
80
- font-weight: 600;
81
- }
82
- .form-field-input__input {
83
- font-size: 12px;
84
- line-height: 18px;
85
- background-color: #fff;
86
- }
87
- .form-field-input__border--disabled input:disabled {
88
- background-color: #fff;
89
- }
90
81
  }
@@ -1,17 +1,14 @@
1
- import React, { FC, useState, useRef, useEffect } from "react";
2
- import Form from "../../../../components/form";
3
- import { getUserInfoFun } from "../../request-api";
4
- import { getLocale } from "../../../../utils/getLocale";
5
- import EditModle from '../edit-base-info'
1
+ import React, { FC, useState, useEffect } from "react";
2
+ import { getUserInfoFun } from '../../request-api';
6
3
  import { RectBtn } from "../../../../components/button";
4
+ import EditModle from '../edit-base-info';
5
+ import {OpenUserName} from '../../../../utils/open-data'
7
6
  import "./index.scss";
8
7
 
9
- const {Fields} = Form
10
8
  const prefix = "titaui-personal-info-base-info";
11
9
 
12
10
  const BaseInfo: FC = () => {
13
- const formRef = useRef<any>();
14
- const [userInfo, setUserInfo] = useState({ name: "", email: "", mobile: "" });
11
+ const [userInfo, setUserInfo] = useState({ name: "", email: "", mobile: "", userId: '' });
15
12
  const [visible, setVisible] = useState(false);
16
13
 
17
14
  const handleClickEdit = () => {
@@ -28,7 +25,7 @@ const BaseInfo: FC = () => {
28
25
 
29
26
  useEffect(() => {
30
27
  getUserInfoFun().then((resp) => {
31
- if (resp.Code === 1 && resp.Data) {
28
+ if (resp.Code === 1 && resp.Data) {
32
29
  setUserInfo({ ...resp.Data, position: resp.Data.positionCode });
33
30
  }
34
31
  });
@@ -46,35 +43,16 @@ const BaseInfo: FC = () => {
46
43
  <EditModle visible={visible} onCancel={handleCancelEdit} handleSuccessEditBaseInfo={handleSuccessEditBaseInfo}/>
47
44
  </div>
48
45
  <div className={`${prefix}__form`}>
49
- <Form ref={formRef}>
50
- <Fields.Input
51
- name="name"
52
- label={getLocale('Mod_UserName')}
53
- placeholder={"未设置"}
54
- type="text"
55
- verifies={[]}
56
- value={userInfo.name}
57
- disabled
58
- />
59
- <Fields.Input
60
- name="phone"
61
- type="text"
62
- label={"手机号码"}
63
- placeholder={"未设置"}
64
- value={userInfo.mobile}
65
- verifies={[]}
66
- disabled
67
- />
68
- <Fields.Input
69
- name="email"
70
- type="text"
71
- label={"电子邮箱"}
72
- value={userInfo.email}
73
- placeholder={"未设置"}
74
- verifies={[]}
75
- disabled
76
- />
77
- </Form>
46
+ <div className={`${prefix}__form-title`}>姓名</div>
47
+ <span className={`${prefix}__form-value`}><OpenUserName id={userInfo.userId} name={userInfo.name} /></span>
48
+ </div>
49
+ <div className={`${prefix}__form`}>
50
+ <div className={`${prefix}__form-title`}>手机号码</div>
51
+ <span className={`${prefix}__form-value`}>{userInfo.mobile ? userInfo.mobile : "未设置"}</span>
52
+ </div>
53
+ <div className={`${prefix}__form`}>
54
+ <div className={`${prefix}__form-title`}>电子邮箱</div>
55
+ <span className={`${prefix}__form-value`}>{userInfo.email ? userInfo.email : "未设置"}</span>
78
56
  </div>
79
57
  </div>
80
58
  );
@@ -55,7 +55,7 @@ const EditBaseInfo = (props) => {
55
55
  };
56
56
 
57
57
  const handleSaveUserInfo = () => {
58
- if (!userInfo.email || !userInfo.mobile || !userInfo.name || userInfo.name.length > 50) {
58
+ if (!userInfo.mobile || !userInfo.name || userInfo.name.length > 50) {
59
59
  setIsDisable(true);
60
60
  return;
61
61
  } else {