@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.
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
|
|
46
46
|
.tita-ui-change-person-photo__upload-right-input {
|
|
47
47
|
position: absolute;
|
|
48
|
-
top:
|
|
48
|
+
top: 0;
|
|
49
49
|
width: 240px;
|
|
50
|
-
height:
|
|
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: #
|
|
115
|
+
background: #f0f2f5;
|
|
116
116
|
border-radius: 2px;
|
|
117
|
-
border: 1px solid #
|
|
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: #
|
|
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: #
|
|
145
|
+
background: #2879ff;
|
|
146
146
|
border-radius: 2px;
|
|
147
|
-
border: 1px solid #
|
|
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: #
|
|
154
|
+
background: #f0f2f5;
|
|
155
155
|
border-radius: 2px;
|
|
156
|
-
border: 1px solid #
|
|
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: #
|
|
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: #
|
|
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: #
|
|
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: #
|
|
273
|
+
color: #5c8eff;
|
|
272
274
|
}
|
|
273
275
|
|
|
274
276
|
.tita-ui-change-person-photo__title-again--hover {
|
|
275
|
-
color: #
|
|
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
|
-
|
|
119
|
-
u8arr[
|
|
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 (
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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:
|
|
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"), "
|
|
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
|
|