@titaui/pc 1.15.89-beta.4 → 1.15.89-beta.5
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/okr-excel-create/components-new/kr-confidence/index.css +1 -2
- package/lib/components/okr-excel-create/components-new/kr-weight/index.js +2 -2
- package/lib/components/okr-excel-create/components-new/okr-name/index.css +7 -0
- package/lib/components/okr-excel-create/components-new/okr-name/index.js +5 -1
- package/lib/components/okr-excel-create/index.js +5 -3
- package/lib/components/table-excel-v2/index.css +24 -0
- package/lib/components/table-excel-v2/index.js +9 -3
- package/package.json +1 -1
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
cursor: pointer;
|
|
5
|
-
position: absolute;
|
|
6
5
|
left: 0;
|
|
7
6
|
top: 0;
|
|
8
7
|
width: 100%;
|
|
9
8
|
height: 100%;
|
|
10
|
-
padding: 0 12px;
|
|
11
9
|
box-sizing: border-box;
|
|
12
10
|
}
|
|
13
11
|
|
|
@@ -15,4 +13,5 @@
|
|
|
15
13
|
width: 100%;
|
|
16
14
|
display: flex;
|
|
17
15
|
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
18
17
|
}
|
|
@@ -144,7 +144,7 @@ var krWeightRenderer = function krWeightRenderer(update) {
|
|
|
144
144
|
}, 0);
|
|
145
145
|
console.log('totalWeight', totalWeight); // 自动计算最后一个 kr 的权重
|
|
146
146
|
|
|
147
|
-
rootDataRef.current.krs[lastIndex] = _objectSpread(_objectSpread({}, rootDataRef.current.krs[lastIndex]
|
|
147
|
+
rootDataRef.current.krs[lastIndex] = _objectSpread(_objectSpread({}, rootDataRef.current.krs[lastIndex]), {}, {
|
|
148
148
|
krWeight: (100 - totalWeight).toFixed(1)
|
|
149
149
|
});
|
|
150
150
|
update({
|
|
@@ -165,7 +165,7 @@ var krWeightRenderer = function krWeightRenderer(update) {
|
|
|
165
165
|
return totalWeight <= 100;
|
|
166
166
|
}, [rootData, rowIdx]);
|
|
167
167
|
return /*#__PURE__*/_react["default"].createElement(KRWeight, {
|
|
168
|
-
value: data.krWeight
|
|
168
|
+
value: data.krWeight,
|
|
169
169
|
onChange: handleEditKRWeight,
|
|
170
170
|
disabled: isLast,
|
|
171
171
|
onChangeBefore: onChangeBefore
|
|
@@ -54,9 +54,16 @@
|
|
|
54
54
|
border: 0;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
.tita-okr-excel-create-okr-name--isO .tita-rich-editor p {
|
|
58
|
+
font-weight: 500 !important;
|
|
59
|
+
}
|
|
60
|
+
|
|
57
61
|
.tita-okr-excel-create-okr-name .tita-rich-editor p {
|
|
58
62
|
padding: 0;
|
|
59
63
|
font-size: 14px;
|
|
64
|
+
font-weight: 400;
|
|
65
|
+
color: #141C28;
|
|
66
|
+
line-height: 22px;
|
|
60
67
|
white-space: pre-wrap;
|
|
61
68
|
}
|
|
62
69
|
|
|
@@ -19,6 +19,10 @@ var _utils = require("../../utils");
|
|
|
19
19
|
|
|
20
20
|
require("./index.css");
|
|
21
21
|
|
|
22
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
22
26
|
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
27
|
|
|
24
28
|
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; }
|
|
@@ -172,7 +176,7 @@ var OkrNameRenderer = function OkrNameRenderer(update, isO) {
|
|
|
172
176
|
};
|
|
173
177
|
|
|
174
178
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
175
|
-
className: "".concat(preCls)
|
|
179
|
+
className: (0, _classnames["default"])("".concat(preCls), _defineProperty({}, "".concat(preCls, "--isO"), isO))
|
|
176
180
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
177
181
|
className: "".concat(preCls, "__icon")
|
|
178
182
|
}, isO ? 'O:' : "KR".concat(rowIdx + 1, ":")), /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -166,14 +166,15 @@ var OKRExcelCreate = function OKRExcelCreate(_ref) {
|
|
|
166
166
|
title: dicData['KR 负责人'],
|
|
167
167
|
dataIndex: 'user.name',
|
|
168
168
|
key: 'kr.user.name',
|
|
169
|
-
width:
|
|
169
|
+
width: 160,
|
|
170
170
|
level: 2,
|
|
171
171
|
render: (0, _okrPrincipal["default"])(update, false)
|
|
172
172
|
}, {
|
|
173
173
|
title: dicData['KR 权重'],
|
|
174
174
|
dataIndex: 'krWeight',
|
|
175
175
|
key: 'krWeight',
|
|
176
|
-
width:
|
|
176
|
+
width: 160,
|
|
177
|
+
align: 'center',
|
|
177
178
|
level: 2,
|
|
178
179
|
renderFill: true,
|
|
179
180
|
render: (0, _krWeight["default"])(update)
|
|
@@ -181,7 +182,8 @@ var OKRExcelCreate = function OKRExcelCreate(_ref) {
|
|
|
181
182
|
title: dicData['信心指数'],
|
|
182
183
|
dataIndex: 'confidenceIndex',
|
|
183
184
|
key: 'confidenceIndex',
|
|
184
|
-
width:
|
|
185
|
+
width: 160,
|
|
186
|
+
align: 'center',
|
|
185
187
|
level: 2,
|
|
186
188
|
render: (0, _krConfidence["default"])(update)
|
|
187
189
|
}];
|
|
@@ -32,6 +32,18 @@
|
|
|
32
32
|
transition: background-color .3s;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
.titaui-table-excel-v2__header__item--aligin-left {
|
|
36
|
+
justify-content: flex-start;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.titaui-table-excel-v2__header__item--aligin-center {
|
|
40
|
+
justify-content: center;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.titaui-table-excel-v2__header__item--aligin-right {
|
|
44
|
+
justify-content: flex-end;
|
|
45
|
+
}
|
|
46
|
+
|
|
35
47
|
.titaui-table-excel-v2__header__item:hover {
|
|
36
48
|
background-color: #f2f2f2;
|
|
37
49
|
}
|
|
@@ -67,3 +79,15 @@
|
|
|
67
79
|
min-height: 30px;
|
|
68
80
|
box-sizing: border-box;
|
|
69
81
|
}
|
|
82
|
+
|
|
83
|
+
.titaui-table-excel-v2__box-content--aligin-left {
|
|
84
|
+
justify-content: flex-start;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.titaui-table-excel-v2__box-content--aligin-center {
|
|
88
|
+
justify-content: center;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.titaui-table-excel-v2__box-content--aligin-right {
|
|
92
|
+
justify-content: flex-end;
|
|
93
|
+
}
|
|
@@ -21,6 +21,8 @@ var _array = require("../../utils/array");
|
|
|
21
21
|
|
|
22
22
|
require("./index.css");
|
|
23
23
|
|
|
24
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
25
|
+
|
|
24
26
|
var _excluded = ["render"];
|
|
25
27
|
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -421,7 +423,9 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
|
|
|
421
423
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, renderColumns[currentLevel - 1].map(function (columnOption, colIdx) {
|
|
422
424
|
var render = columnOption.render,
|
|
423
425
|
dataIndex = columnOption.dataIndex,
|
|
424
|
-
renderFill = columnOption.renderFill
|
|
426
|
+
renderFill = columnOption.renderFill,
|
|
427
|
+
_columnOption$align = columnOption.align,
|
|
428
|
+
align = _columnOption$align === void 0 ? 'left' : _columnOption$align;
|
|
425
429
|
|
|
426
430
|
var content = /*#__PURE__*/_react["default"].createElement(MemoRender, {
|
|
427
431
|
render: render,
|
|
@@ -442,7 +446,7 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
|
|
|
442
446
|
borderLeft: moveInfo.colIdx === index && moveInfo.down && '1px solid #e2e2e2' || undefined
|
|
443
447
|
}, positions[index])
|
|
444
448
|
}, renderFill && content, !renderFill && /*#__PURE__*/_react["default"].createElement("div", {
|
|
445
|
-
className: "".concat(preCls, "__box-content")
|
|
449
|
+
className: (0, _classnames["default"])("".concat(preCls, "__box-content"), "".concat(preCls, "__box-content--aligin-").concat(align))
|
|
446
450
|
}, content));
|
|
447
451
|
}), renderColumns[currentLevel] && /*#__PURE__*/_react["default"].createElement("div", {
|
|
448
452
|
className: "".concat(preCls, "__childs")
|
|
@@ -462,10 +466,12 @@ var TableExcelV2 = function TableExcelV2(_ref6) {
|
|
|
462
466
|
className: "".concat(preCls, "__header")
|
|
463
467
|
}, _columns.map(function (_ref13, i) {
|
|
464
468
|
var title = _ref13.title,
|
|
469
|
+
_ref13$align = _ref13.align,
|
|
470
|
+
align = _ref13$align === void 0 ? 'left' : _ref13$align,
|
|
465
471
|
key = _ref13.key;
|
|
466
472
|
return /*#__PURE__*/_react["default"].createElement(_web.animated.div, {
|
|
467
473
|
key: key,
|
|
468
|
-
className: "".concat(preCls, "__header__item") // {...moveColBind({ colIndex: i })}
|
|
474
|
+
className: (0, _classnames["default"])("".concat(preCls, "__header__item"), "".concat(preCls, "__header__item--aligin-").concat(align)) // {...moveColBind({ colIndex: i })}
|
|
469
475
|
,
|
|
470
476
|
style: {
|
|
471
477
|
width: colSizes[i].width,
|