@titaui/pc 1.12.9-beta.2 → 1.12.9-beta.3

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.
Files changed (27) hide show
  1. package/lib/components/drawer/index.css +9 -0
  2. package/lib/components/drawer/index.js +11 -8
  3. package/lib/components/menus/export-modules/appraisal-menus/index.js +30 -12
  4. package/lib/components/menus/export-modules/appraisal-menus/menu-highlight.js +22 -6
  5. package/lib/components/menus/export-modules/appraisal-menus/menus.js +104 -9
  6. package/lib/components/menus/export-modules/okr-menus/menus.js +6 -3
  7. package/lib/components/nav-top/components/app-center/images/chart.svg +1 -0
  8. package/lib/components/nav-top/components/app-center/images/file.svg +1 -0
  9. package/lib/components/nav-top/components/app-center/images/interview.svg +1 -0
  10. package/lib/components/nav-top/components/app-center/images/learning.svg +1 -0
  11. package/lib/components/nav-top/components/app-center/images/okr.svg +1 -0
  12. package/lib/components/nav-top/components/app-center/images/performance.svg +1 -0
  13. package/lib/components/nav-top/components/app-center/images/plan.svg +1 -0
  14. package/lib/components/nav-top/components/app-center/images/project.svg +1 -0
  15. package/lib/components/nav-top/components/app-center/images/summary.svg +1 -0
  16. package/lib/components/nav-top/components/app-center/index.css +91 -0
  17. package/lib/components/nav-top/components/app-center/index.js +123 -0
  18. package/lib/components/nav-top/components/menu/index.js +2 -6
  19. package/lib/components/nav-top/index.css +41 -6
  20. package/lib/components/nav-top/index.js +69 -35
  21. package/lib/components/nav-top/utils.js +453 -5
  22. package/lib/pages/aha2021/index.js +5 -5
  23. package/lib/pages/aha2021/new-menu-switcher/index.css +41 -0
  24. package/lib/pages/aha2021/new-menu-switcher/index.js +81 -0
  25. package/lib/pages/aha2021/new-menu-switcher/new-menu-bg.png +0 -0
  26. package/lib/pages/aha2021/request-api.js +15 -0
  27. package/package.json +1 -1
@@ -13,11 +13,459 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
13
13
 
