@titaui/pc 1.9.23 → 1.9.24

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.
@@ -97,7 +97,17 @@ var OScore = function OScore(props) {
97
97
  setVisible(false);
98
98
  };
99
99
 
100
+ var checkForm = function checkForm() {
101
+ // @ts-ignore
102
+ var errors = formRef.current.verifing({
103
+ onlyFirstError: true
104
+ });
105
+ if (errors.length) return false;
106
+ return true;
107
+ };
108
+
100
109
  var handleOk = function handleOk() {
110
+ if (!checkForm()) return;
101
111
  (0, _requestApis.updateOScore)(formFiedlsValue.score, okrId).then(function (res) {
102
112
  if (!!res.Code) {
103
113
  _toast["default"].Success("".concat((0, _getLocale.getLocale)("OKR_MyO_Ew_Success")));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.9.23",
3
+ "version": "1.9.24",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "src/index.js",
@@ -43,7 +43,15 @@ const OScore = (props: IOScoreProps) => {
43
43
  setVisible(false);
44
44
  };
45
45
 
46
+ const checkForm = () => {
47
+ // @ts-ignore
48
+ const errors = formRef.current.verifing({ onlyFirstError: true });
49
+ if (errors.length) return false;
50
+ return true;
51
+ };
52
+
46
53
  const handleOk = () => {
54
+ if (!checkForm()) return;
47
55
  updateOScore(formFiedlsValue.score, okrId)
48
56
  .then((res) => {
49
57
  if (!!res.Code) {