@titaui/pc 1.9.112 → 1.9.116

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.
@@ -39,6 +39,7 @@
39
39
  height: 32px;
40
40
  margin-right: 10px;
41
41
  user-select: none;
42
+ color: #3f4755;
42
43
  }
43
44
 
44
45
  .titaui-book-demo-checkbox__options-item--selected {
@@ -51,6 +51,7 @@ var BookDemoCheckbox = function BookDemoCheckbox(_ref) {
51
51
  required = _ref.required,
52
52
  halfWidth = _ref.halfWidth,
53
53
  option = _ref.option,
54
+ multiSelect = _ref.multiSelect,
54
55
  onChange = _ref.onChange;
55
56
 
56
57
  var _useState = (0, _react.useState)([]),
@@ -66,6 +67,18 @@ var BookDemoCheckbox = function BookDemoCheckbox(_ref) {
66
67
  var handleChangeInputValue = function handleChangeInputValue(selectedId) {
67
68
  var result = [];
68
69
 
70
+ if (!multiSelect) {
71
+ setHasErr(required && result.length === 0);
72
+ result.push(selectedId);
73
+ setValue(result);
74
+
75
+ if (onChange) {
76
+ onChange(name, id, result, required && result.length === 0);
77
+ }
78
+
79
+ return;
80
+ }
81
+
69
82
  if (value.includes(selectedId)) {
70
83
  result = value.filter(function (item) {
71
84
  return item !== selectedId;
@@ -1,5 +1,7 @@
1
1
  .titaui-book-demo-pc-content {
2
2
  display: flex;
3
+ background-color: #ffffff;
4
+ border-radius: 24px;
3
5
  }
4
6
 
5
7
  .titaui-book-demo-pc-content__left {
@@ -39,8 +41,6 @@
39
41
  grid-template-columns: 1fr 1fr;
40
42
  column-gap: 12px;
41
43
  row-gap: 20px;
42
- max-height: 366px;
43
- overflow: auto;
44
44
  padding-right: 22px;
45
45
  }
46
46
 
@@ -103,10 +103,11 @@
103
103
  .titaui-book-demo-pc-content__right-commit--shadow::before {
104
104
  content: '';
105
105
  position: absolute;
106
- width: 320px;
106
+ width: 302px;
107
107
  height: 16px;
108
108
  background: #f0f2f5;
109
109
  border-radius: 8px;
110
110
  filter: blur(4px);
111
111
  bottom: 76px;
112
+ right: 44px;
112
113
  }
@@ -31,6 +31,8 @@ var _toast = _interopRequireDefault(require("../../../../../toast"));
31
31
 
32
32
  var _constant = require("../../../../constant");
33
33
 
34
+ var _scrollbar = _interopRequireDefault(require("../../../../../scrollbar"));
35
+
34
36
  require("./index.css");
35
37
 
36
38
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -70,14 +72,16 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
70
72
  var preCls = "titaui-book-demo-pc-content";
71
73
  var uname = window.BSGlobal && window.BSGlobal.loginUserInfo.Name || "";
72
74
  var uid = window.BSGlobal && window.BSGlobal.tenantInfo.Id || "";
73
- var source = window.BSGlobal && window.BSGlobal.tenantInfo.Source || (0, _utils.getSource)("source");
75
+ var Source = window.BSGlobal && window.BSGlobal.tenantInfo.Source || (0, _utils.getSource)();
74
76
  var lname = window.BSGlobal && window.BSGlobal.loginUserInfo.Name || "";
75
77
  var lmobile = window.BSGlobal && window.BSGlobal.loginUserInfo.Mobile || "";
76
78
  var lcompany = window.BSGlobal && window.BSGlobal.tenantInfo.Name || "";
77
79
 
78
80
  var BookDemoPCContent = function BookDemoPCContent(_ref) {
79
81
  var type = _ref.type,
80
- onSubmitSuccess = _ref.onSubmitSuccess;
82
+ onSubmitSuccess = _ref.onSubmitSuccess,
83
+ _ref$source = _ref.source,
84
+ source = _ref$source === void 0 ? 0 : _ref$source;
81
85
 
82
86
  var _useState = (0, _react.useState)((0, _utils.getTypeData)(type)),
83
87
  _useState2 = _slicedToArray(_useState, 2),
@@ -148,7 +152,7 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
148
152
  content: content,
149
153
  code: verificationData.value,
150
154
  keyRandomV2: yzmGuidVal.indexOf("?") !== -1 ? yzmGuidVal.slice(0, yzmGuidVal.indexOf("?")) : yzmGuidVal,
151
- source: source
155
+ source: source > 0 ? source : Source
152
156
  }
153
157
  }).then(function (res) {
154
158
  if (res.data.Code) {
@@ -215,7 +219,7 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
215
219
  }, [result, isAggrePrivacy]);
216
220
  (0, _react.useEffect)(function () {
217
221
  setTimeout(function () {
218
- if (formRef.current.offsetHeight < formRef.current.scrollHeight) {
222
+ if (formRef.current.offsetHeight > 366) {
219
223
  setIsFormOverflow(true);
220
224
  }
221
225
  }, 0);
@@ -270,6 +274,10 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
270
274
  src: data.img
271
275
  })), /*#__PURE__*/_react["default"].createElement("div", {
272
276
  className: "".concat(preCls, "__right")
277
+ }, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], {
278
+ style: {
279
+ maxHeight: "366px"
280
+ }
273
281
  }, /*#__PURE__*/_react["default"].createElement("div", {
274
282
  className: (0, _classnames["default"])("".concat(preCls, "__right-form")),
275
283
  ref: formRef
@@ -285,7 +293,7 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
285
293
  href: "/Account/Register/ServiceTreaty?tenantId=0&isvId=10000",
286
294
  target: "_blank",
287
295
  className: "".concat(preCls, "__right-form-privacy-link")
288
- }, "\u670D\u52A1\u53CA\u9690\u79C1\u6761\u6B3E"))), /*#__PURE__*/_react["default"].createElement("div", {
296
+ }, "\u670D\u52A1\u53CA\u9690\u79C1\u6761\u6B3E")))), /*#__PURE__*/_react["default"].createElement("div", {
289
297
  className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__right-commit--shadow"), isFormOverflow))
290
298
  }), /*#__PURE__*/_react["default"].createElement("div", {
291
299
  className: (0, _classnames["default"])("".concat(preCls, "__right-commit"))
@@ -296,5 +304,8 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
296
304
  }, "\u63D0\u4EA4"))));
