@titaui/pc 1.7.18 → 1.7.22
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/lib/components/cascader/index.css +38 -11
- package/lib/components/cascader/index.js +10 -5
- package/lib/components/cascader/time.js +31 -0
- package/lib/components/create-okr-modal/index.js +6 -6
- package/lib/components/form/form-fields/group/index.js +2 -1
- package/lib/components/menus/components/menu-tree/index.css +4 -0
- package/lib/components/nav-top/components/user-own-menu/utils.js +1 -1
- package/lib/components/okr-detail/e-list/images/e-list-empty.png +0 -0
- package/lib/components/okr-detail/e-list/index.css +19 -1
- package/lib/components/okr-detail/e-list/index.js +32 -8
- package/lib/components/okr-detail/e-list/util.js +49 -22
- package/lib/components/scrollbar/index.js +13 -3
- package/lib/components/select-tags/index.css +51 -40
- package/lib/components/select-tags/index.js +8 -10
- package/lib/components/upvote/index.js +19 -14
- package/lib/index.js +8 -0
- package/lib/utils/bs-global.js +0 -7
- package/package.json +1 -1
- package/src/components/cascader/index.scss +50 -27
- package/src/components/cascader/index.tsx +18 -16
- package/src/components/cascader/time.js +13 -0
- package/src/components/create-okr-modal/index.tsx +6 -6
- package/src/components/form/form-fields/group/index.tsx +3 -3
- package/src/components/menus/components/menu-tree/index.scss +3 -0
- package/src/components/menus/export-modules/manage-menus/index.tsx +1 -1
- package/src/components/nav-top/components/user-own-menu/utils.ts +1 -1
- package/src/components/okr-detail/e-list/images/e-list-empty.png +0 -0
- package/src/components/okr-detail/e-list/index.js +121 -70
- package/src/components/okr-detail/e-list/index.scss +17 -2
- package/src/components/okr-detail/e-list/util.ts +44 -18
- package/src/components/scrollbar/index.tsx +2 -1
- package/src/components/select-tags/index.scss +129 -105
- package/src/components/select-tags/index.tsx +32 -32
- package/src/components/upvote/index.tsx +12 -9
- package/src/index.js +2 -1
- package/src/utils/bs-global.js +0 -10
|
@@ -1,34 +1,39 @@
|
|
|
1
|
-
.
|
|
1
|
+
.titaui-select-tags {
|
|
2
|
+
display: flex;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.titaui-select-tags .rc-select-single:not(.rc-select-customize-input) .rc-select-selector {
|
|
2
6
|
border: 1px solid #DFE3EA;
|
|
3
7
|
}
|
|
4
8
|
|
|
5
|
-
.rc-select-focused .rc-select-selector {
|
|
9
|
+
.titaui-select-tags .rc-select-focused .rc-select-selector {
|
|
6
10
|
border: 1px solid #DFE3EA !important;
|
|
7
11
|
}
|
|
8
12
|
|
|
9
|
-
.rc-select-selection-item-remove {
|
|
13
|
+
.titaui-select-tags .rc-select-selection-item-remove {
|
|
10
14
|
display: flex;
|
|
11
15
|
align-items: center;
|
|
12
16
|
}
|
|
13
17
|
|
|
14
|
-
.rc-select-multiple .rc-select-selector .rc-select-selection-search-input {
|
|
18
|
+
.titaui-select-tags .rc-select-multiple .rc-select-selector .rc-select-selection-search-input {
|
|
15
19
|
display: none;
|
|
16
20
|
}
|
|
17
21
|
|
|
18
|
-
.rc-select-single:not(.rc-select-customize-input) .rc-select-selector .rc-select-selection-search-input {
|
|
22
|
+
.titaui-select-tags .rc-select-single:not(.rc-select-customize-input) .rc-select-selector .rc-select-selection-search-input {
|
|
19
23
|
display: none;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
|
-
.
|
|
26
|
+
.titaui-select-tags .rc-select-single .rc-select-selector .rc-select-selection-item,
|
|
27
|
+
.titaui-select-tags .rc-select-single .rc-select-selector .rc-select-selection-placeholder {
|
|
23
28
|
top: unset;
|
|
24
29
|
left: 12px;
|
|
25
30
|
}
|
|
26
31
|
|
|
27
|
-
.rc-select-single .rc-select-selector {
|
|
32
|
+
.titaui-select-tags .rc-select-single .rc-select-selector {
|
|
28
33
|
align-items: center;
|
|
29
34
|
}
|
|
30
35
|
|
|
31
|
-
.rc-select-selector {
|
|
36
|
+
.titaui-select-tags .rc-select-selector {
|
|
32
37
|
cursor: pointer;
|
|
33
38
|
padding: 0 12px;
|
|
34
39
|
background: #FFFFFF;
|
|
@@ -38,30 +43,30 @@
|
|
|
38
43
|
box-sizing: border-box;
|
|
39
44
|
}
|
|
40
45
|
|
|
41
|
-
.rc-select-multiple .rc-select-selector {
|
|
46
|
+
.titaui-select-tags .rc-select-multiple .rc-select-selector {
|
|
42
47
|
height: unset;
|
|
43
48
|
padding: 7px 12px 0;
|
|
44
49
|
border: 1px solid #DFE3EA;
|
|
45
50
|
}
|
|
46
51
|
|
|
47
|
-
.rc-select-multiple .rc-select-selector .rc-select-selection-overflow-item {
|
|
52
|
+
.titaui-select-tags .rc-select-multiple .rc-select-selector .rc-select-selection-overflow-item {
|
|
48
53
|
display: flex;
|
|
49
54
|
align-items: center;
|
|
50
55
|
margin-bottom: 7px;
|
|
51
56
|
}
|
|
52
57
|
|
|
53
|
-
.rc-select-multiple .rc-select-selector .rc-select-selection-placeholder {
|
|
58
|
+
.titaui-select-tags .rc-select-multiple .rc-select-selector .rc-select-selection-placeholder {
|
|
54
59
|
line-height: 1;
|
|
55
60
|
margin-bottom: 7px;
|
|
56
61
|
position: relative;
|
|
57
62
|
top: -2px;
|
|
58
63
|
}
|
|
59
64
|
|
|
60
|
-
.rc-select-selection-item-content {
|
|
65
|
+
.titaui-select-tags .rc-select-selection-item-content {
|
|
61
66
|
margin-right: 8px;
|
|
62
67
|
}
|
|
63
68
|
|
|
64
|
-
.rc-select-multiple .rc-select-selector .rc-select-selection-item {
|
|
69
|
+
.titaui-select-tags .rc-select-multiple .rc-select-selector .rc-select-selection-item {
|
|
65
70
|
font-size: 12px;
|
|
66
71
|
flex: none;
|
|
67
72
|
height: 20px;
|
|
@@ -73,17 +78,32 @@
|
|
|
73
78
|
padding: 0 5px 0 10px;
|
|
74
79
|
}
|
|
75
80
|
|
|
76
|
-
.rc-select-multiple .rc-select-selector .rc-select-selection-item .tu-icon-cross {
|
|
81
|
+
.titaui-select-tags .rc-select-multiple .rc-select-selector .rc-select-selection-item .tu-icon-cross {
|
|
77
82
|
cursor: pointer;
|
|
78
83
|
color: #a4acB9;
|
|
79
84
|
font-size: 14px;
|
|
80
85
|
}
|
|
81
86
|
|
|
82
|
-
.rc-select-
|
|
83
|
-
|
|
87
|
+
.titaui-select-tags .titaui-select-noborder .rc-select-selector {
|
|
88
|
+
border: none !important;
|
|
89
|
+
height: 22px;
|
|
90
|
+
line-height: 1;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.titaui-select-tags .rc-select-arrow {
|
|
94
|
+
font-size: 16px;
|
|
95
|
+
transform: scale(0.5);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.titaui-select-tags .rc-select-show-arrow .rc-select-arrow {
|
|
99
|
+
top: 0;
|
|
100
|
+
bottom: 0;
|
|
101
|
+
margin: auto;
|
|
102
|
+
right: 12px;
|
|
103
|
+
height: 22px;
|
|
84
104
|
}
|
|
85
105
|
|
|
86
|
-
.
|
|
106
|
+
.titaui-dropDown {
|
|
87
107
|
z-index: 2000;
|
|
88
108
|
box-sizing: border-box;
|
|
89
109
|
padding: 16px 6px;
|
|
@@ -93,45 +113,36 @@
|
|
|
93
113
|
border-radius: 8px;
|
|
94
114
|
}
|
|
95
115
|
|
|
96
|
-
.rc-select-item
|
|
116
|
+
.titaui-dropDown .rc-select-item {
|
|
117
|
+
font-size: 14px;
|
|
118
|
+
padding: 7px 6px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.titaui-dropDown .rc-select-item-option {
|
|
97
122
|
height: 36px;
|
|
123
|
+
box-sizing: border-box;
|
|
98
124
|
line-height: 36px;
|
|
99
125
|
cursor: pointer;
|
|
100
126
|
}
|
|
101
127
|
|
|
102
|
-
.rc-select-item-option-selected {
|
|
128
|
+
.titaui-dropDown .rc-select-item-option-selected {
|
|
103
129
|
color: #2879FF;
|
|
104
130
|
}
|
|
105
131
|
|
|
106
|
-
.rc-select-item-option-
|
|
132
|
+
.titaui-dropDown .rc-select-item-option-content {
|
|
133
|
+
line-height: 24px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.titaui-dropDown .rc-select-item-option-active {
|
|
107
137
|
border-radius: 8px;
|
|
108
138
|
color: #2879FF;
|
|
109
139
|
background: #F7F8FA;
|
|
110
140
|
}
|
|
111
141
|
|
|
112
|
-
.rc-select-
|
|
113
|
-
font-size: 16px;
|
|
114
|
-
transform: scale(0.5);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.rc-select-show-arrow .rc-select-arrow {
|
|
118
|
-
top: 0;
|
|
119
|
-
bottom: 0;
|
|
120
|
-
margin: auto;
|
|
121
|
-
right: 12px;
|
|
122
|
-
height: 22px;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.rc-select-item-option-state {
|
|
142
|
+
.titaui-dropDown .rc-select-item-option-state {
|
|
126
143
|
display: none;
|
|
127
144
|
}
|
|
128
145
|
|
|
129
146
|
.titaui-select-hasSelectItem .rc-select-item-option-state {
|
|
130
147
|
display: block;
|
|
131
148
|
}
|
|
132
|
-
|
|
133
|
-
.titaui-select-noborder .rc-select-selector {
|
|
134
|
-
border: none !important;
|
|
135
|
-
height: 22px;
|
|
136
|
-
line-height: 1;
|
|
137
|
-
}
|
|
@@ -45,7 +45,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
45
45
|
|
|
46
46
|
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; }
|
|
47
47
|
|
|
48
|
-
var preCls = "titaui-select";
|
|
48
|
+
var preCls = "titaui-select-tags";
|
|
49
49
|
|
|
50
50
|
var SelectTags = function SelectTags(_ref) {
|
|
51
51
|
var _ref$selected = _ref.selected,
|
|
@@ -69,20 +69,18 @@ var SelectTags = function SelectTags(_ref) {
|
|
|
69
69
|
var _useState = (0, _react.useState)(selected),
|
|
70
70
|
_useState2 = _slicedToArray(_useState, 2),
|
|
71
71
|
value = _useState2[0],
|
|
72
|
-
setValue = _useState2[1];
|
|
73
|
-
// if(!selected) return
|
|
74
|
-
// setValue(selected)
|
|
75
|
-
// },[selected])
|
|
76
|
-
|
|
72
|
+
setValue = _useState2[1];
|
|
77
73
|
|
|
78
74
|
var onhandleChange = function onhandleChange(value, options) {
|
|
79
75
|
onChange && onChange(value, options, name);
|
|
80
76
|
setValue(value);
|
|
81
77
|
};
|
|
82
78
|
|
|
83
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
84
|
-
className:
|
|
85
|
-
|
|
79
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
|
+
className: preCls
|
|
81
|
+
}, /*#__PURE__*/_react["default"].createElement(_rcSelect["default"], _extends({
|
|
82
|
+
className: (0, _classnames["default"])(className, _defineProperty({}, "".concat(preCls, "-noborder"), noBorder)),
|
|
83
|
+
dropdownClassName: (0, _classnames["default"])("titaui-dropDown", _defineProperty({}, "".concat(preCls, "-hasSelectItem"), mode === "multiple")),
|
|
86
84
|
value: value,
|
|
87
85
|
style: style,
|
|
88
86
|
mode: mode,
|
|
@@ -105,7 +103,7 @@ var SelectTags = function SelectTags(_ref) {
|
|
|
105
103
|
key: key,
|
|
106
104
|
value: item.value
|
|
107
105
|
}, item.label);
|
|
108
|
-
}));
|
|
106
|
+
})));
|
|
109
107
|
};
|
|
110
108
|
|
|
111
109
|
var _default = SelectTags;
|
|
@@ -31,12 +31,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
31
31
|
|
|
32
32
|
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; }
|
|
33
33
|
|
|
34
|
+
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); }
|
|
35
|
+
|
|
34
36
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
35
37
|
|
|
36
38
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
37
39
|
|
|
38
|
-
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); }
|
|
39
|
-
|
|
40
40
|
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; }
|
|
41
41
|
|
|
42
42
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
@@ -55,6 +55,20 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
55
55
|
|
|
56
56
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
57
57
|
|
|
58
|
+
var getBackgroundImage = function getBackgroundImage(type) {
|
|
59
|
+
var selected = _attitude["default"].find(function (a) {
|
|
60
|
+
return a.type == type;
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
if (selected) {
|
|
64
|
+
return {
|
|
65
|
+
backgroundImage: "url(".concat(selected.img, ")")
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {};
|
|
70
|
+
};
|
|
71
|
+
|
|
58
72
|
function UpvoteButton(_ref) {
|
|
59
73
|
var _classnames;
|
|
60
74
|
|
|
@@ -233,11 +247,7 @@ function UpvoteButton(_ref) {
|
|
|
233
247
|
className: (0, _classnames2["default"])((_classnames = {
|
|
234
248
|
"tu-icon-APP-zan1": !buttonType && upvoteState.type == 0
|
|
235
249
|
}, _defineProperty(_classnames, customUpvoteBtnCls, customUpvoteBtnCls && upvoteState.type == 0), _defineProperty(_classnames, buttonType, buttonType && upvoteState.type == 0), _defineProperty(_classnames, "feed-upvote-button", true), _classnames)),
|
|
236
|
-
style:
|
|
237
|
-
backgroundImage: "url(".concat((_attitude["default"].find(function (a) {
|
|
238
|
-
return a.type == upvoteState.type;
|
|
239
|
-
}) || {}).img, ")")
|
|
240
|
-
}
|
|
250
|
+
style: getBackgroundImage(upvoteState.type)
|
|
241
251
|
}))), /*#__PURE__*/_react["default"].createElement("a", {
|
|
242
252
|
className: "feed-upvote-count",
|
|
243
253
|
onClick: function onClick() {
|
|
@@ -269,14 +279,9 @@ var UpvoteButtonForFeed = function UpvoteButtonForFeed(props) {
|
|
|
269
279
|
"tu-icon-APP-zan1": type == 0,
|
|
270
280
|
"feed-upvote-button": true
|
|
271
281
|
}),
|
|
272
|
-
style: {
|
|
273
|
-
backgroundImage: "url(".concat((_attitude["default"].find(function (a) {
|
|
274
|
-
return a.type == type;
|
|
275
|
-
}) || {
|
|
276
|
-
img: ""
|
|
277
|
-
}).img, ")"),
|
|
282
|
+
style: _objectSpread(_objectSpread({}, getBackgroundImage(type)), {}, {
|
|
278
283
|
marginRight: 4
|
|
279
|
-
}
|
|
284
|
+
})
|
|
280
285
|
}), text);
|
|
281
286
|
},
|
|
282
287
|
renderCount: function renderCount(type, count) {
|
package/lib/index.js
CHANGED
|
@@ -351,6 +351,12 @@ Object.defineProperty(exports, "RangePickerPop", {
|
|
|
351
351
|
return _rangePickerPop["default"];
|
|
352
352
|
}
|
|
353
353
|
});
|
|
354
|
+
Object.defineProperty(exports, "Scrollbar", {
|
|
355
|
+
enumerable: true,
|
|
356
|
+
get: function get() {
|
|
357
|
+
return _scrollbar["default"];
|
|
358
|
+
}
|
|
359
|
+
});
|
|
354
360
|
Object.defineProperty(exports, "SearchDropdown", {
|
|
355
361
|
enumerable: true,
|
|
356
362
|
get: function get() {
|
|
@@ -662,4 +668,6 @@ var _request = _interopRequireDefault(require("./utils/request"));
|
|
|
662
668
|
|
|
663
669
|
var _pointDemo = _interopRequireDefault(require("./components/point-demo"));
|
|
664
670
|
|
|
671
|
+
var _scrollbar = _interopRequireDefault(require("./components/scrollbar"));
|
|
672
|
+
|
|
665
673
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
package/lib/utils/bs-global.js
CHANGED
|
@@ -6,31 +6,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.hasWebHead = exports.getVersion = exports.getUserInfo = exports.getUploadMaxSize = exports.getTenantInfo = exports.getSource = exports.getOkrAdvancedSetting = exports.getBSGlobal = exports.getAppHead = exports.formatNum = void 0;
|
|
7
7
|
exports.isWx = isWx;
|
|
8
8
|
|
|
9
|
-
var _mockBsglobal = require("./mock-bsglobal");
|
|
10
|
-
|
|
11
9
|
var getUserInfo = function getUserInfo() {
|
|
12
|
-
if (window.location.host.indexOf("127.0.0.1") !== -1) return _mockBsglobal.BSGlobal.loginUserInfo;
|
|
13
10
|
return window.BSGlobal && window.BSGlobal.loginUserInfo;
|
|
14
11
|
};
|
|
15
12
|
|
|
16
13
|
exports.getUserInfo = getUserInfo;
|
|
17
14
|
|
|
18
15
|
var getTenantInfo = function getTenantInfo() {
|
|
19
|
-
if (window.location.host.indexOf("127.0.0.1") !== -1) return _mockBsglobal.BSGlobal.tenantInfo;
|
|
20
16
|
return window.BSGlobal && window.BSGlobal.tenantInfo;
|
|
21
17
|
};
|
|
22
18
|
|
|
23
19
|
exports.getTenantInfo = getTenantInfo;
|
|
24
20
|
|
|
25
21
|
var getBSGlobal = function getBSGlobal(key) {
|
|
26
|
-
if (window.location.host.indexOf("127.0.0.1") !== -1) return _mockBsglobal.BSGlobal[key];
|
|
27
22
|
return window.BSGlobal[key];
|
|
28
23
|
};
|
|
29
24
|
|
|
30
25
|
exports.getBSGlobal = getBSGlobal;
|
|
31
26
|
|
|
32
27
|
var getOkrAdvancedSetting = function getOkrAdvancedSetting() {
|
|
33
|
-
if (window.location.host.indexOf("127.0.0.1") !== -1) return _mockBsglobal.BSGlobal["OkrAdvancedSetting"];
|
|
34
28
|
return window.BSGlobal["OkrAdvancedSetting"];
|
|
35
29
|
};
|
|
36
30
|
|
|
@@ -38,7 +32,6 @@ exports.getOkrAdvancedSetting = getOkrAdvancedSetting;
|
|
|
38
32
|
|
|
39
33
|
var getVersion = function getVersion() {
|
|
40
34
|
// version 1 试用版
|
|
41
|
-
if (window.location.host.indexOf("127.0.0.1") !== -1) return _mockBsglobal.BSGlobal["tenantAuthentication"].Version;
|
|
42
35
|
return window.BSGlobal["tenantAuthentication"].Version;
|
|
43
36
|
};
|
|
44
37
|
|
package/package.json
CHANGED
|
@@ -13,37 +13,60 @@
|
|
|
13
13
|
font-size: 14px;
|
|
14
14
|
color: #3F4755;
|
|
15
15
|
}
|
|
16
|
+
&-popup{
|
|
17
|
+
z-index: 2000;
|
|
18
|
+
box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
|
|
19
|
+
border: 1px solid #F0F2F5;
|
|
20
|
+
border-radius: 12px;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
.rc-cascader-menu{
|
|
23
|
+
width: 139px;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
border: 1px solid #F0F2F5;
|
|
26
|
+
padding: 16px 0 16px 6px;
|
|
27
|
+
&::-webkit-scrollbar{
|
|
28
|
+
width: 6px !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
}
|
|
32
|
+
.rc-cascader-menu-item-active{
|
|
33
|
+
background: unset;
|
|
34
|
+
color: #2879ff;
|
|
35
|
+
}
|
|
36
|
+
.rc-cascader-menu-item{
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
padding: 0 6px;
|
|
40
|
+
height: 36px;
|
|
41
|
+
align-items: center;
|
|
42
|
+
color: #3F4755;
|
|
43
|
+
&:hover{
|
|
44
|
+
color: #2879ff;
|
|
45
|
+
background: #F7F8FA;
|
|
46
|
+
border-radius: 8px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
.rc-cascader-menu-item-disabled{
|
|
50
|
+
opacity:1;
|
|
51
|
+
cursor: auto;
|
|
52
|
+
&:hover{
|
|
53
|
+
color: #3F4755;
|
|
54
|
+
background: #FFFFFF;
|
|
55
|
+
border-radius: 8px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
.rc-cascader-menu-item-expand-icon{
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
16
62
|
.tu-icon-caret-down{
|
|
17
63
|
font-size: 16px;
|
|
18
64
|
transform: scale(0.5);
|
|
19
65
|
}
|
|
20
66
|
}
|
|
21
|
-
.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
.rc-cascader-menu{
|
|
28
|
-
width: 139px;
|
|
29
|
-
box-sizing: border-box;
|
|
30
|
-
border: 1px solid #F0F2F5;
|
|
31
|
-
padding: 16px 6px;
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
.rc-cascader-menu-item-active{
|
|
35
|
-
background: unset;
|
|
36
|
-
color: #2879ff;
|
|
37
|
-
}
|
|
38
|
-
.rc-cascader-menu-item{
|
|
39
|
-
box-sizing: border-box;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
padding: 0 6px;
|
|
42
|
-
height: 36px;
|
|
43
|
-
align-items: center;
|
|
44
|
-
&:hover{
|
|
45
|
-
color: #2879ff;
|
|
46
|
-
background: #F7F8FA;
|
|
47
|
-
border-radius: 8px;
|
|
67
|
+
.titaui-cascader-time-popup{
|
|
68
|
+
.rc-cascader-menu{
|
|
69
|
+
width: 80px;
|
|
70
|
+
text-align: center;
|
|
48
71
|
}
|
|
49
72
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React, { useState, useEffect
|
|
1
|
+
import React, { useState, useEffect } from "react";
|
|
2
2
|
import Rccascader from "rc-cascader";
|
|
3
|
+
import TimeCascader from "./time";
|
|
3
4
|
import "rc-cascader/assets/index.less";
|
|
4
5
|
import "./index.scss";
|
|
5
6
|
|
|
@@ -10,6 +11,7 @@ interface Props {
|
|
|
10
11
|
placeholder?: any;
|
|
11
12
|
initText?: any; //想要默认值输入框的值就传进来,不要问组件里为什么不做这个事情,优化算法
|
|
12
13
|
style?: any;
|
|
14
|
+
popupClassName?: any;
|
|
13
15
|
splitSymbol?: string;
|
|
14
16
|
}
|
|
15
17
|
|
|
@@ -23,13 +25,13 @@ const Cascader = ({
|
|
|
23
25
|
style = { width: "100px" },
|
|
24
26
|
placeholder = "请选择",
|
|
25
27
|
splitSymbol = "",
|
|
28
|
+
popupClassName = "",
|
|
26
29
|
...restProps
|
|
27
30
|
}: Props) => {
|
|
28
31
|
const [selectValue, setSelectValue] = useState(value);
|
|
29
32
|
const [inputValue, setInputValue] = useState(initText);
|
|
30
33
|
|
|
31
34
|
const handleChange = (value, selectedOptions) => {
|
|
32
|
-
console.log(value, selectedOptions);
|
|
33
35
|
onChange && onChange(value, selectedOptions);
|
|
34
36
|
setSelectValue(value);
|
|
35
37
|
let str = selectedOptions.map((o) => o.label).join(splitSymbol);
|
|
@@ -41,22 +43,22 @@ const Cascader = ({
|
|
|
41
43
|
}, [value]);
|
|
42
44
|
|
|
43
45
|
return (
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</div>
|
|
55
|
-
<span className="tu-icon-caret-down" />
|
|
46
|
+
<Rccascader
|
|
47
|
+
options={options}
|
|
48
|
+
onChange={handleChange}
|
|
49
|
+
value={selectValue}
|
|
50
|
+
popupClassName={`${preCls}-popup ${popupClassName}`}
|
|
51
|
+
{...restProps}
|
|
52
|
+
>
|
|
53
|
+
<div className={preCls} style={style}>
|
|
54
|
+
<div className={`${preCls}-text`}>
|
|
55
|
+
{inputValue ? inputValue : placeholder}
|
|
56
56
|
</div>
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
<span className="tu-icon-caret-down" />
|
|
58
|
+
</div>
|
|
59
|
+
</Rccascader>
|
|
59
60
|
);
|
|
60
61
|
};
|
|
61
62
|
|
|
63
|
+
Cascader.TimeCascader = TimeCascader;
|
|
62
64
|
export default Cascader;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { FC,Fragment } from "react";
|
|
2
|
+
import Cascader from './index'
|
|
3
|
+
|
|
4
|
+
const TimeCascader = ({...restProps})=>{
|
|
5
|
+
return <Fragment>
|
|
6
|
+
<Cascader
|
|
7
|
+
popupClassName={' titaui-cascader-time-popup'}
|
|
8
|
+
{...restProps}
|
|
9
|
+
/>
|
|
10
|
+
</Fragment>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default TimeCascader
|
|
@@ -67,7 +67,7 @@ interface Props {
|
|
|
67
67
|
userInfo?: UserInfoObj;
|
|
68
68
|
onSuccess?: Function;
|
|
69
69
|
onClose?: Function;
|
|
70
|
-
|
|
70
|
+
isHiddenCreatedCard?: boolean;
|
|
71
71
|
handleCreatedClose?:Function;
|
|
72
72
|
visible?: boolean;
|
|
73
73
|
}
|
|
@@ -80,7 +80,7 @@ const initOCheckResult = OCheckTarget.map((item) => {
|
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
function CreateOkrModal(
|
|
83
|
-
{ initCycle, userInfo, onSuccess,
|
|
83
|
+
{ initCycle, userInfo, onSuccess, isHiddenCreatedCard = false, handleCreatedClose = () => {}, visible = false,onClose = () => {}}: Props,
|
|
84
84
|
ref: Ref<CreateOkrRefObject>
|
|
85
85
|
) {
|
|
86
86
|
const [isVisible, setVisible] = useState(visible);
|
|
@@ -199,7 +199,7 @@ function CreateOkrModal(
|
|
|
199
199
|
setCreatedSuccessInfo(data);
|
|
200
200
|
if (
|
|
201
201
|
!localStorage.getItem(`dontShowValue${userId}`) &&
|
|
202
|
-
!
|
|
202
|
+
!isHiddenCreatedCard &&
|
|
203
203
|
!isApplyTpl
|
|
204
204
|
) {
|
|
205
205
|
setShowCreatedSuccessInfo(true);
|
|
@@ -278,7 +278,7 @@ function CreateOkrModal(
|
|
|
278
278
|
return;
|
|
279
279
|
}
|
|
280
280
|
hideCreateOkrModal();
|
|
281
|
-
if (onSuccess || !
|
|
281
|
+
if (onSuccess || !isHiddenCreatedCard) {
|
|
282
282
|
// 带上超过创建okr人数的计算值
|
|
283
283
|
const krNum = krDatas.length;
|
|
284
284
|
let krTotalLength = 0;
|
|
@@ -692,7 +692,7 @@ function CreateOkrModal(
|
|
|
692
692
|
</Wrapper>
|
|
693
693
|
</Modal>
|
|
694
694
|
</div>
|
|
695
|
-
{!isApplyTpl && !
|
|
695
|
+
{!isApplyTpl && !isHiddenCreatedCard && showCreatedSuccessInfo ? (
|
|
696
696
|
<CreateSuccessCmpWrapper>
|
|
697
697
|
<CreateSuccessCmp
|
|
698
698
|
tipIndex={tipIndex}
|
|
@@ -705,7 +705,7 @@ function CreateOkrModal(
|
|
|
705
705
|
</CreateSuccessCmpWrapper>
|
|
706
706
|
) : null}
|
|
707
707
|
{/* 如果 isVisible 是 hidden,则因为无法获取到样式截取不到图片导致下载下来白图*/}
|
|
708
|
-
{!isApplyTpl && !
|
|
708
|
+
{!isApplyTpl && !isHiddenCreatedCard && showCreatedSuccessInfo ? (
|
|
709
709
|
<div className="download-dom--hidden">
|
|
710
710
|
<CreateSuccessCmp
|
|
711
711
|
tipIndex={tipIndex}
|
|
@@ -11,6 +11,7 @@ interface IProps {
|
|
|
11
11
|
require?: boolean;
|
|
12
12
|
width?: number;
|
|
13
13
|
children?: ReactElement;
|
|
14
|
+
className?: any;
|
|
14
15
|
direction?: "horizontal" | "vertical";
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -18,15 +19,14 @@ const FieldGroup = (props: IProps, ref) => {
|
|
|
18
19
|
const {
|
|
19
20
|
label = "",
|
|
20
21
|
direction = "vertical",
|
|
21
|
-
|
|
22
|
-
// values,
|
|
22
|
+
className,
|
|
23
23
|
children,
|
|
24
24
|
} = props;
|
|
25
25
|
|
|
26
26
|
useImperativeHandle(ref, () => ({}));
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
|
-
<div className={classNames(precls, `${precls}--${direction}`)}>
|
|
29
|
+
<div className={classNames(precls,className, `${precls}--${direction}`)}>
|
|
30
30
|
<div className={`${precls}__label`}>{label}</div>
|
|
31
31
|
<div className={`${precls}__content`}>
|
|
32
32
|
{React.Children.map(children, (child) => {
|
|
Binary file
|