14
14
  var getMenus = function getMenus() {
15
15
  // @ts-ignore
16
- var navs = window.BSGlobal.newNavigation;
17
- navs.sort(function (pre, next) {
18
- return pre.orderId - next.orderId;
19
- });
20
- return navs;
16
+ // const navs: INavType[] = window.BSGlobal.newNavigation;
17
+ // navs.sort((pre, next) => pre.orderId - next.orderId);
18
+ // return navs;
19
+ var newNavigation = [{
20
+ id: 21817,
21
+ tenantId: 0,
22
+ title: "动态",
23
+ href: "#dynamic",
24
+ iconName: "",
25
+ type: "hash",
26
+ orderId: 1,
27
+ code: "",
28
+ appId: 119,
29
+ appCode: null,
30
+ status: 0,
31
+ color: "#5B99EE",
32
+ groupId: 0,
33
+ signUrl: null,
34
+ domain: "",
35
+ labelName: null,
36
+ DataSource: null,
37
+ defaultExpand: false,
38
+ children: [],
39
+ menuPoint: null,
40
+ key: "dynamic"
41
+ }, {
42
+ id: 21818,
43
+ tenantId: 0,
44
+ title: "OKR",
45
+ href: "#okr/manage?relation=1",
46
+ iconName: "okr",
47
+ type: "hash",
48
+ orderId: 2,
49
+ code: "",
50
+ appId: 113,
51
+ appCode: null,
52
+ status: 0,
53
+ color: "#9382FF",
54
+ groupId: 0,
55
+ signUrl: null,
56
+ domain: "",
57
+ labelName: null,
58
+ DataSource: null,
59
+ defaultExpand: false,
60
+ children: [{
61
+ id: 21001,
62
+ tenantId: 0,
63
+ title: "OKR",
64
+ href: "#okr/manage?relation=1",
65
+ iconName: "",
66
+ type: "hash",
67
+ orderId: 3,
68
+ code: "",
69
+ appId: 666,
70
+ appCode: null,
71
+ status: 0,
72
+ color: "#ED5858",
73
+ groupId: 0,
74
+ signUrl: null,
75
+ domain: "",
76
+ labelName: null,
77
+ DataSource: null,
78
+ defaultExpand: false,
79
+ children: [],
80
+ menuPoint: null
81
+ }, {
82
+ id: 21002,
83
+ tenantId: 0,
84
+ title: "对齐",
85
+ href: "#okr/map",
86
+ iconName: "",
87
+ type: "hash",
88
+ orderId: 3,
89
+ code: "",
90
+ appId: 666,
91
+ appCode: null,
92
+ status: 0,
93
+ color: "#ED5858",
94
+ groupId: 0,
95
+ signUrl: null,
96
+ domain: "",
97
+ labelName: null,
98
+ DataSource: null,
99
+ defaultExpand: false,
100
+ children: [],
101
+ menuPoint: null
102
+ }, {
103
+ id: 21003,
104
+ tenantId: 0,
105
+ title: "工作法",
106
+ href: "#okr/panel",
107
+ iconName: "",
108
+ type: "hash",
109
+ orderId: 3,
110
+ code: "",
111
+ appId: 666,
112
+ appCode: null,
113
+ status: 0,
114
+ color: "#ED5858",
115
+ groupId: 0,
116
+ signUrl: null,
117
+ domain: "",
118
+ labelName: null,
119
+ DataSource: null,
120
+ defaultExpand: false,
121
+ children: [],
122
+ menuPoint: null
123
+ }, {
124
+ id: 21004,
125
+ tenantId: 0,
126
+ title: "仪表盘",
127
+ href: "#okr/chart",
128
+ iconName: "",
129
+ type: "hash",
130
+ orderId: 3,
131
+ code: "",
132
+ appId: 666,
133
+ appCode: null,
134
+ status: 0,
135
+ color: "#ED5858",
136
+ groupId: 0,
137
+ signUrl: null,
138
+ domain: "",
139
+ labelName: null,
140
+ DataSource: null,
141
+ defaultExpand: false,
142
+ children: [],
143
+ menuPoint: null
144
+ }],
145
+ menuPoint: null,
146
+ key: "okr"
147
+ }, {
148
+ id: 21819,
149
+ tenantId: 0,
150
+ title: "绩效考核",
151
+ href: "#performance",
152
+ iconName: "performance",
153
+ type: "hash",
154
+ orderId: 3,
155
+ code: "",
156
+ appId: 666,
157
+ appCode: null,
158
+ status: 0,
159
+ color: "#ED5858",
160
+ groupId: 0,
161
+ signUrl: null,
162
+ domain: "",
163
+ labelName: null,
164
+ DataSource: null,
165
+ defaultExpand: false,
166
+ children: [{
167
+ id: 22001,
168
+ tenantId: 0,
169
+ title: "我的考核",
170
+ href: "#performance/my",
171
+ iconName: "",
172
+ type: "hash",
173
+ orderId: 3,
174
+ code: "",
175
+ appId: 666,
176
+ appCode: null,
177
+ status: 0,
178
+ color: "#ED5858",
179
+ groupId: 0,
180
+ signUrl: null,
181
+ domain: "",
182
+ labelName: null,
183
+ DataSource: null,
184
+ defaultExpand: false,
185
+ children: [],
186
+ menuPoint: null
187
+ }, {
188
+ id: 22002,
189
+ tenantId: 0,
190
+ title: "考核管理",
191
+ href: "#performance/manage",
192
+ iconName: "",
193
+ type: "hash",
194
+ orderId: 3,
195
+ code: "",
196
+ appId: 666,
197
+ appCode: null,
198
+ status: 0,
199
+ color: "#ED5858",
200
+ groupId: 0,
201
+ signUrl: null,
202
+ domain: "",
203
+ labelName: null,
204
+ DataSource: null,
205
+ defaultExpand: false,
206
+ children: [],
207
+ menuPoint: null
208
+ }, {
209
+ id: 22003,
210
+ tenantId: 0,
211
+ title: "仪表盘",
212
+ href: "#performance/dashboard",
213
+ iconName: "",
214
+ type: "hash",
215
+ orderId: 3,
216
+ code: "",
217
+ appId: 666,
218
+ appCode: null,
219
+ status: 0,
220
+ color: "#ED5858",
221
+ groupId: 0,
222
+ signUrl: null,
223
+ domain: "",
224
+ labelName: null,
225
+ DataSource: null,
226
+ defaultExpand: false,
227
+ children: [],
228
+ menuPoint: null
229
+ }],
230
+ menuPoint: null,
231
+ key: "performance"
232
+ }, {
233
+ id: 21820,
234
+ tenantId: 0,
235
+ title: "项目",
236
+ href: "#work",
237
+ iconName: "project",
238
+ type: "hash",
239
+ orderId: 4,
240
+ code: "",
241
+ appId: 112,
242
+ appCode: null,
243
+ status: 0,
244
+ color: "#F28D49",
245
+ groupId: 0,
246
+ signUrl: null,
247
+ domain: "",
248
+ labelName: null,
249
+ DataSource: null,
250
+ defaultExpand: false,
251
+ children: [{
252
+ id: 21820,
253
+ tenantId: 0,
254
+ title: "项目",
255
+ href: "#work",
256
+ iconName: "project",
257
+ type: "hash",
258
+ orderId: 4,
259
+ code: "",
260
+ appId: 112,
261
+ appCode: null,
262
+ status: 0,
263
+ color: "#F28D49",
264
+ groupId: 0,
265
+ signUrl: null,
266
+ domain: "",
267
+ labelName: null,
268
+ DataSource: null,
269
+ defaultExpand: false,
270
+ children: [],
271
+ menuPoint: null,
272
+ key: "work"
273
+ }],
274
+ menuPoint: null,
275
+ key: "work"
276
+ }, {
277
+ id: 21823,
278
+ tenantId: 0,
279
+ title: "计划表",
280
+ href: "#plan",
281
+ iconName: "plan",
282
+ type: "hash",
283
+ orderId: 5,
284
+ code: "",
285
+ appId: 116,
286
+ appCode: null,
287
+ status: 0,
288
+ color: "#53C6C6",
289
+ groupId: 0,
290
+ signUrl: null,
291
+ domain: "",
292
+ labelName: null,
293
+ DataSource: null,
294
+ defaultExpand: false,
295
+ children: [{
296
+ id: 21823,
297
+ tenantId: 0,
298
+ title: "计划表",
299
+ href: "#plan",
300
+ iconName: "plan",
301
+ type: "hash",
302
+ orderId: 5,
303
+ code: "",
304
+ appId: 116,
305
+ appCode: null,
306
+ status: 0,
307
+ color: "#53C6C6",
308
+ groupId: 0,
309
+ signUrl: null,
310
+ domain: "",
311
+ labelName: null,
312
+ DataSource: null,
313
+ defaultExpand: false,
314
+ children: [],
315
+ menuPoint: null,
316
+ key: "plan"
317
+ }],
318
+ menuPoint: null,
319
+ key: "plan"
320
+ }, {
321
+ id: 21821,
322
+ tenantId: 0,
323
+ title: "总结",
324
+ href: "#daily",
325
+ iconName: "summary",
326
+ type: "hash",
327
+ orderId: 6,
328
+ code: "",
329
+ appId: 115,
330
+ appCode: null,
331
+ status: 0,
332
+ color: "#F5D540",
333
+ groupId: 0,
334
+ signUrl: null,
335
+ domain: "",
336
+ labelName: null,
337
+ DataSource: null,
338
+ defaultExpand: false,
339
+ children: [{
340
+ id: 21821,
341
+ tenantId: 0,
342
+ title: "总结",
343
+ href: "#daily",
344
+ iconName: "summary",
345
+ type: "hash",
346
+ orderId: 6,
347
+ code: "",
348
+ appId: 115,
349
+ appCode: null,
350
+ status: 0,
351
+ color: "#F5D540",
352
+ groupId: 0,
353
+ signUrl: null,
354
+ domain: "",
355
+ labelName: null,
356
+ DataSource: null,
357
+ defaultExpand: false,
358
+ children: [],
359
+ menuPoint: null,
360
+ key: "summary"
361
+ }],
362
+ menuPoint: null,
363
+ key: "daily"
364
+ }, {
365
+ id: 21822,
366
+ tenantId: 0,
367
+ title: "报表",
368
+ href: "#report",
369
+ iconName: "chart",
370
+ type: "hash",
371
+ orderId: 7,
372
+ code: "",
373
+ appId: 118,
374
+ appCode: null,
375
+ status: 0,
376
+ color: "#38BA72",
377
+ groupId: 0,
378
+ signUrl: null,
379
+ domain: "",
380
+ labelName: null,
381
+ DataSource: null,
382
+ defaultExpand: false,
383
+ children: [{
384
+ id: 21822,
385
+ tenantId: 0,
386
+ title: "报表",
387
+ href: "#report",
388
+ iconName: "chart",
389
+ type: "hash",
390
+ orderId: 7,
391
+ code: "",
392
+ appId: 118,
393
+ appCode: null,
394
+ status: 0,
395
+ color: "#38BA72",
396
+ groupId: 0,
397
+ signUrl: null,
398
+ domain: "",
399
+ labelName: null,
400
+ DataSource: null,
401
+ defaultExpand: false,
402
+ children: [],
403
+ menuPoint: null,
404
+ key: "report"
405
+ }],
406
+ menuPoint: null,
407
+ key: "report"
408
+ }, {
409
+ id: 21831,
410
+ tenantId: 0,
411
+ title: "Learning",
412
+ href: "500000126/eLearningHome#learning",
413
+ iconName: "learning",
414
+ type: "hash",
415
+ orderId: 8,
416
+ code: "",
417
+ appId: 120,
418
+ appCode: null,
419
+ status: 0,
420
+ color: "#5B99EE",
421
+ groupId: 0,
422
+ signUrl: null,
423
+ domain: "",
424
+ labelName: null,
425
+ DataSource: null,
426
+ defaultExpand: false,
427
+ children: [],
428
+ menuPoint: null,
429
+ key: "learning"
430
+ }, {
431
+ appId: 101,
432
+ children: [{
433
+ id: 21831,
434
+ tenantId: 0,
435
+ title: "我的面谈",
436
+ href: "#/interview",
437
+ iconName: "learning",
438
+ type: "hash",
439
+ orderId: 8,
440
+ code: "",
441
+ appId: 120,
442
+ appCode: null,
443
+ status: 0,
444
+ color: "#5B99EE",
445
+ groupId: 0,
446
+ signUrl: null,
447
+ domain: "",
448
+ labelName: null,
449
+ DataSource: null,
450
+ defaultExpand: false,
451
+ children: [],
452
+ menuPoint: null,
453
+ key: "learning"
454
+ }],
455
+ code: "interview",
456
+ color: "#ED5858",
457
+ domain: "",
458
+ href: "#/interview",
459
+ iconName: "interview",
460
+ id: 22827,
461
+ menuPoint: null,
462
+ orderId: 9,
463
+ signUrl: null,
464
+ tenantId: 0,
465
+ title: "1 on 1",
466
+ key: 'interview'
467
+ }];
468
+ return newNavigation;
21
469
  };