297
305
  };
298
306
 
307
+ BookDemoPCContent.defaultProps = {
308
+ source: 0
309
+ };
299
310
  var _default = BookDemoPCContent;
300
311
  exports["default"] = _default;
@@ -29,13 +29,13 @@
29
29
  justify-content: space-between;
30
30
  cursor: pointer;
31
31
  width: calc(100% - 4px);
32
- padding-left: 4px;
32
+ padding-left: 8px;
33
33
  font-size: 14px;
34
34
  color: #3f4755;
35
35
  line-height: 22px;
36
36
  }
37
37
 
38
38
  .titaui-book-demo-drop-select__value-down {
39
- width: 12px;
39
+ width: 10px;
40
40
  align-self: center;
41
41
  }
@@ -6,6 +6,10 @@
6
6
  padding-bottom: 5px;
7
7
  }
8
8
 
9
+ .titaui-book-demo-input--error {
10
+ border-bottom: 1px solid #f05e5e;
11
+ }
12
+
9
13
  .titaui-book-demo-input--full-row {
10
14
  grid-column-start: 1;
11
15
  grid-column-end: 3;
@@ -27,7 +31,7 @@
27
31
  .titaui-book-demo-input__input {
28
32
  border: none;
29
33
  outline: none;
30
- padding-left: 4px;
34
+ padding-left: 8px;
31
35
  font-size: 14px;
32
36
  color: #3f4755;
33
37
  line-height: 22px;
@@ -38,3 +42,15 @@
38
42
  .titaui-book-demo-input__input--half {
39
43
  width: 110px;
40
44
  }
45
+
46
+ .titaui-book-demo-input__input ::-webkit-input-placeholder {
47
+ color: #bfc7d5;
48
+ }
49
+
50
+ .titaui-book-demo-input__input :-ms-input-placeholder {
51
+ color: #bfc7d5;
52
+ }
53
+
54
+ .titaui-book-demo-input__input :-moz-input-placeholder {
55
+ color: #bfc7d5;
56
+ }
@@ -38,6 +38,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
38
38
  var preCls = "titaui-book-demo-input";
39
39
 
40
40
  var BookDemoInput = function BookDemoInput(_ref) {
41
+ var _classNames;
42
+
41
43
  var name = _ref.name,
42
44
  type = _ref.type,
43
45
  value = _ref.value,
@@ -74,7 +76,7 @@ var BookDemoInput = function BookDemoInput(_ref) {
74
76
  };
75
77
 
76
78
  return /*#__PURE__*/_react["default"].createElement("div", {
77
- className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "--full-row"), !halfWidth))
79
+ className: (0, _classnames["default"])(preCls, (_classNames = {}, _defineProperty(_classNames, "".concat(preCls, "--full-row"), !halfWidth), _defineProperty(_classNames, "".concat(preCls, "--error"), hasErr), _classNames))
78
80
  }, /*#__PURE__*/_react["default"].createElement("span", {
79
81
  className: (0, _classnames["default"])("".concat(preCls, "__name"), _defineProperty({}, "".concat(preCls, "__name--required"), required))
80
82
  }, name), /*#__PURE__*/_react["default"].createElement("input", {
@@ -82,8 +84,7 @@ var BookDemoInput = function BookDemoInput(_ref) {
82
84
  type: type,
83
85
  value: inputValue,
84
86
  onChange: handleChangeInputValue,
85
- onBlur: handleBlur,
86
- placeholder: "\u8BF7\u8F93\u5165"
87
+ onBlur: handleBlur
87
88
  }), /*#__PURE__*/_react["default"].createElement(_errorInfo["default"], {
88
89
  errMsg: hasErr ? "".concat(name, "\u4E0D\u80FD\u4E3A\u7A7A") : ""
89
90
  }));
@@ -9,6 +9,10 @@
9
9
  /* 火狐浏览器 */
10
10
  }
