@titaui/pc 1.16.30-beta.1 → 1.16.30-beta.2
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/lib/components/change-okr-modal/index.js +1 -2
- package/lib/components/create-okr-modal/index.js +15 -3
- package/lib/components/keyword-search/index.css +3 -3
- package/lib/components/keyword-search/index.js +51 -42
- package/lib/components/menus/export-modules/skynet-dashboard-menu/index.js +5 -2
- package/lib/components/menus/export-modules/skynet-dashboard-menu/menus.js +13 -8
- package/lib/components/menus/export-modules/skynet-dashboard-menu/survey-front-menus.js +14 -16
- package/lib/components/okr-detail/e-list/search-form/fields/e-status.js +1 -1
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +3 -4
- package/lib/components/okr-review/components/ReviewItem/index.js +1 -1
- package/lib/components/okr-review/index.js +1 -1
- package/lib/components/period-selector/index.js +1 -3
- package/lib/components/search-input/index.js +6 -5
- package/lib/components-v1/textarea/index.js +0 -3
- package/package.json +1 -1
|
@@ -577,8 +577,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
577
577
|
data: isRefresh ? resData : [].concat(_toConsumableArray(data), _toConsumableArray(resData)),
|
|
578
578
|
isEnd: res.Data.nextPage === 0
|
|
579
579
|
}, function () {
|
|
580
|
-
console.log(
|
|
581
|
-
|
|
580
|
+
// console.log(this.state.data)
|
|
582
581
|
if (isRefresh) {
|
|
583
582
|
_this4.scollListToTop();
|
|
584
583
|
}
|
|
@@ -219,7 +219,13 @@ function CreateOkrModal(_ref, ref) {
|
|
|
219
219
|
setOkrClassify = _useState20[1]; // 目标类别
|
|
220
220
|
|
|
221
221
|
|
|
222
|
-
var _useState21 = (0, _react.useState)(
|
|
222
|
+
var _useState21 = (0, _react.useState)(function () {
|
|
223
|
+
if (window.BSGlobal.tenantInfo.isOpenInfo) {
|
|
224
|
+
return 1;
|
|
225
|
+
} else {
|
|
226
|
+
return 2;
|
|
227
|
+
}
|
|
228
|
+
}),
|
|
223
229
|
_useState22 = _slicedToArray(_useState21, 2),
|
|
224
230
|
visibility = _useState22[0],
|
|
225
231
|
setVisibility = _useState22[1]; // 可见性
|
|
@@ -678,7 +684,13 @@ function CreateOkrModal(_ref, ref) {
|
|
|
678
684
|
});
|
|
679
685
|
setCycle(cycle);
|
|
680
686
|
setOkrClassify(undefined);
|
|
681
|
-
|
|
687
|
+
|
|
688
|
+
if (window.BSGlobal.tenantInfo.isOpenInfo) {
|
|
689
|
+
setVisibility(1);
|
|
690
|
+
} else {
|
|
691
|
+
setVisibility(2);
|
|
692
|
+
}
|
|
693
|
+
|
|
682
694
|
setParent({
|
|
683
695
|
parentWorkId: 0,
|
|
684
696
|
parentWorkName: '',
|
|
@@ -855,7 +867,7 @@ function CreateOkrModal(_ref, ref) {
|
|
|
855
867
|
if (!isVisible) return; // @ts-ignore
|
|
856
868
|
|
|
857
869
|
(0, _requestApi.getImageBase64ByUrl)(user.id).then(function (data) {
|
|
858
|
-
console.log(data)
|
|
870
|
+
// console.log(data)
|
|
859
871
|
setUserAvatarBase64Url(data.Data.obj);
|
|
860
872
|
})["catch"](function (err) {
|
|
861
873
|
_toast["default"].Error(err);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
padding: 8px;
|
|
5
5
|
border-radius: 18px;
|
|
6
6
|
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
7
|
-
transition: all 0.
|
|
7
|
+
transition: all 0.4s cubic-bezier(0.17, 0.63, 0.32, 1.27);
|
|
8
8
|
background-color: #ffffff;
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
display: flex;
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
position: relative;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.titaui-keyword-search--
|
|
15
|
+
.titaui-keyword-search--activated {
|
|
16
16
|
width: 190px;
|
|
17
17
|
border: none;
|
|
18
18
|
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.titaui-keyword-search--
|
|
21
|
+
.titaui-keyword-search--activated .titaui-keyword-search__input {
|
|
22
22
|
opacity: 1;
|
|
23
23
|
visibility: visible;
|
|
24
24
|
}
|
|
@@ -39,13 +39,15 @@ var precls = 'titaui-keyword-search';
|
|
|
39
39
|
|
|
40
40
|
function KeywordSearch(props) {
|
|
41
41
|
var onSearch = props.onSearch,
|
|
42
|
+
_props$placeholder = props.placeholder,
|
|
43
|
+
placeholder = _props$placeholder === void 0 ? (0, _getLocale.getLocale)('Mod_Enterkeywords') : _props$placeholder,
|
|
42
44
|
_props$value = props.value,
|
|
43
45
|
value = _props$value === void 0 ? '' : _props$value;
|
|
44
46
|
|
|
45
47
|
var _useState = (0, _react.useState)(false),
|
|
46
48
|
_useState2 = _slicedToArray(_useState, 2),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
activated = _useState2[0],
|
|
50
|
+
setActivated = _useState2[1];
|
|
49
51
|
|
|
50
52
|
var _useState3 = (0, _react.useState)(''),
|
|
51
53
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -54,80 +56,87 @@ function KeywordSearch(props) {
|
|
|
54
56
|
|
|
55
57
|
var _useState5 = (0, _react.useState)(false),
|
|
56
58
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
searchWhenClear = _useState6[0],
|
|
60
|
+
setSearchWhenClear = _useState6[1];
|
|
59
61
|
|
|
60
62
|
var inputRef = (0, _react.useRef)();
|
|
61
63
|
var timerRef = (0, _react.useRef)();
|
|
62
64
|
|
|
65
|
+
var focus = function focus() {
|
|
66
|
+
clearTimeout(timerRef.current);
|
|
67
|
+
timerRef.current = setTimeout(function () {
|
|
68
|
+
var _inputRef$current;
|
|
69
|
+
|
|
70
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
|
|
63
74
|
var handleSearch = function handleSearch() {
|
|
64
|
-
|
|
75
|
+
setSearchWhenClear(!!keyword);
|
|
65
76
|
onSearch === null || onSearch === void 0 ? void 0 : onSearch({
|
|
66
77
|
keyWords: keyword
|
|
67
78
|
});
|
|
68
79
|
};
|
|
69
80
|
|
|
70
|
-
var
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
timerRef.current = setTimeout(function () {
|
|
74
|
-
var _inputRef$current;
|
|
81
|
+
var handleClearKeyword = function handleClearKeyword() {
|
|
82
|
+
focus();
|
|
83
|
+
setKeyword('');
|
|
75
84
|
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
if (searchWhenClear || value) {
|
|
86
|
+
onSearch === null || onSearch === void 0 ? void 0 : onSearch({
|
|
87
|
+
keyWords: ''
|
|
78
88
|
});
|
|
79
|
-
|
|
80
|
-
handleSearch();
|
|
89
|
+
setSearchWhenClear(false);
|
|
81
90
|
}
|
|
82
91
|
};
|
|
83
92
|
|
|
84
|
-
var
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
var changeValue = function changeValue(e) {
|
|
90
|
-
return setKeyword(e.target.value);
|
|
91
|
-
};
|
|
93
|
+
var handleSearchClick = function handleSearchClick() {
|
|
94
|
+
setActivated(true);
|
|
95
|
+
focus();
|
|
92
96
|
|
|
93
|
-
|
|
94
|
-
if (e.keyCode === 13) {
|
|
97
|
+
if (activated && keyword || searchWhenClear) {
|
|
95
98
|
handleSearch();
|
|
96
99
|
}
|
|
97
100
|
};
|
|
98
101
|
|
|
99
|
-
var
|
|
100
|
-
|
|
102
|
+
var onBlurHandler = function onBlurHandler() {
|
|
103
|
+
if (keyword.length) return;
|
|
104
|
+
clearTimeout(timerRef.current);
|
|
105
|
+
timerRef.current = setTimeout(function () {
|
|
106
|
+
setActivated(false);
|
|
107
|
+
}, 300);
|
|
108
|
+
};
|
|
101
109
|
|
|
102
|
-
|
|
103
|
-
|
|
110
|
+
var onChangeHandler = function onChangeHandler(e) {
|
|
111
|
+
return setKeyword(e.target.value);
|
|
112
|
+
};
|
|
104
113
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
});
|
|
109
|
-
setSearched(false);
|
|
110
|
-
}
|
|
114
|
+
var onKeyDownHandler = function onKeyDownHandler(e) {
|
|
115
|
+
if (e.keyCode !== 13) return;
|
|
116
|
+
handleSearch();
|
|
111
117
|
};
|
|
112
118
|
|
|
113
119
|
(0, _react.useEffect)(function () {
|
|
114
120
|
setKeyword(value);
|
|
115
|
-
|
|
116
|
-
|
|
121
|
+
setActivated(!!value);
|
|
122
|
+
return function () {
|
|
123
|
+
return clearTimeout(timerRef.current);
|
|
124
|
+
};
|
|
125
|
+
}, []);
|
|
117
126
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
118
|
-
className: (0, _classnames3["default"])(precls, _defineProperty({}, "".concat(precls, "--
|
|
127
|
+
className: (0, _classnames3["default"])(precls, _defineProperty({}, "".concat(precls, "--activated"), activated))
|
|
119
128
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
120
129
|
className: "".concat(precls, "__input")
|
|
121
130
|
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
122
|
-
onBlur:
|
|
123
|
-
onChange:
|
|
124
|
-
onKeyUp:
|
|
125
|
-
placeholder:
|
|
131
|
+
onBlur: onBlurHandler,
|
|
132
|
+
onChange: onChangeHandler,
|
|
133
|
+
onKeyUp: onKeyDownHandler,
|
|
134
|
+
placeholder: placeholder,
|
|
126
135
|
ref: inputRef,
|
|
127
136
|
value: keyword
|
|
128
137
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
129
138
|
className: (0, _classnames3["default"])('tu-icon-cross', "".concat(precls, "__del-icon"), _defineProperty({}, "".concat(precls, "__del-icon--visible"), !!keyword)),
|
|
130
|
-
onClick:
|
|
139
|
+
onClick: handleClearKeyword
|
|
131
140
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
132
141
|
className: (0, _classnames3["default"])('tu-icon-search', "".concat(precls, "__search-icon")),
|
|
133
142
|
onClick: handleSearchClick
|
|
@@ -48,7 +48,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
48
48
|
function SurveyMenus(props) {
|
|
49
49
|
var _props$onSelect = props.onSelect,
|
|
50
50
|
onSelect = _props$onSelect === void 0 ? function () {} : _props$onSelect,
|
|
51
|
-
history = props.history
|
|
51
|
+
history = props.history,
|
|
52
|
+
_props$defaultMenus = props.defaultMenus,
|
|
53
|
+
defaultMenus = _props$defaultMenus === void 0 ? [] : _props$defaultMenus;
|
|
52
54
|
|
|
53
55
|
var _useState = (0, _react.useState)({}),
|
|
54
56
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -108,7 +110,8 @@ function SurveyMenus(props) {
|
|
|
108
110
|
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_surveyFrontMenus["default"], {
|
|
109
111
|
ref: surveyFrontMenu,
|
|
110
112
|
onSelect: onSelect,
|
|
111
|
-
history: history
|
|
113
|
+
history: history,
|
|
114
|
+
defaultMenus: defaultMenus
|
|
112
115
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
113
116
|
className: (0, _classnames["default"])("tita-bootstrap__scrollbar")
|
|
114
117
|
}))));
|
|
@@ -29,14 +29,19 @@ var surveyMenus = /*#__PURE__*/function () {
|
|
|
29
29
|
function surveyMenus(props) {
|
|
30
30
|
_classCallCheck(this, surveyMenus);
|
|
31
31
|
|
|
32
|
-
this.menus = [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
// this.menus = [
|
|
33
|
+
// {
|
|
34
|
+
// icon: 'survey-involved',
|
|
35
|
+
// label: '活跃度统计',
|
|
36
|
+
// key: PAGE_SURVEY_MY_INVOLVED,
|
|
37
|
+
// type: MENU_ITEM_NOE,
|
|
38
|
+
// href: '#/skynet-dashboard',
|
|
39
|
+
// isShow: true,
|
|
40
|
+
// },
|
|
41
|
+
// ]
|
|
42
|
+
var _props$defaultMenus = props.defaultMenus,
|
|
43
|
+
defaultMenus = _props$defaultMenus === void 0 ? [] : _props$defaultMenus;
|
|
44
|
+
this.menus = defaultMenus;
|
|
40
45
|
}
|
|
41
46
|
|
|
42
47
|
_createClass(surveyMenus, [{
|
|
@@ -19,8 +19,6 @@ var _menus = _interopRequireWildcard(require("./menus"));
|
|
|
19
19
|
|
|
20
20
|
var _menuHighlight = _interopRequireDefault(require("./menu-highlight"));
|
|
21
21
|
|
|
22
|
-
var _auth = require("../../../../utils/auth");
|
|
23
|
-
|
|
24
22
|
require("../../index.css");
|
|
25
23
|
|
|
26
24
|
require("./index.css");
|
|
@@ -48,9 +46,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
48
46
|
var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
49
47
|
var _props$onSelect = props.onSelect,
|
|
50
48
|
onSelect = _props$onSelect === void 0 ? function () {} : _props$onSelect,
|
|
51
|
-
history = props.history
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
history = props.history,
|
|
50
|
+
_props$defaultMenus = props.defaultMenus,
|
|
51
|
+
defaultMenus = _props$defaultMenus === void 0 ? [] : _props$defaultMenus;
|
|
54
52
|
|
|
55
53
|
var _useState = (0, _react.useState)(function () {
|
|
56
54
|
return document.body.offsetHeight - 198;
|
|
@@ -77,7 +75,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
77
75
|
|
|
78
76
|
var _useState7 = (0, _react.useState)(function () {
|
|
79
77
|
surveyMenusData.current = new _menus["default"]({
|
|
80
|
-
|
|
78
|
+
defaultMenus: defaultMenus
|
|
81
79
|
});
|
|
82
80
|
return surveyMenusData.current.getMenus();
|
|
83
81
|
}),
|
|
@@ -93,22 +91,24 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
93
91
|
});
|
|
94
92
|
var pathname = history.location.pathname;
|
|
95
93
|
var firstMenuHref = menus[0].data.href;
|
|
96
|
-
if (firstMenuHref.split('#')[1] === pathname) return;
|
|
94
|
+
if (firstMenuHref.split('#')[1] === pathname) return; // 当前路由与二级菜单第一项相同时直接return
|
|
97
95
|
|
|
98
96
|
var menusHrefArr = ['/survey/manage', '/survey/my-involved'];
|
|
99
97
|
var isIncludeMenu = menusHrefArr.find(function (item) {
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
return (// 表示当前路由是否是左侧二级菜单的选项
|
|
99
|
+
item.includes(pathname)
|
|
100
|
+
);
|
|
102
101
|
});
|
|
103
|
-
if (!isIncludeMenu) return;
|
|
102
|
+
if (!isIncludeMenu) return; // 如果不是二级菜单选项直接return
|
|
104
103
|
|
|
105
104
|
var isShowMenuItem = menus.find(function (item) {
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
return (// 判断当前路由是否有权限被展示
|
|
106
|
+
item.data.href.split('#')[1].includes(pathname)
|
|
107
|
+
);
|
|
108
108
|
});
|
|
109
109
|
|
|
110
110
|
if (!isShowMenuItem) {
|
|
111
|
-
|
|
111
|
+
// 如果当前路由没有权限展示的话,则跳转到有权限二级路由的第一项
|
|
112
112
|
window.location.href = firstMenuHref;
|
|
113
113
|
}
|
|
114
114
|
}, [history.location.pathname, history.location.search]);
|
|
@@ -122,9 +122,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
122
122
|
var node = _ref.node;
|
|
123
123
|
onSelect(node); // 处理菜单选中
|
|
124
124
|
|
|
125
|
-
if (!selectedKyes.length) {
|
|
126
|
-
return;
|
|
127
|
-
} else {
|
|
125
|
+
if (!selectedKyes.length) {} else {
|
|
128
126
|
setSelectedMenuKeys(selectedKyes);
|
|
129
127
|
}
|
|
130
128
|
};
|
|
@@ -89,7 +89,7 @@ function _default(props) {
|
|
|
89
89
|
name: "doing"
|
|
90
90
|
}, (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress")), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
|
|
91
91
|
name: "finish"
|
|
92
|
-
}, (0, _getLocale.getLocale)("
|
|
92
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_E_From_Completed")), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
|
|
93
93
|
name: "delay"
|
|
94
94
|
}, (0, _getLocale.getLocale)("OKR_MyO_E_From_Delayed")), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
|
|
95
95
|
name: "cancel"
|
|
@@ -269,9 +269,8 @@ var ReviewBody = /*#__PURE__*/function (_PureComponent) {
|
|
|
269
269
|
};
|
|
270
270
|
|
|
271
271
|
_this._handlerStandardModeProblemChange = function (value) {
|
|
272
|
-
var data = _objectSpread({}, _this.state.data);
|
|
272
|
+
var data = _objectSpread({}, _this.state.data); // console.log(htmlEncodeByRegExp(value))
|
|
273
273
|
|
|
274
|
-
console.log((0, _mblog.htmlEncodeByRegExp)(value));
|
|
275
274
|
|
|
276
275
|
_this._updateReviewData(data, "Drawback", value);
|
|
277
276
|
};
|
|
@@ -603,8 +602,8 @@ var ReviewBody = /*#__PURE__*/function (_PureComponent) {
|
|
|
603
602
|
var screenHeight = window.screen.height;
|
|
604
603
|
var _this$props2 = this.props,
|
|
605
604
|
ObjData = _this$props2.ObjData,
|
|
606
|
-
EditType = _this$props2.EditType;
|
|
607
|
-
|
|
605
|
+
EditType = _this$props2.EditType; // console.log(ObjData);
|
|
606
|
+
|
|
608
607
|
var _this$state = this.state,
|
|
609
608
|
data = _this$state.data,
|
|
610
609
|
popContainer = _this$state.popContainer;
|
|
@@ -61,7 +61,7 @@ var ReviewItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
61
61
|
editReview = _this$props.editReview,
|
|
62
62
|
reviewItemData = _this$props.reviewItemData,
|
|
63
63
|
editAble = _this$props.editAble;
|
|
64
|
-
var href = "".concat(location.pathname, "#okr/reviewDetail?okrId=8077&back=
|
|
64
|
+
var href = "".concat(location.pathname, "#okr/reviewDetail?okrId=8077&back=''&replayId=").concat(reviewItemData.replayId, "&feedId=").concat(feedId, "&krIndex=").concat(krIndex, "&editAble=").concat(editAble);
|
|
65
65
|
return /*#__PURE__*/_react["default"].createElement(_style.ReviewItemContainer, {
|
|
66
66
|
className: className,
|
|
67
67
|
mode: isCompactMode ? 0 : 1
|
|
@@ -210,7 +210,7 @@ var Review = /*#__PURE__*/function (_PureComponent) {
|
|
|
210
210
|
mode: isCompactMode ? 0 : 1
|
|
211
211
|
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("OKR_MyO_KRP_Pop_Understandt"))))) : /*#__PURE__*/_react["default"].createElement(_style.ReviewList, null, reviewList.map(function (item, index) {
|
|
212
212
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
|
|
213
|
-
key:
|
|
213
|
+
key: feedId
|
|
214
214
|
}, /*#__PURE__*/_react["default"].createElement(_ReviewItem["default"], {
|
|
215
215
|
isCompactMode: isCompactMode,
|
|
216
216
|
feedId: feedId,
|
|
@@ -80,8 +80,6 @@ function PeriodSelector(_ref) {
|
|
|
80
80
|
buttonClass = _ref$buttonClass === void 0 ? '' : _ref$buttonClass,
|
|
81
81
|
_ref$noBorder = _ref.noBorder,
|
|
82
82
|
noBorder = _ref$noBorder === void 0 ? false : _ref$noBorder,
|
|
83
|
-
_ref$needInitPeriod = _ref.needInitPeriod,
|
|
84
|
-
needInitPeriod = _ref$needInitPeriod === void 0 ? true : _ref$needInitPeriod,
|
|
85
83
|
onPopupVisibleChange = _ref.onPopupVisibleChange;
|
|
86
84
|
|
|
87
85
|
var _useState = (0, _react.useState)({
|
|
@@ -148,7 +146,7 @@ function PeriodSelector(_ref) {
|
|
|
148
146
|
});
|
|
149
147
|
} else if (selected) {
|
|
150
148
|
setSelectedPeriod(selected);
|
|
151
|
-
} else
|
|
149
|
+
} else {
|
|
152
150
|
setSelectedPeriod((0, _common.getDefalutCycle)(cycleSetting));
|
|
153
151
|
onChange === null || onChange === void 0 ? void 0 : onChange((0, _common.getDefalutCycle)(cycleSetting));
|
|
154
152
|
}
|
|
@@ -51,8 +51,8 @@ var SearchInput = function SearchInput(props) {
|
|
|
51
51
|
|
|
52
52
|
var _useState = (0, _react.useState)(false),
|
|
53
53
|
_useState2 = _slicedToArray(_useState, 2),
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
searchWhenClear = _useState2[0],
|
|
55
|
+
setSearchWhenClear = _useState2[1];
|
|
56
56
|
|
|
57
57
|
var _useState3 = (0, _react.useState)(''),
|
|
58
58
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
@@ -77,8 +77,9 @@ var SearchInput = function SearchInput(props) {
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
var handleSearch = function handleSearch() {
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
var searchKey = value === null || value === void 0 ? void 0 : value.trim();
|
|
81
|
+
setSearchWhenClear(!!searchKey);
|
|
82
|
+
onSearch === null || onSearch === void 0 ? void 0 : onSearch(searchKey);
|
|
82
83
|
};
|
|
83
84
|
|
|
84
85
|
var handleKeyPress = function handleKeyPress(e) {
|
|
@@ -92,7 +93,7 @@ var SearchInput = function SearchInput(props) {
|
|
|
92
93
|
setSearchKey === null || setSearchKey === void 0 ? void 0 : setSearchKey('');
|
|
93
94
|
inputRef.current.focus();
|
|
94
95
|
|
|
95
|
-
if (propsValue ||
|
|
96
|
+
if (propsValue || searchWhenClear) {
|
|
96
97
|
onSearch === null || onSearch === void 0 ? void 0 : onSearch('');
|
|
97
98
|
}
|
|
98
99
|
};
|
|
@@ -11,8 +11,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _i18nFrontTranslate = require("../../utils/i18n-front-translate");
|
|
13
13
|
|
|
14
|
-
var _mblog = require("../../utils/mblog");
|
|
15
|
-
|
|
16
14
|
var _style = require("./style");
|
|
17
15
|
|
|
18
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); }
|
|
@@ -149,7 +147,6 @@ var TextareaView = /*#__PURE__*/function (_PureComponent) {
|
|
|
149
147
|
isFocus = _this$state.isFocus,
|
|
150
148
|
isHasPlaceholder = _this$state.isHasPlaceholder;
|
|
151
149
|
var valueLen = value.length;
|
|
152
|
-
console.log(123, (0, _mblog.htmlDecodeByRegExp)(value));
|
|
153
150
|
return /*#__PURE__*/_react["default"].createElement(_style.TextareaWrapper, {
|
|
154
151
|
className: className,
|
|
155
152
|
style: style
|