@titaui/pc 1.11.52-beta.5 → 1.11.52-beta.6
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.
|
@@ -21,8 +21,6 @@ var _confidence = _interopRequireDefault(require("../../../confidence"));
|
|
|
21
21
|
|
|
22
22
|
var _bsGlobal = require("../../../../utils/bs-global");
|
|
23
23
|
|
|
24
|
-
var _dom = require("./dom");
|
|
25
|
-
|
|
26
24
|
var _requestApis = require("../../request-apis");
|
|
27
25
|
|
|
28
26
|
var _getLocale = require("../../../../utils/getLocale");
|
|
@@ -119,14 +117,15 @@ function CreateKr(_ref) {
|
|
|
119
117
|
getWrapperRef: getWrapperRef,
|
|
120
118
|
onHide: onHide
|
|
121
119
|
});
|
|
122
|
-
var
|
|
120
|
+
var createKr = (0, _react.useCallback)(function () {
|
|
123
121
|
// 选中了选人组件中的item
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
122
|
+
// if (hasAncestorElement(e.target, 'titaui-popup')) return
|
|
123
|
+
// if (
|
|
124
|
+
// dataRef.current.getWrapperRef().current &&
|
|
125
|
+
// dataRef.current.getWrapperRef().current.contains(e.target as Node)
|
|
126
|
+
// ) {
|
|
127
|
+
// return
|
|
128
|
+
// }
|
|
130
129
|
var _dataRef$current$krNa = dataRef.current.krNameData,
|
|
131
130
|
mentionUsers = _dataRef$current$krNa.mentionUsers,
|
|
132
131
|
pureText = _dataRef$current$krNa.pureText,
|
|
@@ -145,6 +144,7 @@ function CreateKr(_ref) {
|
|
|
145
144
|
workId: dataRef.current.workId,
|
|
146
145
|
confidenceIndex: confidenceIndex
|
|
147
146
|
}).then(function (res) {
|
|
147
|
+
setShowTip(false);
|
|
148
148
|
dataRef.current.addKr(res);
|
|
149
149
|
dataRef.current.onHide();
|
|
150
150
|
});
|
|
@@ -197,12 +197,6 @@ function CreateKr(_ref) {
|
|
|
197
197
|
}
|
|
198
198
|
};
|
|
199
199
|
|
|
200
|
-
var onBlur = function onBlur() {
|
|
201
|
-
setTimeout(function () {
|
|
202
|
-
setShowTip(false);
|
|
203
|
-
}, 200);
|
|
204
|
-
};
|
|
205
|
-
|
|
206
200
|
var onFocus = function onFocus() {
|
|
207
201
|
tipsEnable && !dataRef.current.hideTips && setShowTip(true);
|
|
208
202
|
};
|
|
@@ -245,7 +239,7 @@ function CreateKr(_ref) {
|
|
|
245
239
|
}, /*#__PURE__*/_react["default"].createElement(_richEditor.TitaInlineRichEditor, {
|
|
246
240
|
initialState: undefined,
|
|
247
241
|
onChange: setKrNameData,
|
|
248
|
-
onBlur:
|
|
242
|
+
onBlur: createKr,
|
|
249
243
|
onFocus: onFocus,
|
|
250
244
|
onKeyDown: onInputKeyDown,
|
|
251
245
|
placeholder: (0, _getLocale.getLocale)('OKR_MyO_Text_Createkeyr'),
|