11
11
 
12
+ .titaui-book-demo-phone--error {
13
+ border-bottom: 1px solid #f05e5e;
14
+ }
15
+
12
16
  .titaui-book-demo-phone--full-row {
13
17
  grid-column-start: 1;
14
18
  grid-column-end: 3;
@@ -34,7 +38,7 @@
34
38
  .titaui-book-demo-phone__input {
35
39
  border: none;
36
40
  outline: none;
37
- padding-left: 4px;
41
+ padding-left: 8px;
38
42
  font-size: 14px;
39
43
  color: #3f4755;
40
44
  line-height: 22px;
@@ -50,3 +54,15 @@
50
54
  .titaui-book-demo-phone__input::-webkit-outer-spin-button, .titaui-book-demo-phone__input::-webkit-inner-spin-button {
51
55
  -webkit-appearance: none;
52
56
  }
57
+
58
+ .titaui-book-demo-phone__input ::-webkit-input-placeholder {
59
+ color: #bfc7d5;
60
+ }
61
+
62
+ .titaui-book-demo-phone__input :-ms-input-placeholder {
63
+ color: #bfc7d5;
64
+ }
65
+
66
+ .titaui-book-demo-phone__input :-moz-input-placeholder {
67
+ color: #bfc7d5;
68
+ }
@@ -39,6 +39,8 @@ var preCls = "titaui-book-demo-phone";
39
39
  var phoneReg = /^1[3456789]\d{9}$/;
40
40
 
41
41
  var BookDemoPhone = function BookDemoPhone(_ref) {
42
+ var _classNames;
43
+
42
44
  var name = _ref.name,
43
45
  required = _ref.required,
44
46
  id = _ref.id,
@@ -74,7 +76,7 @@ var BookDemoPhone = function BookDemoPhone(_ref) {
74
76
  };
75
77
 
76
78
  return /*#__PURE__*/_react["default"].createElement("div", {
77
- className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "--full-row"), !halfWidth))
79
+ className: (0, _classnames["default"])(preCls, (_classNames = {}, _defineProperty(_classNames, "".concat(preCls, "--full-row"), !halfWidth), _defineProperty(_classNames, "".concat(preCls, "--error"), hasErr), _classNames))
78
80
  }, /*#__PURE__*/_react["default"].createElement("span", {
79
81
  className: (0, _classnames["default"])("".concat(preCls, "__name"), _defineProperty({}, "".concat(preCls, "__name--required"), required))
80
82
  }, name), /*#__PURE__*/_react["default"].createElement("input", {
@@ -82,8 +84,7 @@ var BookDemoPhone = function BookDemoPhone(_ref) {
82
84
  type: "number",
83
85
  value: inputValue,
84
86
  onChange: handleChangeInputValue,
85
- onBlur: handleBlur,
86
- placeholder: "\u8BF7\u8F93\u5165"
87
+ onBlur: handleBlur
87
88
  }), /*#__PURE__*/_react["default"].createElement(_errorInfo["default"], {
88
89
  errMsg: hasErr ? "".concat(name, "\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u9700\u8981\u5408\u6CD5\u4E14\u957F\u5EA6\u5FC5\u987B\u4E3A11\u4F4D") : ""
89
90
  }));
@@ -7,6 +7,10 @@
7
7
  padding-bottom: 3px;
8
8
  }
