@titaui/pc 1.9.115 → 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.
@@ -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.115",
3
+ "version": "1.9.116",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",