提交pnpm-lock.yaml文件,问答助手反馈弹窗再次弹出时,清空之前填写的内容
This commit is contained in:
+1
-1
@@ -48,7 +48,7 @@ yarn.lock
|
||||
.yarnrc.yml
|
||||
|
||||
# pmpm
|
||||
pnpm-lock.yaml
|
||||
# pnpm-lock.yaml
|
||||
|
||||
# info
|
||||
keys.ts
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Modal, Checkbox, Input, message } from 'antd';
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
@@ -16,6 +16,12 @@ const FeedbackModal: React.FC<FeedbackModalProps> = ({ open, onOk, onCancel }) =
|
||||
const { t } = useTranslation()
|
||||
const [confirmLoading, setConfirmLoading] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (open) {
|
||||
setFeedbackText('');
|
||||
}
|
||||
}, [open]);
|
||||
|
||||
const handleOk = async () => {
|
||||
if (!feedbackText) {
|
||||
message.warning('请填写反馈建议');
|
||||
|
||||
Generated
+10466
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user