9
9
 
10
+ .titaui-book-demo-verify-code--error {
11
+ border-bottom: 1px solid #f05e5e;
12
+ }
13
+
10
14
  .titaui-book-demo-verify-code--full-row {
11
15
  grid-column-start: 1;
12
16
  grid-column-end: 3;
@@ -38,6 +38,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
38
38
  var preCls = "titaui-book-demo-verify-code";
39
39
 
40
40
  var BookDemoVerifyCode = function BookDemoVerifyCode(_ref) {
41
+ var _classNames;
42
+
41
43
  var name = _ref.name,
42
44
  required = _ref.required,
43
45
  halfWidth = _ref.halfWidth,
@@ -111,14 +113,13 @@ var BookDemoVerifyCode = function BookDemoVerifyCode(_ref) {
111
113
  setYzmGuid(renderCode());
112
114
  }, []);
113
115
  return /*#__PURE__*/_react["default"].createElement("div", {
114
- className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "--full-row"), !halfWidth))
116
+ className: (0, _classnames["default"])(preCls, (_classNames = {}, _defineProperty(_classNames, "".concat(preCls, "--full-row"), !halfWidth), _defineProperty(_classNames, "".concat(preCls, "--error"), hasErr), _classNames))
115
117
  }, /*#__PURE__*/_react["default"].createElement("span", {
116
118
  className: (0, _classnames["default"])("".concat(preCls, "__name"), _defineProperty({}, "".concat(preCls, "__name--required"), required))
117
119
  }, name), /*#__PURE__*/_react["default"].createElement("input", {
118
120
  className: (0, _classnames["default"])("".concat(preCls, "__input")),
119
121
  type: "text",
120
122
  value: inputValue,
121
- placeholder: "\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801",
122
123
  onBlur: handleBlur,
123
124
  onChange: handleChangeInputValue
124
125
  }), /*#__PURE__*/_react["default"].createElement("span", {
@@ -48,7 +48,8 @@ var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
48
48
  visible = _ref.visible,
49
49
  visibleChange = _ref.visibleChange,
50
50
  _ref$autoShow = _ref.autoShow,
51
- autoShow = _ref$autoShow === void 0 ? false : _ref$autoShow;
51
+ autoShow = _ref$autoShow === void 0 ? false : _ref$autoShow,
52
+ source = _ref.source;
52
53
 
53
54
  var _useState = (0, _react.useState)(false),
54
55
  _useState2 = _slicedToArray(_useState, 2),
@@ -106,7 +107,6 @@ var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
106
107
  noHeadLine: true,
107
108
  visible: dialogVisible,
108
109
  onClose: handleCloseBookDemo,
109
- animation: "slide-fade-up",
110
110
  noFooter: true,
111
111
  noCloseIcon: true,
112
112
  destroyOnClose: true,
@@ -123,13 +123,15 @@ var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
123
123
  src: _demoClose["default"],
124
124
  className: (0, _classnames["default"])("".concat(preCls, "__close-icon"))
125
125
  })), /*#__PURE__*/_react["default"].createElement(_content["default"], {
126
+ source: source,
126
127
  type: type,
127
128
  onSubmitSuccess: handleCloseBookDemo
128
129
  }));
129
130
  });
130
131
  BookDemoPC.defaultProps = {
131
132
  autoShow: false,
132
- visibleChange: function visibleChange() {}
133
+ visibleChange: function visibleChange() {},
134
+ source: 0
133
135
  };
134
136
  var _default = BookDemoPC;
135
137
  exports["default"] = _default;
@@ -30,7 +30,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
30
30
  type: "text",
31
31
  id: "name",
