@titaui/pc 1.7.52 → 1.7.53

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.
@@ -15,6 +15,8 @@ var _tooltipText = _interopRequireDefault(require("../../../../../tooltip/toolti
15
15
 
16
16
  var _utils = require("../../utils");
17
17
 
18
+ var _tools = require("../../../../../../utils/tools");
19
+
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
21
 
20
22
  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; }
@@ -31,6 +33,8 @@ var TodoItem = function TodoItem(props) {
31
33
 
32
34
  if (item.objType === 7) {
33
35
  window.Talent.app.vent.trigger('global-pull-screen', item.objId, 'task');
36
+ } else {
37
+ (0, _tools.openPage)(item.objUrl);
34
38
  }
35
39
  };
36
40
 
@@ -51,8 +55,6 @@ var TodoItem = function TodoItem(props) {
51
55
  })), /*#__PURE__*/_react["default"].createElement("div", {
52
56
  className: (0, _classnames["default"])("".concat(preCls, "__item-right"))
53
57
  }, /*#__PURE__*/_react["default"].createElement("a", {
54
- href: item.objUrl,
55
- target: "_blank",
56
58
  onClick: function onClick() {
57
59
  return handleTodosClick(item);
58
60
  }
@@ -75,6 +75,9 @@
75
75
  padding: 10px 32px 8px;
76
76
  min-height: 90px;
77
77
  box-sizing: border-box;
78
+ display: flex;
79
+ flex-direction: column;
80
+ justify-content: center;
78
81
  }
79
82
 
80
83
  .child-okrs-weight__item {
@@ -84,7 +84,7 @@ var _default = function _default(props) {
84
84
  _useState4 = _slicedToArray(_useState3, 1),
85
85
  user = _useState4[0];
86
86
 
87
- var _useState5 = (0, _react.useState)(((_getBSGlobal = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting")) === null || _getBSGlobal === void 0 ? void 0 : (_getBSGlobal$KRSettin = _getBSGlobal.KRSetting) === null || _getBSGlobal$KRSettin === void 0 ? void 0 : _getBSGlobal$KRSettin.OKrWeight) || true),
87
+ var _useState5 = (0, _react.useState)(((_getBSGlobal = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting")) === null || _getBSGlobal === void 0 ? void 0 : (_getBSGlobal$KRSettin = _getBSGlobal.KRSetting) === null || _getBSGlobal$KRSettin === void 0 ? void 0 : _getBSGlobal$KRSettin.OKrWeight) || false),
88
88
  _useState6 = _slicedToArray(_useState5, 1),
89
89
  OKrWeightSetting = _useState6[0];
90
90
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.7.52",
3
+ "version": "1.7.53",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "src/index.js",
@@ -3,6 +3,7 @@ import classNames from 'classnames';
3
3
  import Avatar from '../../../../../../components/avatar';
4
4
  import TooltipText from '../../../../../tooltip/tooltip-text';
5
5
  import { htmlToText, deleteText } from '../../utils';
6
+ import { openPage } from '../../../../../../utils/tools';
6
7
 
7
8
  const preCls = 'titaui-user-message-msg-todos';
8
9
 
@@ -13,6 +14,8 @@ const TodoItem: FC<any> = (props) => {
13
14
  onItemClick && onItemClick(false);
14
15
  if (item.objType === 7) {
15
16
  window.Talent.app.vent.trigger('global-pull-screen', item.objId, 'task');
17
+ } else {
18
+ openPage(item.objUrl)
16
19
  }
17
20
  };
18
21
 
@@ -33,8 +36,6 @@ const TodoItem: FC<any> = (props) => {
33
36
  </div>
34
37
  <div className={classNames(`${preCls}__item-right`)}>
35
38
  <a
36
- href={item.objUrl}
37
- target="_blank"
38
39
  onClick={() => handleTodosClick(item)}
39
40
  >
40
41
  <div className={classNames(`${preCls}__item-right-header`)}>
@@ -29,7 +29,7 @@ export default (props) => {
29
29
  const { refreshAll, okrInfo } = useContext(CommonContext);
30
30
  const [user] = useState(data.principalUser);
31
31
  const [OKrWeightSetting] = useState(
32
- getBSGlobal("OkrAdvancedSetting")?.KRSetting?.OKrWeight || true
32
+ getBSGlobal("OkrAdvancedSetting")?.KRSetting?.OKrWeight || false
33
33
  );
34
34
  const [cycleDateStr] = useState(() => {
35
35
  // 时间周期
@@ -89,6 +89,9 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
89
89
  padding: 10px 32px 8px;
90
90
  min-height: 90px;
91
91
  box-sizing: border-box;
92
+ display: flex;
93
+ flex-direction: column;
94
+ justify-content: center;
92
95
  }
93
96
  &__item {
94
97
  margin-bottom: 18px;