22
470
 
23
471
  exports.getMenus = getMenus;
@@ -11,8 +11,6 @@ var _react = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
- var _contactKefu = _interopRequireDefault(require("../../components/contact-kefu"));
15
-
16
14
  var _navTop = _interopRequireDefault(require("../../components/nav-top"));
17
15
 
18
16
  var _followerVisitor = _interopRequireDefault(require("../../components/follower-visitor"));
@@ -37,10 +35,12 @@ var _errorBoundary = _interopRequireDefault(require("../../components/error-boun
37
35
 
38
36
  var _errorLevel = _interopRequireDefault(require("../../utils/error-level"));
39
37
 
40
- require("./index.css");
41
-
42
38
  var _hooks = _interopRequireDefault(require("../../utils/hooks"));
43
39
 
40
+ var _newMenuSwitcher = _interopRequireDefault(require("./new-menu-switcher"));
41
+
42
+ require("./index.css");
43
+
44
44
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
45
45
 
46
46
  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); }
@@ -103,7 +103,7 @@ function PageLayout(props) {
103
103
  }
104
104
  }, children), !isTencentHr && /*#__PURE__*/_react["default"].createElement("div", {
105
105
  className: (0, _classnames["default"])("".concat(preCls, "__help"))
106
- }, /*#__PURE__*/_react["default"].createElement(_helpCard["default"], null)), !isTencentHr && !(0, _helpers.isDingDing)() && !(0, _helpers.isFeishu)() && /*#__PURE__*/_react["default"].createElement(_contactKefu["default"], null), isTrial && !isTencentHr && /*#__PURE__*/_react["default"].createElement("div", {
106
+ }, /*#__PURE__*/_react["default"].createElement(_helpCard["default"], null)), /*#__PURE__*/_react["default"].createElement(_newMenuSwitcher["default"], null), isTrial && !isTencentHr && /*#__PURE__*/_react["default"].createElement("div", {
107
107
  className: "".concat(preCls, "__invite")
108
108
  }, /*#__PURE__*/_react["default"].createElement(_invitePeople["default"], null)), isTencentHr && /*#__PURE__*/_react["default"].createElement(_hrMessage["default"], null), /*#__PURE__*/_react["default"].createElement(_errorBoundary["default"], {
109
109
  errorLevel: _errorLevel["default"].P0,
@@ -0,0 +1,41 @@
1
+ .new-menu-switcher {
2
+ position: fixed;
3
+ bottom: 74px;
4
+ right: 24px;
5
+ z-index: 2;
6
+ font-size: 28px;
7
+ }
8
+
9
+ .new-menu-switcher__new-version, .new-menu-switcher__old-version {
10
+ display: inline-block;
11
+ width: 42px;
12
+ height: 42px;
13
+ font-size: 14px;
14
+ line-height: 42px;
15
+ text-align: center;
16
+ border-radius: 100px;
17
+ text-overflow: ellipsis;
18
+ overflow: hidden;
19
+ white-space: nowrap;
20
+ cursor: pointer;
21
+ transition: width 0.3s;
22
+ }
23
+
24
+ .new-menu-switcher__new-version--full, .new-menu-switcher__old-version--full {
25
+ width: 108px;
26
+ }
27
+
28
+ .new-menu-switcher__new-version {
29
+ color: #fff;
30
+ box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2), inset 0px 0px 6px 2px rgba(255, 255, 255, 0.5);
31
+ background: url(./new-menu-bg.png) no-repeat;
32
+ background-color: linear-gradient(135deg, #ffc726 0%, #f69300 100%);
33
+ background-position: right bottom;
34
+ background-size: cover;
35
+ }
36
+
37
+ .new-menu-switcher__old-version {
38
+ color: #141c28;
39
+ background: #fff;
40
+ box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2), inset 0px 0px 6px 2px rgba(255, 255, 255, 0.5);
41
+ }
@@ -0,0 +1,81 @@
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 _requestApi = require("../request-api");
15
+
16
+ require("./index.css");
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
+
20
+ 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
+
22
+ 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
+
24
+ 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
+
26
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
+
28
+ 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."); }
29
+
30
+ 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); }
31
+
32
+ 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; }
33
+
34
+ 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; }
35
+
36
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
+
38
+ var precls = "new-menu-switcher";
39
+
40
+ var NewMenuSwitcher = function NewMenuSwitcher() {
41
+ var _useState = (0, _react.useState)(window.BSGlobal.isUseNewMenu),
42
+ _useState2 = _slicedToArray(_useState, 1),
43
+ isNewMenu = _useState2[0];
44
+
45
+ var _useState3 = (0, _react.useState)(!window.BSGlobal.isUseNewMenu),
46
+ _useState4 = _slicedToArray(_useState3, 2),
47
+ showFullTip = _useState4[0],
48
+ setShowFullTip = _useState4[1];
49
+
50
+ (0, _react.useEffect)(function () {
51
+ setTimeout(function () {
52
+ setShowFullTip(false);
53
+ }, 3000);
54
+ }, []);
55
+
56
+ var changeMenuVersion = function changeMenuVersion() {
57
+ (0, _requestApi.setMenuVersion)(window.BSGlobal.isUseNewMenu ? 0 : 1).then(function () {
58
+ window.location.href = "/";
59
+ });
60
+ }; // 当租户开启新菜单时,不允许员工切换菜单版本
61
+
62
+
63
+ if (!window.BSGlobal.isShowSwitchMenu) return null;
64
+ return /*#__PURE__*/_react["default"].createElement("span", {
65
+ className: precls,
66
+ onClick: changeMenuVersion,
67
+ onMouseEnter: function onMouseEnter() {
68
+ return setShowFullTip(true);
69
+ },
70
+ onMouseLeave: function onMouseLeave() {
71
+ return setShowFullTip(false);
72
+ }
73
+ }, isNewMenu && /*#__PURE__*/_react["default"].createElement("span", {
74
+ className: (0, _classnames["default"])("".concat(precls, "__old-version"), _defineProperty({}, "".concat(precls, "__old-version--full"), showFullTip))
75
+ }, /*#__PURE__*/_react["default"].createElement("span", null, showFullTip ? "返回旧版导航" : "旧版")), !isNewMenu && /*#__PURE__*/_react["default"].createElement("span", {
76
+ className: (0, _classnames["default"])("".concat(precls, "__new-version"), _defineProperty({}, "".concat(precls, "__new-version--full"), showFullTip))
77
+ }, /*#__PURE__*/_react["default"].createElement("span", null, showFullTip ? "体验新版导航" : "新版")));
78
+ };
79
+
80
+ var _default = NewMenuSwitcher;
81
+ exports["default"] = _default;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.setMenuVersion = void 0;
7
+
8
+ var _request = require("../../utils/request");
9
+
10
+ // eslint-disable-next-line import/prefer-default-export
11
+ var setMenuVersion = function setMenuVersion(version) {
12
+ return (0, _request.rpost)("v3")("menu/set/menuVersion?version=".concat(version));
13
+ };
14
+
15
+ exports.setMenuVersion = setMenuVersion;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.12.9-beta.2",
3
+ "version": "1.12.9-beta.3",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",