32
32
  value: "",
33
- required: true,
33
+ required: false,
34
34
  option: [],
35
35
  multiSelect: false,
36
36
  halfWidth: true
@@ -39,7 +39,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
39
39
  id: "",
40
40
  value: "",
41
41
  type: "dropSelect",
42
- required: true,
42
+ required: false,
43
43
  option: [{
44
44
  text: "企业 CEO",
45
45
  value: "企业 CEO"
@@ -78,7 +78,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
78
78
  type: "text",
79
79
  id: "company",
80
80
  value: "",
81
- required: true,
81
+ required: false,
82
82
  option: [],
83
83
  multiSelect: false,
84
84
  halfWidth: false
@@ -87,7 +87,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
87
87
  type: "dropSelect",
88
88
  id: "companyPersonNum",
89
89
  value: "1-30",
90
- required: true,
90
+ required: false,
91
91
  option: [{
92
92
  text: "1-30",
93
93
  value: "1-30"
@@ -152,7 +152,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
152
152
  value: "计划管理"
153
153
  }],
154
154
  required: true,
155
- multiSelect: false,
155
+ multiSelect: true,
156
156
  halfWidth: false
157
157
  }]
158
158
  }), _defineProperty(_bookTypeInfo, _interface.EDemoType.TryOKR, {
@@ -164,7 +164,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
164
164
  type: "text",
165
165
  id: "name",
166
166
  value: "",
167
- required: true,
167
+ required: false,
168
168
  option: [],
169
169
  multiSelect: false,
170
170
  halfWidth: true
@@ -173,7 +173,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
173
173
  type: "dropSelect",
174
174
  id: "",
175
175
  value: "",
176
- required: true,
176
+ required: false,
177
177
  option: [{
178
178
  text: "企业 CEO",
179
179
  value: "企业 CEO"
@@ -212,7 +212,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
212
212
  type: "text",
213
213
  id: "company",
214
214
  value: "",
215
- required: true,
215
+ required: false,
216
216
  option: [],
217
217
  multiSelect: false,
218
218
  halfWidth: false
@@ -221,7 +221,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
221
221
  type: "dropSelect",
222
222
  id: "",
223
223
  value: "",
224
- required: true,
224
+ required: false,
225
225
  option: [{
226
226
  text: "1-30",
227
227
  value: "1-30"
@@ -285,7 +285,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
285
285
  text: "计划管理",
286
286
  value: "计划管理"
287
287
  }],
288
- required: true,
288
+ required: false,
289
289
  multiSelect: true,
290
290
  halfWidth: false
291
291
  }]
@@ -298,7 +298,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
298
298
  type: "text",
299
299
  id: "name",
300
300
  value: "",
301
- required: true,
301
+ required: false,
302
302
  option: [],
303
303
  multiSelect: false,
304
304
  halfWidth: false
@@ -316,7 +316,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
316
316
  type: "text",
317
317
  id: "company",
318
318
  value: "",
319
- required: true,
319
+ required: false,
320
320
  option: [],
321
321
  multiSelect: false,
322
322
  halfWidth: false
@@ -325,7 +325,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
325
325
  type: "dropSelect",
326
326
  id: "companyPersonNum",
327
327
  value: "1-30",
328
- required: true,
328
+ required: false,
329
329
  option: [{
330
330
  text: "1-30",
331
331
  value: "1-30"
@@ -399,7 +399,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
399
399
  type: "text",
400
400
  id: "name",
401
401
  value: "",
402
- required: true,
402
+ required: false,
403
403
  option: [],
404
404
  multiSelect: false,
405
405
  halfWidth: true
@@ -408,7 +408,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
408
408
  type: "dropSelect",
409
409
  id: "",
410
410
  value: "",
411
- required: true,
411
+ required: false,
412
412
  option: [{
413
413
  text: "企业 CEO",
414
414
  value: "企业 CEO"
@@ -447,7 +447,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
447
447
  type: "text",
448
448
  id: "company",
449
449
  value: "",
450
- required: true,
450
+ required: false,
451
451
  option: [],
452
452
  multiSelect: false,
453
453
  halfWidth: false
@@ -456,7 +456,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
456
456
  type: "dropSelect",
457
457
  id: "companyPersonNum",
458
458
  value: "1-30",
459
- required: true,
459
+ required: false,
460
460
  option: [{
461
461
  text: "1-30",
462
462
  value: "1-30"
@@ -533,7 +533,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
533
533
  type: "text",
534
534
  id: "name",
535
535
  value: "",
536
- required: true,
536
+ required: false,
537
537
  option: [],
538
538
  multiSelect: false,
539
539
  halfWidth: false
@@ -551,7 +551,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
551
551
  type: "text",
552
552
  id: "company",
553
553
  value: "",
554
- required: true,
554
+ required: false,
555
555
  option: [],
556
556
  multiSelect: false,
557
557
  halfWidth: false
@@ -560,7 +560,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
560
560
  type: "dropSelect",
561
561
  id: "companyPersonNum",
562
562
  value: "1-30",
563
- required: true,
563
+ required: false,
564
564
  option: [{
565
565
  text: "1-30",
566
566
  value: "1-30"
@@ -646,7 +646,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
646
646
  type: "text",
647
647
  id: "name",
648
648
  value: "",
649
- required: true,
649
+ required: false,
650
650
  option: [],
651
651
  multiSelect: false,
652
652
  halfWidth: true
@@ -655,7 +655,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
655
655
  type: "dropSelect",
656
656
  id: "",
657
657
  value: "",
658
- required: true,
658
+ required: false,
659
659
  option: [{
660
660
  text: "企业 CEO",
661
661
  value: "企业 CEO"
@@ -694,7 +694,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
694
694
  type: "text",
695
695
  id: "company",
696
696
  value: "",
697
- required: true,
697
+ required: false,
698
698
  option: [],
699
699
  multiSelect: false,
700
700
  halfWidth: false
@@ -703,7 +703,7 @@ var bookTypeInfo = (_bookTypeInfo = {}, _defineProperty(_bookTypeInfo, _interfac
703
703
  type: "dropSelect",
704
704
  id: "companyPersonNum",
705
705
  value: "1-30",
706
- required: true,
706
+ required: false,
707
707
  option: [{
708
708
  text: "1-30",
709
709
  value: "1-30"
@@ -13,12 +13,13 @@ var getTypeData = function getTypeData(type) {
13
13
 
14
14
  exports.getTypeData = getTypeData;
15
15
 
16
- var getSource = function getSource(param) {
17
- var reg = new RegExp("(^|&)".concat(param, "=([^&]*)(&|$)"));
18
- var r = window.location.search.substr(1).match(reg) || window.location.hash.substring(window.location.hash.search(/\?/) + 1).match(reg);
16
+ var getSource = function getSource() {
17
+ var reg = /source=[0-9]*/g;
18
+ var sourceQuery = window.location.href.match(reg);
19
19
 
20
- if (r != null) {
21
- return decodeURIComponent(r[2]);
20
+ if (sourceQuery) {
21
+ var source = decodeURIComponent(sourceQuery[0].split("=")[1]);
22
+ return source;
22
23
  }
23
24
 
24
25
  return 0;
@@ -2,6 +2,10 @@
2
2
  z-index: 100;
3
3
  }
4
4
 
5
+ .rc-dialog-header {
6
+ border-radius: 24px 24px 0 0;
7
+ }
8
+
5
9
  .rc-dialog-wrap {
6
10
  display: flex;
7
11
  justify-content: center;
@@ -45,9 +45,9 @@
45
45
 
46
46
  .tita-ui-change-person-photo__upload-right-input {
47
47
  position: absolute;
48
- top: 76px;
48
+ top: 0;
49
49
  width: 240px;
50
- height: 60px;
50
+ height: 240px;
51
51
  opacity: 0;
52
52
  cursor: pointer;
53
53
  }
@@ -112,16 +112,16 @@
112
112
  .tita-ui-change-person-photo__upload-left-box {
113
113
  width: 160px;
114
114
  height: 32px;
115
- background: #F0F2F5;
115
+ background: #f0f2f5;
116
116
  border-radius: 2px;
117
- border: 1px solid #E9ECF0;
117
+ border: 1px solid #e9ecf0;
118
118
  }
119
119
 
120
120
  .tita-ui-change-person-photo__upload-left-preview {
121
121
  margin-top: 8px;
122
122
  font-size: 14px;
123
123
  font-weight: 400;
124
- color: #3F4755;
124
+ color: #3f4755;
125
125
  line-height: 22px;
126
126
  }
127
127
 
@@ -142,18 +142,18 @@
142
142
  .tita-ui-change-person-photo__preview-box-bgc {
143
143
  width: 160px;
144
144
  height: 32px;
145
- background: #2879FF;
145
+ background: #2879ff;
146
146
  border-radius: 2px;
147
- border: 1px solid #E9ECF0;
147
+ border: 1px solid #e9ecf0;
148
148
  }
149
149
 
150
150
  .tita-ui-change-person-photo__preview-box-browser {
151
151
  margin-left: 16px;
152
152
  width: 176px;
153
153
  height: 48px;
154
- background: #F0F2F5;
154
+ background: #f0f2f5;
155
155
  border-radius: 2px;
156
- border: 1px solid #E9ECF0;
156
+ border: 1px solid #e9ecf0;
157
157
  background-image: url("./img/browser-preview-bgc.png");
158
158
  background-size: 170px 28px;
159
159
  background-position: center center;
@@ -191,7 +191,7 @@
191
191
  margin-top: 36px;
192
192
  font-size: 14px;
193
193
  font-weight: 400;
194
- color: #3F4755;
194
+ color: #3f4755;
195
195
  line-height: 22px;
196
196
  }
197
197
 
@@ -209,7 +209,7 @@
209
209
  right: 10px;
210
210
  font-size: 12px;
211
211
  font-weight: 400;
212
- color: #3F4755;
212
+ color: #3f4755;
213
213
  line-height: 18px;
214
214
  }
215
215
 
@@ -217,7 +217,7 @@
217
217
  margin-top: 58px;
218
218
  font-size: 14px;
219
219
  font-weight: 400;
220
- color: #3F4755;
220
+ color: #3f4755;
221
221
  line-height: 22px;
222
222
  }
223
223
 
@@ -255,6 +255,7 @@
255
255
  }
256
256
 
257
257
  .tita-ui-change-person-photo__title-again {
258
+ opacity: 0;
258
259
  margin-left: 92px;
259
260
  margin-top: 8px;
260
261
  font-size: 14px;
@@ -264,15 +265,16 @@
264
265
  }
265
266
 
266
267
  .tita-ui-change-person-photo__title-again--show {
268
+ opacity: 1;
267
269
  color: #2879ff;
268
270
  }
269
271
 
270
272
  .tita-ui-change-person-photo__title-again--show:hover {
271
- color: #5C8EFF;
273
+ color: #5c8eff;
272
274
  }
273
275
 
274
276
  .tita-ui-change-person-photo__title-again--hover {
275
- color: #5C8EFF;
277
+ color: #5c8eff;
276
278
  }
277
279
 
278
280
  .tita-ui-change-person-photo__title-preview {
@@ -56,7 +56,8 @@ function ChangePhoto(props) {
56
56
  onCancel = props.onCancel,
57
57
  _props$type = props.type,
58
58
  type = _props$type === void 0 ? "person" : _props$type,
59
- handleSuccessUploadPhoto = props.handleSuccessUploadPhoto;
59
+ handleSuccessUploadPhoto = props.handleSuccessUploadPhoto,
60
+ title = props.title;
60
61
  var modalRef = (0, _react.useRef)();
61
62
  var cropperRef = (0, _react.useRef)(null);
62
63
 
@@ -115,8 +116,8 @@ function ChangePhoto(props) {
115
116
  var n = bstr.length;
116
117
  var u8arr = new Uint8Array(n);
117
118
 
118
- while (n--) {
119
- u8arr[n] = bstr.charCodeAt(n);
119
+ for (var i = n; i > 0; i -= 1) {
120
+ u8arr[i] = bstr.charCodeAt(i);
120
121
  }
121
122
 
122
123
  return new File([u8arr], filename, {
@@ -162,18 +163,20 @@ function ChangePhoto(props) {
162
163
  };
163
164
 
164
165
  var handleSaveInfo = function handleSaveInfo() {
165
- if (!image) {} else if (type === "person") {
166
- (0, _requestApi.saveUserPhoto)(cropper).then(function (resp) {
167
- handleSuccessSave(resp);
168
- });
169
- } else if (type === "enterprise") {
170
- (0, _requestApi.saveTenantLogo)(cropper).then(function (resp) {
171
- handleSuccessSave(resp);
172
- });
173
- } else {
174
- (0, _requestApi.saveBrowserIcon)(cropper).then(function (resp) {
175
- handleSuccessSave(resp);
176
- });
166
+ if (image) {
167
+ if (type === "person") {
168
+ (0, _requestApi.saveUserPhoto)(cropper).then(function (resp) {
169
+ handleSuccessSave(resp);
170
+ });
171
+ } else if (type === "enterprise") {
172
+ (0, _requestApi.saveTenantLogo)(cropper).then(function (resp) {
173
+ handleSuccessSave(resp);
174
+ });
175
+ } else {
176
+ (0, _requestApi.saveBrowserIcon)(cropper).then(function (resp) {
177
+ handleSuccessSave(resp);
178
+ });
179
+ }
177
180
  }
178
181
  };
179
182
 
@@ -196,7 +199,7 @@ function ChangePhoto(props) {
196
199
  width: 480,
197
200
  mask: true,
198
201
  centered: true,
199
- title: (0, _getLocale.getLocale)("Set_PI_Uploadavatar"),
202
+ title: title,
200
203
  noHeadLine: true,
201
204
  maskClosable: false,
202
205
  onClose: handleCancel,
@@ -264,25 +267,30 @@ function ChangePhoto(props) {
264
267
  condition: type === "person"
265
268
  }, /*#__PURE__*/_react["default"].createElement("img", {
266
269
  src: cropData,
267
- className: "".concat(preCls, "__preview-box1")
270
+ className: "".concat(preCls, "__preview-box1"),
271
+ alt: "bigImage"
268
272
  }), /*#__PURE__*/_react["default"].createElement("img", {
269
273
  src: cropData,
270
- className: "".concat(preCls, "__preview-box2")
274
+ className: "".concat(preCls, "__preview-box2"),
275
+ alt: "middleImage"
271
276
  }), /*#__PURE__*/_react["default"].createElement("img", {
272
277
  src: cropData,
273
- className: "".concat(preCls, "__preview-box3")
278
+ className: "".concat(preCls, "__preview-box3"),
279
+ alt: "smallImage"
274
280
  })), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
275
281
  condition: type === "enterprise"
276
282
  }, /*#__PURE__*/_react["default"].createElement("img", {
277
283
  src: cropData,
278
- className: "".concat(preCls, "__preview-enterprise-img")
284
+ className: "".concat(preCls, "__preview-enterprise-img"),
285
+ alt: "previewImage"
279
286
  }), /*#__PURE__*/_react["default"].createElement("span", {
280
287
  className: "".concat(preCls, "__preview-enterprise-title")
281
288
  }, item === null || item === void 0 ? void 0 : item.previewTitle)), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
282
289
  condition: type === "browser"
283
290
  }, /*#__PURE__*/_react["default"].createElement("img", {
284
291
  src: cropData,
285
- className: "".concat(preCls, "__preview-browser-img")
292
+ className: "".concat(preCls, "__preview-browser-img"),
293
+ alt: "previewImage"
286
294
  }), /*#__PURE__*/_react["default"].createElement("span", {
287
295
  className: "".concat(preCls, "__preview-browser-name")
288
296
  }, "Tita"), /*#__PURE__*/_react["default"].createElement("span", {
@@ -94,11 +94,12 @@ function PersonPhoto() {
94
94
  onClick: handleChangePhoto
95
95
  }, (0, _getLocale.getLocale)("Set_PI_Clicktomodify")), /*#__PURE__*/_react["default"].createElement("span", {
96
96
  className: "".concat(prefix, "__main-tip")
97
- }, (0, _getLocale.getLocale)("Set_PI_Suggestedsize"), " ", "150*150px")), /*#__PURE__*/_react["default"].createElement(_uploadPhotoModal["default"], {
97
+ }, (0, _getLocale.getLocale)("Set_PI_Suggestedsize"), "150*150px")), /*#__PURE__*/_react["default"].createElement(_uploadPhotoModal["default"], {
98
98
  visible: visible,
99
99
  onCancel: handleCancel,
100
100
  type: "person",
101
- handleSuccessUploadPhoto: handleSuccessUploadPhoto
101
+ handleSuccessUploadPhoto: handleSuccessUploadPhoto,
102
+ title: (0, _getLocale.getLocale)("Set_PI_Uploadavatar")
102
103
  }));
103
104
  }
104
105
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.9.112",
3
+ "version": "1.9.116",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",