@titaui/pc 1.9.123 → 1.9.124

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.
@@ -33,6 +33,8 @@ var _constant = require("../../../../constant");
33
33
 
34
34
  var _scrollbar = _interopRequireDefault(require("../../../../../scrollbar"));
35
35
 
36
+ var _conditionRender = _interopRequireDefault(require("../../../../../condition-render"));
37
+
36
38
  require("./index.css");
37
39
 
38
40
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -104,10 +106,15 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
104
106
  hasErr = _useState8[0],
105
107
  setHasErr = _useState8[1];
106
108
 
107
- var _useState9 = (0, _react.useState)([]),
109
+ var _useState9 = (0, _react.useState)(false),
108
110
  _useState10 = _slicedToArray(_useState9, 2),
109
- result = _useState10[0],
110
- setResult = _useState10[1];
111
+ isLoading = _useState10[0],
112
+ setIsLoading = _useState10[1];
113
+
114
+ var _useState11 = (0, _react.useState)([]),
115
+ _useState12 = _slicedToArray(_useState11, 2),
116
+ result = _useState12[0],
117
+ setResult = _useState12[1];
111
118
 
112
119
  var formRef = (0, _react.useRef)(document.createElement("div"));
113
120
 
@@ -137,7 +144,8 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
137
144
  var emptyFun = function emptyFun() {};
138
145
 
139
146
  var handleCommit = function handleCommit() {
140
- if (hasErr) return;
147
+ if (hasErr || isLoading) return;
148
+ setIsLoading(true);
141
149
  var verificationData = result.filter(function (item) {
142
150
  return item.type === "verificationCode";
143
151
  })[0];
@@ -175,6 +183,7 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
175
183
  _toast["default"].Error(error);
176
184
  })["finally"](function () {
177
185
  var content = _constant.trackerInfo[type];
186
+ setIsLoading(false);
178
187
 
179
188
  if (window.titaTracker) {
180
189
  window.titaTracker("action").record(_objectSpread({
@@ -309,9 +318,11 @@ var BookDemoPCContent = function BookDemoPCContent(_ref) {
309
318
  className: (0, _classnames["default"])("".concat(preCls, "__right-commit"))
310
319
  }, /*#__PURE__*/_react["default"].createElement("button", {
311
320
  type: "button",
312
- className: (0, _classnames["default"])("".concat(preCls, "__right-commit-btn"), _defineProperty({}, "".concat(preCls, "__right-commit-btn--disabled"), hasErr)),
321
+ className: (0, _classnames["default"])("".concat(preCls, "__right-commit-btn"), _defineProperty({}, "".concat(preCls, "__right-commit-btn--disabled"), hasErr || isLoading)),
313
322
  onClick: handleCommit
314
- }, "\u63D0\u4EA4"))));
323
+ }, "\u63D0\u4EA4", /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
324
+ condition: isLoading
325
+ }, /*#__PURE__*/_react["default"].createElement("span", null, "\u4E2D\u3002\u3002\u3002"))))));
315
326
  };
316
327
 
317
328
  BookDemoPCContent.defaultProps = {
@@ -20,6 +20,11 @@
20
20
  box-sizing: border-box;
21
21
  text-align: left;
22
22
  user-select: none;
23
+ color: #3f4755;
24
+ }
25
+
26
+ .titaui-drop-selector__icon-item:hover {
27
+ color: #2879ff;
23
28
  }
24
29
 
25
30
  .titaui-drop-selector__icon-item:hover {
@@ -73,6 +78,7 @@
73
78
  box-sizing: border-box;
74
79
  text-align: left;
75
80
  user-select: none;
81
+ color: #3f4755;
76
82
  vertical-align: text-top;
77
83
  width: 100%;
78
84
  padding: 0 20px;
@@ -80,6 +86,10 @@
80
86
  box-sizing: border-box !important;
81
87
  }
82
88
 
89
+ .titaui-drop-selector__operation-item:hover {
90
+ color: #2879ff;
91
+ }
92
+
83
93
  .titaui-drop-selector__operation-item .titaui-checkbox {
84
94
  position: absolute;
85
95
  top: 8px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.9.123",
3
+ "version": "1.9.124",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",