@titaui/pc 1.9.63 → 1.9.67
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/.eslintignore +3 -0
- package/lib/components/form/form-fields/input/index.js +13 -3
- package/lib/components/hr-header/index.css +3 -2
- package/lib/components/okr-detail/base-info/base-info.css +3 -3
- package/lib/components/part-notice/index.css +40 -0
- package/lib/components/part-notice/index.js +90 -0
- package/lib/index.js +8 -2
- package/lib/pages/aha2021/index.js +1 -0
- package/lib/utils/open-data.js +4 -5
- package/package.json +1 -1
- package/src/components/form/form-fields/input/index.tsx +2 -0
- package/src/components/hr-header/index.scss +4 -3
- package/src/components/okr-detail/base-info/base-info.scss +7 -6
- package/src/components/part-notice/index.scss +37 -0
- package/src/components/part-notice/index.tsx +50 -0
- package/src/index.js +1 -1
- package/src/pages/aha2021/index.tsx +1 -0
- package/src/utils/open-data.js +5 -5
package/.eslintignore
ADDED
|
@@ -15,12 +15,16 @@ var _errorTip = _interopRequireDefault(require("../../../tooltip/error-tip"));
|
|
|
15
15
|
|
|
16
16
|
require("./index.css");
|
|
17
17
|
|
|
18
|
+
var _excluded = ["label", "verifies", "placeholder", "onChange", "require", "type", "tips", "name", "disabled", "getContainer", "layout", "onCheckSuccess", "className", "tail"];
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
20
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); }
|
|
21
23
|
|
|
22
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; }
|
|
23
25
|
|
|
26
|
+
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); }
|
|
27
|
+
|
|
24
28
|
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; }
|
|
25
29
|
|
|
26
30
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -35,6 +39,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
35
39
|
|
|
36
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
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
|
+
|
|
38
46
|
var preCls = "form-field-input";
|
|
39
47
|
|
|
40
48
|
function OverlayInner(_ref) {
|
|
@@ -72,7 +80,9 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
72
80
|
onCheckSuccess = props.onCheckSuccess,
|
|
73
81
|
_props$className = props.className,
|
|
74
82
|
className = _props$className === void 0 ? "" : _props$className,
|
|
75
|
-
tail = props.tail
|
|
83
|
+
tail = props.tail,
|
|
84
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
85
|
+
|
|
76
86
|
var inputRef = (0, _react.useRef)();
|
|
77
87
|
|
|
78
88
|
var _useState = (0, _react.useState)(false),
|
|
@@ -206,7 +216,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
206
216
|
activeTips: tips
|
|
207
217
|
}),
|
|
208
218
|
getTooltipContainer: getContainer
|
|
209
|
-
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
219
|
+
}, /*#__PURE__*/_react["default"].createElement("input", _extends({
|
|
210
220
|
ref: inputRef,
|
|
211
221
|
type: type,
|
|
212
222
|
disabled: disabled,
|
|
@@ -217,7 +227,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
217
227
|
onBlur: onBlurHandler,
|
|
218
228
|
onChange: onChangeHandler,
|
|
219
229
|
autoComplete: "off"
|
|
220
|
-
})), typeof tail === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
230
|
+
}, restProps))), typeof tail === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
221
231
|
className: (0, _classnames["default"])("".concat(preCls, "__tail"))
|
|
222
232
|
}, tail) : tail));
|
|
223
233
|
});
|
|
@@ -30,14 +30,15 @@
|
|
|
30
30
|
justify-content: center;
|
|
31
31
|
margin: 0 5px;
|
|
32
32
|
position: relative;
|
|
33
|
+
color: #ffffff !important;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
.tencent-hr-header__item > a {
|
|
36
|
-
color: #
|
|
37
|
+
color: #ffffff !important;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
.tencent-hr-header__item--active::after {
|
|
40
|
-
content:
|
|
41
|
+
content: '';
|
|
41
42
|
position: absolute;
|
|
42
43
|
top: 50%;
|
|
43
44
|
left: 50%;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.base-info__divider {
|
|
2
2
|
height: 8px;
|
|
3
|
-
background: #
|
|
3
|
+
background: #f0f2f5;
|
|
4
4
|
margin: 0 32px;
|
|
5
5
|
}
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
.base-info__participant-followers-wrapper .base-info__person-block {
|
|
13
13
|
font-size: 14px;
|
|
14
14
|
font-weight: 600;
|
|
15
|
-
color: #
|
|
15
|
+
color: #141c28;
|
|
16
16
|
line-height: 22px;
|
|
17
17
|
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
18
18
|
padding-left: 10px;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
.base-info__participant-followers-wrapper .base-info__person-block .base-info__person-block-title {
|
|
26
26
|
font-size: 14px;
|
|
27
27
|
font-weight: 600;
|
|
28
|
-
color: #
|
|
28
|
+
color: #141c28;
|
|
29
29
|
line-height: 22px;
|
|
30
30
|
margin-bottom: 8px;
|
|
31
31
|
display: block;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.part-notice {
|
|
2
|
+
margin-left: 16px;
|
|
3
|
+
height: 36px;
|
|
4
|
+
background: #fcedd4;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
font-size: 12px;
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
color: #3f4755;
|
|
10
|
+
line-height: 18px;
|
|
11
|
+
position: relative;
|
|
12
|
+
padding: 0 12px;
|
|
13
|
+
margin-bottom: 10px;
|
|
14
|
+
margin-top: 16px;
|
|
15
|
+
border-radius: 12px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.part-notice > .tu-icon-tishi {
|
|
19
|
+
color: #f0a326;
|
|
20
|
+
margin-right: 8px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.part-notice__link {
|
|
24
|
+
color: #f6bd16;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.part-notice__close {
|
|
29
|
+
color: #f6bd16;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
font-size: 16px;
|
|
32
|
+
position: absolute;
|
|
33
|
+
right: 12px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.part-notice__image {
|
|
37
|
+
width: 16px;
|
|
38
|
+
height: 16px;
|
|
39
|
+
margin-right: 8px;
|
|
40
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _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 _localStorage = require("../../utils/local-storage");
|
|
13
|
+
|
|
14
|
+
require("./index.css");
|
|
15
|
+
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
|
+
|
|
22
|
+
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."); }
|
|
23
|
+
|
|
24
|
+
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); }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
|
+
|
|
32
|
+
var preCls = "part-notice";
|
|
33
|
+
var storage = new _localStorage.LocalStorage();
|
|
34
|
+
|
|
35
|
+
var PartNotice = function PartNotice(_ref) {
|
|
36
|
+
var storageName = _ref.storageName,
|
|
37
|
+
text = _ref.text,
|
|
38
|
+
link = _ref.link;
|
|
39
|
+
|
|
40
|
+
var _useState = (0, _react.useState)(function () {
|
|
41
|
+
var stopTaking = storage.getItem(storageName);
|
|
42
|
+
|
|
43
|
+
if (stopTaking !== null && stopTaking !== void 0 && stopTaking.date) {
|
|
44
|
+
var oldDate = new Date(stopTaking === null || stopTaking === void 0 ? void 0 : stopTaking.date).getDate();
|
|
45
|
+
var newDate = new Date().getDate();
|
|
46
|
+
|
|
47
|
+
if (newDate > oldDate) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return true;
|
|
55
|
+
}),
|
|
56
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
57
|
+
visible = _useState2[0],
|
|
58
|
+
setVisible = _useState2[1];
|
|
59
|
+
|
|
60
|
+
var handleClose = (0, _react.useCallback)(function () {
|
|
61
|
+
setVisible(false);
|
|
62
|
+
storage.setItem(storageName, {
|
|
63
|
+
bol: false,
|
|
64
|
+
date: new Date()
|
|
65
|
+
});
|
|
66
|
+
}, []);
|
|
67
|
+
|
|
68
|
+
var handleOpenLink = function handleOpenLink() {
|
|
69
|
+
window.open(link, "_target");
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
if (!visible) return /*#__PURE__*/_react["default"].createElement("span", null);
|
|
73
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
74
|
+
className: "".concat(preCls)
|
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
|
+
className: "tu-icon-tishi"
|
|
77
|
+
}), text, /*#__PURE__*/_react["default"].createElement("span", {
|
|
78
|
+
className: "".concat(preCls, "__link"),
|
|
79
|
+
onClick: handleOpenLink
|
|
80
|
+
}, "\u4E86\u89E3\u8BE6\u60C5"), /*#__PURE__*/_react["default"].createElement("span", {
|
|
81
|
+
className: "tu-icon-close ".concat(preCls, "__close"),
|
|
82
|
+
onClick: handleClose
|
|
83
|
+
}));
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
PartNotice.defaultProps = {
|
|
87
|
+
storageName: "partNotice"
|
|
88
|
+
};
|
|
89
|
+
var _default = PartNotice;
|
|
90
|
+
exports["default"] = _default;
|
package/lib/index.js
CHANGED
|
@@ -303,6 +303,12 @@ Object.defineProperty(exports, "Pagination", {
|
|
|
303
303
|
return _pagination["default"];
|
|
304
304
|
}
|
|
305
305
|
});
|
|
306
|
+
Object.defineProperty(exports, "PartNotice", {
|
|
307
|
+
enumerable: true,
|
|
308
|
+
get: function get() {
|
|
309
|
+
return _partNotice["default"];
|
|
310
|
+
}
|
|
311
|
+
});
|
|
306
312
|
Object.defineProperty(exports, "PasswordInput", {
|
|
307
313
|
enumerable: true,
|
|
308
314
|
get: function get() {
|
|
@@ -528,8 +534,6 @@ Object.defineProperty(exports, "upload", {
|
|
|
528
534
|
|
|
529
535
|
require("./index.css");
|
|
530
536
|
|
|
531
|
-
var _stopTakingModal = _interopRequireDefault(require("./components/stop-taking-modal"));
|
|
532
|
-
|
|
533
537
|
var _dialog = _interopRequireDefault(require("./components/dialog"));
|
|
534
538
|
|
|
535
539
|
var _switch = _interopRequireDefault(require("./components/switch"));
|
|
@@ -644,6 +648,8 @@ var _okrcaseLibraryCard = _interopRequireDefault(require("./components/okrcase-l
|
|
|
644
648
|
|
|
645
649
|
var _operationRecords = _interopRequireDefault(require("./components/operation-records"));
|
|
646
650
|
|
|
651
|
+
var _partNotice = _interopRequireDefault(require("./components/part-notice"));
|
|
652
|
+
|
|
647
653
|
var _pagination = _interopRequireDefault(require("./components/pagination"));
|
|
648
654
|
|
|
649
655
|
var _passwordInput = _interopRequireDefault(require("./components/password-input"));
|
|
@@ -83,6 +83,7 @@ function PageLayout(props) {
|
|
|
83
83
|
var children = props.children;
|
|
84
84
|
|
|
85
85
|
var _useState = (0, _react.useState)(function () {
|
|
86
|
+
if ((0, _helpers.getTenantInfo)().Source === 964) return false;
|
|
86
87
|
var stopTaking = storage.getItem("topGlobalCard");
|
|
87
88
|
|
|
88
89
|
if (stopTaking !== null && stopTaking !== void 0 && stopTaking.date) {
|
package/lib/utils/open-data.js
CHANGED
|
@@ -70,11 +70,10 @@ function openData(p) {
|
|
|
70
70
|
if (!openId) return p.name || p.id || null;
|
|
71
71
|
var ref = (0, _react.useRef)(null);
|
|
72
72
|
(0, _react.useEffect)(function () {
|
|
73
|
-
var wWOpenData = window.WWOpenData; // 如果当前页面中没有 WWOpenData 则去 top 上尝试获取
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
73
|
+
var wWOpenData = window.top.WWOpenData; // // 如果当前页面中没有 WWOpenData 则去 top 上尝试获取
|
|
74
|
+
// if (!wWOpenData && window.top.WWOpenData) {
|
|
75
|
+
// wWOpenData = window.top.WWOpenData;
|
|
76
|
+
// }
|
|
78
77
|
|
|
79
78
|
wWOpenData && wWOpenData.bind(ref.current);
|
|
80
79
|
});
|
package/package.json
CHANGED
|
@@ -58,6 +58,7 @@ export default forwardRef((props: Props, ref) => {
|
|
|
58
58
|
onCheckSuccess,
|
|
59
59
|
className = "",
|
|
60
60
|
tail,
|
|
61
|
+
...restProps
|
|
61
62
|
} = props;
|
|
62
63
|
|
|
63
64
|
const inputRef = useRef<any>();
|
|
@@ -171,6 +172,7 @@ export default forwardRef((props: Props, ref) => {
|
|
|
171
172
|
onBlur={onBlurHandler}
|
|
172
173
|
onChange={onChangeHandler}
|
|
173
174
|
autoComplete="off"
|
|
175
|
+
{...restProps}
|
|
174
176
|
/>
|
|
175
177
|
</ToolTip>
|
|
176
178
|
{typeof tail === "string" ? (
|
|
@@ -26,11 +26,12 @@
|
|
|
26
26
|
justify-content: center;
|
|
27
27
|
margin: 0 5px;
|
|
28
28
|
position: relative;
|
|
29
|
+
color: #ffffff !important;
|
|
29
30
|
& > a {
|
|
30
|
-
color: #
|
|
31
|
+
color: #ffffff !important;
|
|
31
32
|
}
|
|
32
|
-
&--active::after{
|
|
33
|
-
content:
|
|
33
|
+
&--active::after {
|
|
34
|
+
content: '';
|
|
34
35
|
position: absolute;
|
|
35
36
|
top: 50%;
|
|
36
37
|
left: 50%;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.base-info__divider {
|
|
2
2
|
height: 8px;
|
|
3
|
-
background: #
|
|
3
|
+
background: #f0f2f5;
|
|
4
4
|
margin: 0 32px;
|
|
5
5
|
}
|
|
6
6
|
.base-info__participant-followers-wrapper {
|
|
@@ -9,17 +9,18 @@
|
|
|
9
9
|
.base-info__person-block {
|
|
10
10
|
font-size: 14px;
|
|
11
11
|
font-weight: 600;
|
|
12
|
-
color: #
|
|
12
|
+
color: #141c28;
|
|
13
13
|
line-height: 22px;
|
|
14
|
-
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
|
|
14
|
+
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
|
|
15
|
+
sans-serif, PingFang SC, Microsoft YaHei;
|
|
15
16
|
padding-left: 10px;
|
|
16
|
-
&:first-of-type{
|
|
17
|
+
&:first-of-type {
|
|
17
18
|
margin-bottom: 4px;
|
|
18
19
|
}
|
|
19
20
|
.base-info__person-block-title {
|
|
20
21
|
font-size: 14px;
|
|
21
22
|
font-weight: 600;
|
|
22
|
-
color: #
|
|
23
|
+
color: #141c28;
|
|
23
24
|
line-height: 22px;
|
|
24
25
|
margin-bottom: 8px;
|
|
25
26
|
display: block;
|
|
@@ -28,4 +29,4 @@
|
|
|
28
29
|
}
|
|
29
30
|
.base-info__infos-wrapper {
|
|
30
31
|
padding: 0 42px 0 22px;
|
|
31
|
-
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.part-notice {
|
|
2
|
+
margin-left: 16px;
|
|
3
|
+
height: 36px;
|
|
4
|
+
background: #fcedd4;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
font-size: 12px;
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
color: #3f4755;
|
|
10
|
+
line-height: 18px;
|
|
11
|
+
position: relative;
|
|
12
|
+
padding: 0 12px;
|
|
13
|
+
margin-bottom: 10px;
|
|
14
|
+
margin-top: 16px;
|
|
15
|
+
border-radius: 12px;
|
|
16
|
+
|
|
17
|
+
> .tu-icon-tishi {
|
|
18
|
+
color: #f0a326;
|
|
19
|
+
margin-right: 8px;
|
|
20
|
+
}
|
|
21
|
+
&__link {
|
|
22
|
+
color: #f6bd16;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
}
|
|
25
|
+
&__close {
|
|
26
|
+
color: #f6bd16;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
font-size: 16px;
|
|
29
|
+
position: absolute;
|
|
30
|
+
right: 12px;
|
|
31
|
+
}
|
|
32
|
+
&__image {
|
|
33
|
+
width: 16px;
|
|
34
|
+
height: 16px;
|
|
35
|
+
margin-right: 8px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React, { FC, useState, useCallback } from "react";
|
|
2
|
+
import { LocalStorage } from "../../utils/local-storage";
|
|
3
|
+
import "./index.scss";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
text: any;
|
|
7
|
+
link: string;
|
|
8
|
+
storageName?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const preCls = "part-notice";
|
|
12
|
+
const storage = new LocalStorage();
|
|
13
|
+
|
|
14
|
+
const PartNotice: FC<Props> = ({ storageName, text, link }) => {
|
|
15
|
+
const [visible, setVisible] = useState(() => {
|
|
16
|
+
const stopTaking: any = storage.getItem(storageName);
|
|
17
|
+
if (stopTaking?.date) {
|
|
18
|
+
const oldDate = new Date(stopTaking?.date).getDate();
|
|
19
|
+
const newDate = new Date().getDate();
|
|
20
|
+
if (newDate > oldDate) {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
return true;
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const handleClose = useCallback(() => {
|
|
29
|
+
setVisible(false);
|
|
30
|
+
storage.setItem(storageName, { bol: false, date: new Date() });
|
|
31
|
+
}, []);
|
|
32
|
+
|
|
33
|
+
const handleOpenLink = () => {
|
|
34
|
+
window.open(link, "_target");
|
|
35
|
+
};
|
|
36
|
+
if (!visible) return <span />;
|
|
37
|
+
return (
|
|
38
|
+
<div className={`${preCls}`}>
|
|
39
|
+
<span className="tu-icon-tishi" />
|
|
40
|
+
{text}
|
|
41
|
+
<span className={`${preCls}__link`} onClick={handleOpenLink}>了解详情</span>
|
|
42
|
+
<span className={`tu-icon-close ${preCls}__close`} onClick={handleClose} />
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
PartNotice.defaultProps = {
|
|
47
|
+
storageName: "partNotice",
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default PartNotice;
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "./index.scss";
|
|
2
|
-
import { default as StopTakingModal } from "./components/stop-taking-modal";
|
|
3
2
|
|
|
4
3
|
export { default as Dialog } from "./components/dialog";
|
|
5
4
|
export { default as Switch } from "./components/switch";
|
|
@@ -58,6 +57,7 @@ export { default as OkrShare } from "./components/okr-share";
|
|
|
58
57
|
export { default as OkrcaseLibrary } from "./components/okrcase-library";
|
|
59
58
|
export { default as OkrcaseLibraryCard } from "./components/okrcase-library-card";
|
|
60
59
|
export { default as OperationRecords } from "./components/operation-records";
|
|
60
|
+
export { default as PartNotice } from "./components/part-notice";
|
|
61
61
|
export { default as Pagination } from "./components/pagination";
|
|
62
62
|
export { default as PasswordInput } from "./components/password-input";
|
|
63
63
|
export { default as PhotoCard } from "./components/photo-card";
|
|
@@ -51,6 +51,7 @@ function PageLayout(props: {
|
|
|
51
51
|
}) {
|
|
52
52
|
const { children } = props;
|
|
53
53
|
const [topCardVisible, setTopCardVisible] = useState(() => {
|
|
54
|
+
if (getTenantInfo().Source === 964) return false;
|
|
54
55
|
const stopTaking: any = storage.getItem("topGlobalCard");
|
|
55
56
|
if (stopTaking?.date) {
|
|
56
57
|
const oldDate = new Date(stopTaking?.date).getDate();
|
package/src/utils/open-data.js
CHANGED
|
@@ -32,12 +32,12 @@ function openData(p) {
|
|
|
32
32
|
const ref = useRef(null);
|
|
33
33
|
|
|
34
34
|
useEffect(() => {
|
|
35
|
-
let wWOpenData = window.WWOpenData;
|
|
35
|
+
let wWOpenData = window.top.WWOpenData;
|
|
36
36
|
|
|
37
|
-
// 如果当前页面中没有 WWOpenData 则去 top 上尝试获取
|
|
38
|
-
if (!wWOpenData && window.top.WWOpenData) {
|
|
39
|
-
|
|
40
|
-
}
|
|
37
|
+
// // 如果当前页面中没有 WWOpenData 则去 top 上尝试获取
|
|
38
|
+
// if (!wWOpenData && window.top.WWOpenData) {
|
|
39
|
+
// wWOpenData = window.top.WWOpenData;
|
|
40
|
+
// }
|
|
41
41
|
|
|
42
42
|
wWOpenData && wWOpenData.bind(ref.current);
|
|
43
43
|
});
|