x-star-design 0.0.52 → 0.0.53
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/dist/feedback/index.js +5 -4
- package/package.json +1 -1
package/dist/feedback/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
3
3
|
import { CoffeeOutlined, DislikeFilled, DislikeOutlined, LikeFilled, LikeOutlined } from '@ant-design/icons';
|
|
4
4
|
import { Button, Checkbox, Col, Form, Input, Popover, Radio, Row, Space, Typography } from 'antd';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
|
-
import React, { useRef, useState } from 'react';
|
|
6
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
7
7
|
import ConfigProviderWrapper from "../config-provider-wrapper";
|
|
8
8
|
import { useLocale } from "../locales";
|
|
9
9
|
import { prefix } from "../utils/global";
|
|
@@ -43,6 +43,9 @@ var Feedback = function Feedback(_ref) {
|
|
|
43
43
|
return feedbackListBad;
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
+
useEffect(function () {
|
|
47
|
+
form.setFieldsValue(_defineProperty({}, "".concat(feedbackTypeKey), undefined));
|
|
48
|
+
}, [choiceType]);
|
|
46
49
|
var submittedContent = function submittedContent() {
|
|
47
50
|
return /*#__PURE__*/React.createElement(Space, {
|
|
48
51
|
direction: "vertical",
|
|
@@ -151,9 +154,6 @@ var Feedback = function Feedback(_ref) {
|
|
|
151
154
|
}))))), /*#__PURE__*/React.createElement(Form.Item, {
|
|
152
155
|
name: feedbackTextAreaKey,
|
|
153
156
|
rules: [{
|
|
154
|
-
required: true,
|
|
155
|
-
message: t('FEEDBACK_MESSAGE_3')
|
|
156
|
-
}, {
|
|
157
157
|
validator: function validator(_, value) {
|
|
158
158
|
//空格字符串校验
|
|
159
159
|
if (/^\s+$/g.test(value)) {
|
|
@@ -207,6 +207,7 @@ var Feedback = function Feedback(_ref) {
|
|
|
207
207
|
setOpen(true);
|
|
208
208
|
} else {
|
|
209
209
|
form.resetFields();
|
|
210
|
+
setChoiceType(undefined);
|
|
210
211
|
setOpen(false);
|
|
211
212
|
}
|
|
212
213
|
},
|