@titaui/pc 1.9.145 → 1.9.146

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.
@@ -75,8 +75,9 @@ var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
75
75
 
76
76
  if (window.titaTracker) {
77
77
  window.titaTracker("action").record({
78
- actionGroup: "申请演示__取消提交",
79
- actionName: "\u586B\u5199\u60C5\u51B5\uFF1A".concat(content)
78
+ productName: "预约演示",
79
+ actionGroup: "取消预约演示",
80
+ actionName: "\u53D6\u6D88\u9884\u7EA6\u6F14\u793A:\u586B\u5199\u60C5\u51B5\uFF1A".concat(content)
80
81
  });
81
82
  }
82
83
 
@@ -87,6 +88,14 @@ var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
87
88
  }
88
89
  };
89
90
 
91
+ var handleSuccessCloseBookDemo = function handleSuccessCloseBookDemo() {
92
+ setDialogVisible(false);
93
+
94
+ if (visibleChange) {
95
+ visibleChange(false);
96
+ }
97
+ };
98
+
90
99
  var handleChangeData = function handleChangeData(result) {
91
100
  setData(result);
92
101
  };
@@ -153,7 +162,7 @@ var BookDemoPC = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
153
162
  onChange: handleChangeData,
154
163
  source: source,
155
164
  type: type,
156
- onSubmitSuccess: handleCloseBookDemo
165
+ onSubmitSuccess: handleSuccessCloseBookDemo
157
166
  }));
158
167
  });
159
168
  BookDemoPC.defaultProps = {
@@ -95,11 +95,11 @@ var DemoMenus = function DemoMenus(props) {
95
95
 
96
96
 
97
97
  (0, _react.useEffect)(function () {
98
- var menuHighlight = new _menuHighlight["default"](history);
98
+ var menuHighlight = new _menuHighlight["default"](history, isManager);
99
99
  menuHighlight.highlight(function (menu) {
100
100
  return setSelectedMenuKeys([menu]);
101
101
  });
102
- }, [history.location.pathname, history.location.search]);
102
+ }, [history.location.pathname, history.location.search, isManager]);
103
103
 
104
104
  var onSelectHandler = function onSelectHandler(selectedKyes, _ref) {
105
105
  var node = _ref.node;
@@ -14,11 +14,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
14
14
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
15
15
 
16
16
  var _default = /*#__PURE__*/function () {
17
- function _default(history) {
17
+ function _default(history, isManager) {
18
18
  _classCallCheck(this, _default);
19
19
 
20
20
  this.history = null;
21
21
  this.history = history;
22
+ this.isManager = isManager;
22
23
  }
23
24
 
24
25
  _createClass(_default, [{
@@ -32,7 +33,12 @@ var _default = /*#__PURE__*/function () {
32
33
  var _this$history$locatio = this.history.location,
33
34
  pathname = _this$history$locatio.pathname,
34
35
  search = _this$history$locatio.search;
35
- return pathname.match(/demofree/) && (!search || search.match(/selected[\s]*?=[\s]*?unassigned/));
36
+
37
+ if (this.isManager === 1) {
38
+ return pathname.match(/demofree/) && (!search || search.match(/selected[\s]*?=[\s]*?unassigned/));
39
+ }
40
+
41
+ return pathname.match(/demofree/) && search.match(/selected[\s]*?=[\s]*?unassigned/);
36
42
  }
37
43
  }, {
38
44
  key: "isAssigned",
@@ -40,7 +46,7 @@ var _default = /*#__PURE__*/function () {
40
46
  var _this$history$locatio2 = this.history.location,
41
47
  pathname = _this$history$locatio2.pathname,
42
48
  search = _this$history$locatio2.search;
43
- return pathname.match(/demofree/) && search.match(/selected[\s]*?=[\s]*?assigned/);
49
+ return pathname.match(/demofree/) && (!search || search.match(/selected[\s]*?=[\s]*?assigned/));
44
50
  }
45
51
  }, {
46
52
  key: "isReserved",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.9.145",
3
+ "version": "1.9.146",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",