@titaui/pc 1.9.4 → 1.9.8

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;
@@ -54,7 +54,8 @@ var ProgressModal = function ProgressModal(props) {
54
54
  okrInfo = props.okrInfo,
55
55
  onClose = props.onClose,
56
56
  onOk = props.onOk,
57
- title = props.title,
57
+ _props$title = props.title,
58
+ title = _props$title === void 0 ? window.getLocale('OKR_MyO_Prog_Butt_Update') : _props$title,
58
59
  visible = props.visible,
59
60
  isKr = props.isKr;
60
61
  var configure = isKr ? (0, _helper.getKR_SETTING)() : (0, _helper.getO_SETTING)();
@@ -175,7 +176,7 @@ var ProgressModal = function ProgressModal(props) {
175
176
  alignSelf: 'flex-start',
176
177
  marginTop: '10px'
177
178
  }
178
- }, (0, _getLocale.getLocale)('Feed_Tab_Title_Progress')), /*#__PURE__*/_react["default"].createElement(_textarea["default"], {
179
+ }, (0, _getLocale.getLocale)('OKR_MyO_Pop_Upd_Progress')), /*#__PURE__*/_react["default"].createElement(_textarea["default"], {
179
180
  hasError: errorRemark,
180
181
  placeholder: (0, _getLocale.getLocale)('OKR_MyO_Pop_Upd_Pleprogress'),
181
182
  style: {
@@ -228,7 +229,7 @@ var ProgressModal = function ProgressModal(props) {
228
229
  width: 600
229
230
  }, /*#__PURE__*/_react["default"].createElement(_style.List, null, /*#__PURE__*/_react["default"].createElement(_style.Item, null, /*#__PURE__*/_react["default"].createElement("span", {
230
231
  className: "auto-update__item-label"
231
- }, (0, _getLocale.getLocale)('OKR_MyO_Pop_Upd_Progress')), /*#__PURE__*/_react["default"].createElement("div", {
232
+ }, (0, _getLocale.getLocale)('OKR_MyO_Pop_Upd_Progresss1')), /*#__PURE__*/_react["default"].createElement("div", {
232
233
  className: "auto-update__item-progress"
233
234
  }, /*#__PURE__*/_react["default"].createElement(_titaUi.Input, {
234
235
  type: "number",
@@ -291,7 +292,6 @@ var ProgressModal = function ProgressModal(props) {
291
292
  };
292
293
 
293
294
  ProgressModal.defaultProps = {
294
- title: (0, _getLocale.getLocale)('OKR_MyO_Prog_Butt_Update'),
295
295
  maxLength: 500
296
296
  };
297
297
  var _default = ProgressModal;
@@ -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"
@@ -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 {
@@ -70,15 +70,6 @@
70
70
  background-color: #2879ff;
71
71
  }
72
72
 
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
73
  .titaui-personal-info-base-info .form-field-input__label {
83
74
  margin-bottom: 4px;
84
75
  }
@@ -102,3 +93,24 @@
102
93
  .titaui-personal-info-base-info .form-field-input__border--disabled input:disabled {
103
94
  background-color: #fff;
104
95
  }
96
+
97
+ .titaui-personal-info-base-info__form {
98
+ height: 66px;
99
+ box-sizing: border-box;
100
+ padding: 10px 0;
101
+ }
102
+
103
+ .titaui-personal-info-base-info__form-title {
104
+ font-size: 14px;
105
+ font-weight: normal;
106
+ color: #141C28;
107
+ line-height: 22px;
108
+ margin-bottom: 6px;
109
+ }
110
+
111
+ .titaui-personal-info-base-info__form-value {
112
+ font-size: 12px;
113
+ font-weight: normal;
114
+ color: #6F7886;
115
+ line-height: 18px;
116
+ }
@@ -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
+ id: ''
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.id,
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.4",
3
+ "version": "1.9.8",
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;
@@ -11,7 +11,7 @@ import { getLocale } from '../../utils/getLocale';
11
11
  import './index.scss';
12
12
 
13
13
  const ProgressModal: React.FC<IProgressModalProps> = props => {
14
- const { maxLength, okrInfo, onClose, onOk, title, visible, isKr } = props;
14
+ const { maxLength, okrInfo, onClose, onOk, title = window.getLocale('OKR_MyO_Prog_Butt_Update'), visible, isKr } = props;
15
15
 
16
16
  const configure = isKr ? getKR_SETTING() : getO_SETTING();
17
17
 
@@ -70,7 +70,7 @@ const ProgressModal: React.FC<IProgressModalProps> = props => {
70
70
  <span
71
71
  className='auto-update__item-label'
72
72
  style={{ alignSelf: 'flex-start', marginTop: '10px' }}
73
- >{getLocale('Feed_Tab_Title_Progress')}</span>
73
+ >{getLocale('OKR_MyO_Pop_Upd_Progress')}</span>
74
74
  <Textarea
75
75
  hasError={errorRemark}
76
76
  placeholder={getLocale('OKR_MyO_Pop_Upd_Pleprogress')}
@@ -126,7 +126,7 @@ const ProgressModal: React.FC<IProgressModalProps> = props => {
126
126
  >
127
127
  <List>
128
128
  <Item>
129
- <span className='auto-update__item-label'>{getLocale('OKR_MyO_Pop_Upd_Progress')}</span>
129
+ <span className='auto-update__item-label'>{getLocale('OKR_MyO_Pop_Upd_Progresss1')}</span>
130
130
  <div className='auto-update__item-progress'>
131
131
  <Input
132
132
  type='number'
@@ -222,7 +222,6 @@ const ProgressModal: React.FC<IProgressModalProps> = props => {
222
222
  };
223
223
 
224
224
  ProgressModal.defaultProps = {
225
- title: getLocale('OKR_MyO_Prog_Butt_Update'),
226
225
  maxLength: 500,
227
226
  };
228
227
 
@@ -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,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;
@@ -61,13 +61,6 @@
61
61
  }
62
62
  }
63
63
  }
64
- &__form {
65
- width: 342px;
66
- .form-field-input__border--disabled input:disabled {
67
- color: #6F7886;
68
- cursor: default;
69
- }
70
- }
71
64
  .form-field-input__label {
72
65
  margin-bottom: 4px;
73
66
  }
@@ -87,4 +80,22 @@
87
80
  .form-field-input__border--disabled input:disabled {
88
81
  background-color: #fff;
89
82
  }
83
+ &__form {
84
+ height: 66px;
85
+ box-sizing: border-box;
86
+ padding: 10px 0;
87
+ &-title {
88
+ font-size: 14px;
89
+ font-weight: normal;
90
+ color: #141C28;
91
+ line-height: 22px;
92
+ margin-bottom: 6px;
93
+ }
94
+ &-value {
95
+ font-size: 12px;
96
+ font-weight: normal;
97
+ color: #6F7886;
98
+ line-height: 18px;
99
+ }
100
+ }
90
101
  }
@@ -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: "", id: '' });
15
12
  const [visible, setVisible] = useState(false);
16
13
 
17
14
  const handleClickEdit = () => {
@@ -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.id} 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 {