@titaui/pc 1.10.6-3.beta-9 → 1.10.6-3.beta-14
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.
- package/.husky/pre-commit +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.css +17 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/index.css +10 -10
- package/lib/components/okr-detail/e-list/index.js +5 -8
- package/lib/components/okr-progress-detail/index.css +11 -10
- package/lib/components/okr-progress-detail/utils.js +4 -4
- package/lib/components/scrollbar/index.js +67 -9
- package/lib/components/scrollbar/scroll-mask/index.css +29 -0
- package/lib/components/scrollbar/scroll-mask/index.js +152 -0
- package/lib/components/tree/index.css +3 -2
- package/lib/components/upload-photo-modal/request-api.js +1 -17
- package/lib/pages/new-okr-list/index.js +1 -2
- package/lib/pages/personal-info/request-api.js +1 -1
- package/package.json +1 -1
package/.husky/pre-commit
CHANGED
|
@@ -5,6 +5,18 @@
|
|
|
5
5
|
display: flex;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
.tita-okrdt-tree__e-kr-node:hover .tita-okrdt-tree__e-kr-node-actions {
|
|
9
|
+
opacity: 1;
|
|
10
|
+
transition: all 0.2s linear;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tita-okrdt-tree__e-kr-node-preicon {
|
|
14
|
+
display: inline-block;
|
|
15
|
+
line-height: 22px;
|
|
16
|
+
color: #6f7886;
|
|
17
|
+
font-size: 16px;
|
|
18
|
+
}
|
|
19
|
+
|
|
8
20
|
.tita-okrdt-tree__e-kr-node-prefix {
|
|
9
21
|
display: inline-block;
|
|
10
22
|
height: 22px;
|
|
@@ -27,8 +39,10 @@
|
|
|
27
39
|
|
|
28
40
|
.tita-okrdt-tree__e-kr-node-actions {
|
|
29
41
|
display: inline-block;
|
|
42
|
+
opacity: 0;
|
|
30
43
|
position: absolute;
|
|
31
44
|
right: 0;
|
|
45
|
+
transition: all 0.2s linear;
|
|
32
46
|
}
|
|
33
47
|
|
|
34
48
|
.tita-okrdt-tree__e-kr-node-actions-create {
|
|
@@ -43,7 +57,7 @@
|
|
|
43
57
|
}
|
|
44
58
|
|
|
45
59
|
.tita-okrdt-tree__e-kr-node-actions-create:hover {
|
|
46
|
-
color: #
|
|
60
|
+
color: #5c8eff;
|
|
47
61
|
}
|
|
48
62
|
|
|
49
63
|
.tita-okrdt-tree__e-kr-node-actions-create .tu-icon-add1 {
|
|
@@ -63,11 +77,11 @@
|
|
|
63
77
|
}
|
|
64
78
|
|
|
65
79
|
.tita-okrdt-tree__e-kr-node-actions-connect:hover {
|
|
66
|
-
color: #
|
|
80
|
+
color: #5c8eff;
|
|
67
81
|
}
|
|
68
82
|
|
|
69
83
|
.e-kr-node-layer-icon {
|
|
70
|
-
color: #
|
|
84
|
+
color: #89919f;
|
|
71
85
|
}
|
|
72
86
|
|
|
73
87
|
.e-kr-node__guanlian-icon {
|
|
@@ -172,7 +172,9 @@ var EKrNode = function EKrNode(props) {
|
|
|
172
172
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
173
|
key: index,
|
|
174
174
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-kr-node"))
|
|
175
|
-
}, isOTask ?
|
|
175
|
+
}, isOTask ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
176
|
+
className: (0, _classnames["default"])("tu-icon-O ".concat(_precls["default"], "__e-kr-node-preicon"))
|
|
177
|
+
}) : /*#__PURE__*/_react["default"].createElement("span", {
|
|
176
178
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-kr-node-prefix"))
|
|
177
179
|
}, "KR", index + 1), /*#__PURE__*/_react["default"].createElement("span", {
|
|
178
180
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__e-kr-node-title")),
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
line-height: 18px;
|
|
85
85
|
display: inline-flex;
|
|
86
86
|
align-items: center;
|
|
87
|
+
justify-content: flex-end;
|
|
87
88
|
box-sizing: border-box;
|
|
88
89
|
width: 78px;
|
|
89
90
|
height: 26px;
|
|
90
91
|
padding: 4px;
|
|
91
92
|
text-align: left;
|
|
92
93
|
line-height: 26px;
|
|
93
|
-
margin-left: 16px;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
.tita-okrdt-tree__e-task-node-actions-date > span {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
color: #89919f;
|
|
104
104
|
cursor: auto;
|
|
105
105
|
width: 64px;
|
|
106
|
-
margin-left:
|
|
106
|
+
margin-left: 16px;
|
|
107
107
|
margin-right: 4px;
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -171,14 +171,14 @@
|
|
|
171
171
|
height: 20px;
|
|
172
172
|
font-size: 12px;
|
|
173
173
|
font-weight: 400;
|
|
174
|
-
color: #
|
|
174
|
+
color: #f05e5e;
|
|
175
175
|
background: rgba(240, 94, 94, 0.1);
|
|
176
176
|
border-radius: 10px;
|
|
177
177
|
margin-left: 8px;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
.tita-okrdt-tree__e-project-node-gray {
|
|
181
|
-
color: #
|
|
181
|
+
color: #bfc7d5 !important;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
.tita-okrdt-tree__e-project-node-priority {
|
|
@@ -235,13 +235,13 @@
|
|
|
235
235
|
line-height: 18px;
|
|
236
236
|
display: inline-flex;
|
|
237
237
|
align-items: center;
|
|
238
|
+
justify-content: flex-end;
|
|
238
239
|
box-sizing: border-box;
|
|
239
240
|
width: 78px;
|
|
240
241
|
height: 26px;
|
|
241
242
|
padding: 4px;
|
|
242
243
|
text-align: left;
|
|
243
244
|
line-height: 26px;
|
|
244
|
-
margin-left: 16px;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
.tita-okrdt-tree__e-project-node-actions-date > span {
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
color: #89919f;
|
|
255
255
|
cursor: auto;
|
|
256
256
|
width: 64px;
|
|
257
|
-
margin-left:
|
|
257
|
+
margin-left: 16px;
|
|
258
258
|
margin-right: 4px;
|
|
259
259
|
}
|
|
260
260
|
|
|
@@ -357,13 +357,13 @@
|
|
|
357
357
|
line-height: 18px;
|
|
358
358
|
display: inline-flex;
|
|
359
359
|
align-items: center;
|
|
360
|
+
justify-content: flex-end;
|
|
360
361
|
box-sizing: border-box;
|
|
361
362
|
width: 78px;
|
|
362
363
|
height: 26px;
|
|
363
364
|
padding: 4px;
|
|
364
365
|
text-align: left;
|
|
365
366
|
line-height: 26px;
|
|
366
|
-
margin-left: 16px;
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
.tita-okrdt-tree__e-task-level2-node-actions-date > span {
|
|
@@ -376,7 +376,7 @@
|
|
|
376
376
|
color: #89919f;
|
|
377
377
|
cursor: auto;
|
|
378
378
|
width: 64px;
|
|
379
|
-
margin-left:
|
|
379
|
+
margin-left: 16px;
|
|
380
380
|
margin-right: 4px;
|
|
381
381
|
}
|
|
382
382
|
|
|
@@ -398,7 +398,7 @@
|
|
|
398
398
|
.tita-okrdt-tree__e-empty-node {
|
|
399
399
|
font-size: 12px;
|
|
400
400
|
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
401
|
-
color: #
|
|
401
|
+
color: #a4acb9;
|
|
402
402
|
line-height: 18px;
|
|
403
403
|
padding-left: 12px;
|
|
404
404
|
}
|
|
@@ -408,5 +408,5 @@
|
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
.e-node-status-icon {
|
|
411
|
-
color: #
|
|
411
|
+
color: #89919f;
|
|
412
412
|
}
|
|
@@ -183,13 +183,6 @@ function Elist(props, ref) {
|
|
|
183
183
|
setTotalDataNum(totalLength);
|
|
184
184
|
setIsEmpty && setIsEmpty(!totalLength);
|
|
185
185
|
}, [krList, oEList]);
|
|
186
|
-
var krsTree = (0, _react.useCallback)(function (kr) {
|
|
187
|
-
return /*#__PURE__*/_react["default"].createElement(_okrTree["default"], {
|
|
188
|
-
key: Math.random(),
|
|
189
|
-
data: [kr],
|
|
190
|
-
defaultExpandedKeys: expandedKrEs
|
|
191
|
-
});
|
|
192
|
-
}, [expandedKrEs, krList]);
|
|
193
186
|
return /*#__PURE__*/_react["default"].createElement(_context.EListContext.Provider, {
|
|
194
187
|
value: {
|
|
195
188
|
refreshEList: function refreshEList() {
|
|
@@ -214,7 +207,11 @@ function Elist(props, ref) {
|
|
|
214
207
|
}, krList.map(function (kr, index) {
|
|
215
208
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], {
|
|
216
209
|
padding: layoutPadding
|
|
217
|
-
},
|
|
210
|
+
}, /*#__PURE__*/_react["default"].createElement(_okrTree["default"], {
|
|
211
|
+
key: Math.random(),
|
|
212
|
+
data: [kr],
|
|
213
|
+
defaultExpandedKeys: expandedKrEs
|
|
214
|
+
})), // kr左后一个节点 && 没有 OE 时,不显示横线
|
|
218
215
|
!(index + 1 == krList.length && oEList.length == 0) && hasdivider && /*#__PURE__*/_react["default"].createElement("div", {
|
|
219
216
|
className: "e__divider"
|
|
220
217
|
}));
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
8
|
position: relative;
|
|
9
|
+
height: 24px;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
.okr-progress-item-wrapper .okr-progress-item-content__icon-state {
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
.okr-progress-item-wrapper .okr-progress-item__percent {
|
|
16
17
|
font-size: 16px;
|
|
17
18
|
font-weight: 600;
|
|
18
|
-
color: #
|
|
19
|
+
color: #3f4755;
|
|
19
20
|
line-height: 24px;
|
|
20
21
|
margin-left: 12px;
|
|
21
22
|
}
|
|
@@ -28,11 +29,11 @@
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
.okr-progress-item-wrapper .okr-progress-item__percent--advance {
|
|
31
|
-
color: #
|
|
32
|
+
color: #5ad8a6;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
.okr-progress-item-wrapper .okr-progress-item__percent--delay {
|
|
35
|
-
color: #
|
|
36
|
+
color: #f05e5e;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
.okr-progress-item-wrapper .okr-progress-item-content--edit {
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
.okr-progress-item-wrapper .okr-progress-item-content--edit:hover {
|
|
45
|
-
background: #
|
|
46
|
+
background: #f7f8fa;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
.okr-progress-item-wrapper .okr-progress-item-content__body-wrapper {
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
|
|
61
62
|
.okr-progress-item-wrapper .okr-progress-item-content__body-wrapper .okr-progress-item-content__body .okr-progress-item__content {
|
|
62
63
|
font-size: 14px;
|
|
63
|
-
color: #
|
|
64
|
+
color: #3f4755;
|
|
64
65
|
line-height: 22px;
|
|
65
66
|
white-space: pre-wrap;
|
|
66
67
|
}
|
|
@@ -73,7 +74,7 @@
|
|
|
73
74
|
|
|
74
75
|
.okr-progress-item-wrapper .okr-progress-item__content-bottom {
|
|
75
76
|
font-size: 12px;
|
|
76
|
-
color: #
|
|
77
|
+
color: #a4acb9;
|
|
77
78
|
line-height: 18px;
|
|
78
79
|
margin-top: 6px;
|
|
79
80
|
display: flex;
|
|
@@ -88,12 +89,12 @@
|
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
.okr-progress-item-wrapper .okr-progress-item__content-bottom .okr-progress-item__bottom-func-btns .okr-progress-item__bottom-btn--edit:hover {
|
|
91
|
-
color: #
|
|
92
|
+
color: #2879ff;
|
|
92
93
|
cursor: pointer;
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
.okr-progress-item-wrapper .okr-progress-item__content-bottom .okr-progress-item__bottom-func-btns .okr-progress-item__bottom-btn--delete:hover {
|
|
96
|
-
color: #
|
|
97
|
+
color: #f05e5e;
|
|
97
98
|
cursor: pointer;
|
|
98
99
|
}
|
|
99
100
|
|
|
@@ -106,7 +107,7 @@
|
|
|
106
107
|
display: inline-block;
|
|
107
108
|
width: 1px;
|
|
108
109
|
height: 16px;
|
|
109
|
-
background: linear-gradient(180deg, rgba(213, 219, 226, 0) 0%, #
|
|
110
|
+
background: linear-gradient(180deg, rgba(213, 219, 226, 0) 0%, #d5dbe2 49%, rgba(213, 219, 226, 0) 100%);
|
|
110
111
|
border-radius: 2px;
|
|
111
112
|
}
|
|
112
113
|
|
|
@@ -129,7 +130,7 @@
|
|
|
129
130
|
right: 0;
|
|
130
131
|
font-size: 12px;
|
|
131
132
|
font-weight: 400;
|
|
132
|
-
color: #
|
|
133
|
+
color: #a4acb9;
|
|
133
134
|
line-height: 24px;
|
|
134
135
|
padding-right: 16px;
|
|
135
136
|
}
|
|
@@ -22,8 +22,8 @@ var getTimeString = function getTimeString(time, nowTime) {
|
|
|
22
22
|
var timeYear = timeDateObj.getFullYear();
|
|
23
23
|
var timeMonth = timeDateObj.getMonth() + 1;
|
|
24
24
|
var timeDate = timeDateObj.getDate();
|
|
25
|
-
var timeHours = timeDateObj.getHours();
|
|
26
|
-
var timeMinutes = timeDateObj.getMinutes();
|
|
25
|
+
var timeHours = timeDateObj.getHours() < 10 ? "0".concat(timeDateObj.getHours()) : timeDateObj.getHours();
|
|
26
|
+
var timeMinutes = timeDateObj.getMinutes() < 10 ? "0".concat(timeDateObj.getMinutes()) : timeDateObj.getMinutes();
|
|
27
27
|
var nowMilliSecond = nowTime.getTime();
|
|
28
28
|
var nowYear = nowTime.getFullYear();
|
|
29
29
|
var nowDate = nowTime.getDate();
|
|
@@ -56,11 +56,11 @@ var getTimeString = function getTimeString(time, nowTime) {
|
|
|
56
56
|
if (timeYear === nowYear) {
|
|
57
57
|
var _dateStr = months[timeMonth - 1] + (_getLocale.isEn ? " ".concat(timeDate, " ") : "".concat(timeDate, "\u65E5"));
|
|
58
58
|
|
|
59
|
-
return "".concat(_dateStr, " "
|
|
59
|
+
return "".concat(_dateStr, " ", "".concat(timeHours, ":").concat(timeMinutes));
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
var dateStr = (_getLocale.isEn ? "" : "".concat(timeYear, "\u5E74")) + months[timeMonth - 1] + (_getLocale.isEn ? " ".concat(timeDate, " ") : "".concat(timeDate, "\u65E5")) + (_getLocale.isEn ? ",".concat(timeYear) : "");
|
|
63
|
-
return "".concat(dateStr, " "
|
|
63
|
+
return "".concat(dateStr, " ", "".concat(timeHours, ":").concat(timeMinutes));
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
exports.getTimeString = getTimeString;
|
|
@@ -1,39 +1,97 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = void 0;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
10
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
13
|
|
|
12
14
|
var _simplebarReact = _interopRequireDefault(require("./simplebar-react"));
|
|
13
15
|
|
|
16
|
+
var _scrollMask = _interopRequireDefault(require("./scroll-mask"));
|
|
17
|
+
|
|
14
18
|
require("./index.css");
|
|
15
19
|
|
|
16
20
|
var _excluded = ["children", "style"];
|
|
17
21
|
|
|
18
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
23
|
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
20
28
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
29
|
|
|
30
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
|
+
|
|
32
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
33
|
+
|
|
34
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
35
|
+
|
|
36
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
37
|
+
|
|
38
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
39
|
+
|
|
40
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
+
|
|
22
42
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
43
|
|
|
24
44
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
25
45
|
|
|
26
46
|
var preCls = "titaui-scrollbar";
|
|
27
|
-
|
|
28
|
-
function _default(props) {
|
|
47
|
+
var ScrollBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
29
48
|
var children = props.children,
|
|
30
|
-
style = props.style,
|
|
31
|
-
|
|
49
|
+
_props$style = props.style,
|
|
50
|
+
style = _props$style === void 0 ? {
|
|
51
|
+
height: "100%"
|
|
52
|
+
} : _props$style,
|
|
53
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
54
|
+
|
|
55
|
+
var _useState = (0, _react.useState)(),
|
|
56
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
57
|
+
scrollElement = _useState2[0],
|
|
58
|
+
setScrollElement = _useState2[1];
|
|
32
59
|
|
|
60
|
+
var _useState3 = (0, _react.useState)(),
|
|
61
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
62
|
+
contentElement = _useState4[0],
|
|
63
|
+
setContentElement = _useState4[1];
|
|
33
64
|
|
|
34
|
-
|
|
65
|
+
var simpleBarRef = (0, _react.useRef)();
|
|
66
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
67
|
+
return {
|
|
68
|
+
scrollElement: scrollElement,
|
|
69
|
+
contentElement: contentElement
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
(0, _react.useEffect)(function () {
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
setScrollElement(simpleBarRef === null || simpleBarRef === void 0 ? void 0 : simpleBarRef.current.getScrollElement()); // @ts-ignore
|
|
75
|
+
|
|
76
|
+
setContentElement(simpleBarRef === null || simpleBarRef === void 0 ? void 0 : simpleBarRef.current.getContentElement());
|
|
77
|
+
}, []);
|
|
78
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
|
+
style: {
|
|
80
|
+
height: "100%"
|
|
81
|
+
}
|
|
82
|
+
}, /*#__PURE__*/_react["default"].createElement(_simplebarReact["default"], _extends({
|
|
83
|
+
ref: simpleBarRef,
|
|
35
84
|
className: (0, _classnames["default"])(preCls),
|
|
36
85
|
timeout: 800,
|
|
37
86
|
style: style
|
|
38
|
-
}, restProps), children);
|
|
39
|
-
}
|
|
87
|
+
}, restProps), children));
|
|
88
|
+
});
|
|
89
|
+
ScrollBar.defaultProps = {
|
|
90
|
+
style: {
|
|
91
|
+
height: "100%"
|
|
92
|
+
}
|
|
93
|
+
}; // @ts-ignore
|
|
94
|
+
|
|
95
|
+
ScrollBar.Mask = _scrollMask["default"];
|
|
96
|
+
var _default = ScrollBar;
|
|
97
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.titaui-scroll-mask {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: calc(100% - 16px);
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.titaui-scroll-mask__top {
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 0;
|
|
10
|
+
width: 100%;
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.titaui-scroll-mask__top--hide {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.titaui-scroll-mask__bottom {
|
|
20
|
+
position: absolute;
|
|
21
|
+
bottom: 0;
|
|
22
|
+
width: 100%;
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.titaui-scroll-mask__bottom--hide {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _scrollbar = _interopRequireDefault(require("../../scrollbar"));
|
|
15
|
+
|
|
16
|
+
require("./index.css");
|
|
17
|
+
|
|
18
|
+
var _excluded = ["children", "maskHeight", "style"];
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
26
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
+
|
|
28
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
+
|
|
30
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
|
+
|
|
32
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
33
|
+
|
|
34
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
35
|
+
|
|
36
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
37
|
+
|
|
38
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
39
|
+
|
|
40
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
+
|
|
42
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
43
|
+
|
|
44
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
45
|
+
|
|
46
|
+
var preCls = "titaui-scroll-mask";
|
|
47
|
+
|
|
48
|
+
var ScrollBarMask = function ScrollBarMask(_ref) {
|
|
49
|
+
var _scrollRef$current, _scrollRef$current2;
|
|
50
|
+
|
|
51
|
+
var children = _ref.children,
|
|
52
|
+
maskHeight = _ref.maskHeight,
|
|
53
|
+
_ref$style = _ref.style,
|
|
54
|
+
style = _ref$style === void 0 ? {
|
|
55
|
+
height: "100%"
|
|
56
|
+
} : _ref$style,
|
|
57
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
58
|
+
|
|
59
|
+
var _useState = (0, _react.useState)(true),
|
|
60
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
61
|
+
isScrollToTop = _useState2[0],
|
|
62
|
+
setIsScrollToTop = _useState2[1];
|
|
63
|
+
|
|
64
|
+
var _useState3 = (0, _react.useState)(false),
|
|
65
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
66
|
+
isScrollToBottom = _useState4[0],
|
|
67
|
+
setIsScrollToBottom = _useState4[1];
|
|
68
|
+
|
|
69
|
+
var _useState5 = (0, _react.useState)(false),
|
|
70
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
71
|
+
isOverFlow = _useState6[0],
|
|
72
|
+
setIsOverFlow = _useState6[1];
|
|
73
|
+
|
|
74
|
+
var scrollRef = (0, _react.useRef)(); // @ts-ignore
|
|
75
|
+
|
|
76
|
+
var scrollElement = (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.scrollElement; // @ts-ignore
|
|
77
|
+
|
|
78
|
+
var contentElement = (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 ? void 0 : _scrollRef$current2.contentElement;
|
|
79
|
+
|
|
80
|
+
var handleScroll = function handleScroll() {
|
|
81
|
+
// 判断是否滚动到顶部
|
|
82
|
+
if (!(scrollElement !== null && scrollElement !== void 0 && scrollElement.scrollTop)) {
|
|
83
|
+
setIsScrollToTop(true);
|
|
84
|
+
} else {
|
|
85
|
+
setIsScrollToTop(false);
|
|
86
|
+
} // 判断是否滚动到底部
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
if (scrollElement.scrollTop + scrollElement.offsetHeight === scrollElement.scrollHeight) {
|
|
90
|
+
setIsScrollToBottom(true);
|
|
91
|
+
} else {
|
|
92
|
+
setIsScrollToBottom(false);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
(0, _react.useEffect)(function () {
|
|
97
|
+
// 判断是否出现滚动条
|
|
98
|
+
if ((scrollElement === null || scrollElement === void 0 ? void 0 : scrollElement.offsetHeight) < (scrollElement === null || scrollElement === void 0 ? void 0 : scrollElement.scrollHeight)) {
|
|
99
|
+
setIsOverFlow(true);
|
|
100
|
+
}
|
|
101
|
+
}, [scrollElement === null || scrollElement === void 0 ? void 0 : scrollElement.scrollHeight]);
|
|
102
|
+
(0, _react.useEffect)(function () {
|
|
103
|
+
var mutation;
|
|
104
|
+
|
|
105
|
+
if (contentElement) {
|
|
106
|
+
var config = {
|
|
107
|
+
characterData: true,
|
|
108
|
+
// 监听元素内的数据变动
|
|
109
|
+
childList: true,
|
|
110
|
+
// 监听子元素数量变动(子元素的属性变化不会触发事件)(只针对一级子元素,孙子元素的数量变化不会触发事件)
|
|
111
|
+
subtree: true // 将observer事件下发到目标元素的所有子元素,相当于对子元素也进行了observer
|
|
112
|
+
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
var recalculate = function recalculate() {
|
|
116
|
+
if (contentElement.scrollHeight > scrollElement.offsetHeight) {
|
|
117
|
+
setIsOverFlow(true);
|
|
118
|
+
} else {
|
|
119
|
+
setIsOverFlow(false);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
mutation = new MutationObserver(recalculate);
|
|
124
|
+
mutation.observe(contentElement, config);
|
|
125
|
+
}
|
|
126
|
+
}, [contentElement]);
|
|
127
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
128
|
+
className: preCls,
|
|
129
|
+
onScroll: handleScroll
|
|
130
|
+
}, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], _extends({
|
|
131
|
+
ref: scrollRef,
|
|
132
|
+
style: style
|
|
133
|
+
}, restProps), children), isOverFlow && /*#__PURE__*/_react["default"].createElement("div", {
|
|
134
|
+
className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__top--hide"), isScrollToTop), _defineProperty({}, "".concat(preCls, "__top"), !isScrollToTop)),
|
|
135
|
+
style: {
|
|
136
|
+
height: "".concat(maskHeight, "px")
|
|
137
|
+
}
|
|
138
|
+
}), isOverFlow && /*#__PURE__*/_react["default"].createElement("div", {
|
|
139
|
+
className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__bottom--hide"), isScrollToBottom), _defineProperty({}, "".concat(preCls, "__bottom"), !isScrollToBottom)),
|
|
140
|
+
style: {
|
|
141
|
+
height: "".concat(maskHeight, "px")
|
|
142
|
+
}
|
|
143
|
+
}));
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
ScrollBarMask.defaultProps = {
|
|
147
|
+
style: {
|
|
148
|
+
height: "100%"
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
var _default = ScrollBarMask;
|
|
152
|
+
exports["default"] = _default;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
position: absolute;
|
|
38
38
|
width: 100%;
|
|
39
39
|
bottom: 0;
|
|
40
|
-
content:
|
|
40
|
+
content: '';
|
|
41
41
|
border-bottom: 2px solid #2879ff;
|
|
42
42
|
z-index: 1;
|
|
43
43
|
}
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
position: absolute;
|
|
52
52
|
width: 100%;
|
|
53
53
|
top: 0;
|
|
54
|
-
content:
|
|
54
|
+
content: '';
|
|
55
55
|
border-top: 2px solid #2879ff;
|
|
56
56
|
z-index: 1;
|
|
57
57
|
}
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
align-items: center;
|
|
62
62
|
line-height: unset;
|
|
63
63
|
overflow: hidden;
|
|
64
|
+
border-radius: 8px;
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
.titaui-tree .rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper {
|
|
@@ -3,34 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.saveUserPhoto = exports.
|
|
7
|
-
|
|
8
|
-
var _qs = _interopRequireDefault(require("qs"));
|
|
6
|
+
exports.saveUserPhoto = exports.saveTenantLogo = exports.saveBrowserIcon = exports.getUserInfoFun = void 0;
|
|
9
7
|
|
|
10
8
|
var _request = require("../../utils/request");
|
|
11
9
|
|
|
12
10
|
var _bsGlobal = require("../../utils/bs-global");
|
|
13
11
|
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
16
12
|
var getUserInfoFun = function getUserInfoFun() {
|
|
17
13
|
return (0, _request.rpost)("v1")("manage/user/profile?toUserId=".concat((0, _bsGlobal.getUserInfo)().Id));
|
|
18
14
|
};
|
|
19
15
|
|
|
20
16
|
exports.getUserInfoFun = getUserInfoFun;
|
|
21
17
|
|
|
22
|
-
var saveUserInfo = function saveUserInfo(_ref) {
|
|
23
|
-
var data = _ref.data;
|
|
24
|
-
return (0, _request.rput)("v1")("manage/user/update", data, {
|
|
25
|
-
headers: {
|
|
26
|
-
"Content-Type": "multipart/form-data"
|
|
27
|
-
},
|
|
28
|
-
transformRequest: _qs["default"].stringify
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
exports.saveUserInfo = saveUserInfo;
|
|
33
|
-
|
|
34
18
|
var saveUserPhoto = function saveUserPhoto(params) {
|
|
35
19
|
return (0, _request.rpost)("v1")("manage/user/avatar", params, {
|
|
36
20
|
headers: {
|
|
@@ -214,8 +214,7 @@ var NewOkrList = function NewOkrList(props) {
|
|
|
214
214
|
if (!relation) {
|
|
215
215
|
request = (0, _requestApi.okrSearch)(params);
|
|
216
216
|
} else {
|
|
217
|
-
|
|
218
|
-
request = (0, _requestApi.okrSearch)(params);
|
|
217
|
+
request = (0, _requestApi.okrList)(params);
|
|
219
218
|
}
|
|
220
219
|
|
|
221
220
|
setLoading(true);
|
|
@@ -21,7 +21,7 @@ exports.getUserInfoFun = getUserInfoFun;
|
|
|
21
21
|
|
|
22
22
|
var saveUserInfo = function saveUserInfo(_ref) {
|
|
23
23
|
var data = _ref.data;
|
|
24
|
-
return (0, _request.rput)("v1")("manage/user/
|
|
24
|
+
return (0, _request.rput)("v1")("manage/user/updatebasic", data, {
|
|
25
25
|
headers: {
|
|
26
26
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
27
27
|
},
|