diff --git a/src/components/FeedBackModel/index.tsx b/src/components/FeedBackModel/index.tsx index bc004c8..f0009c0 100644 --- a/src/components/FeedBackModel/index.tsx +++ b/src/components/FeedBackModel/index.tsx @@ -13,36 +13,42 @@ const FeedBackModel = forwardRef((_props: any, ref: any) => { const [feedBackForm, setFeedBackForm] = useState({ rateValue: 0, otherContent: '', - type: 0, }); - const [feedBackList, _setFeedBackList] = useState([ + const [feedBackList, setFeedBackList] = useState([ { text: "软件卡顿", - value: 2 + value: 2, + active: false, }, { text: "设计不合理", - value: 3 + value: 3, + active: false, }, { text: "功能太少", - value: 4 + value: 4, + active: false, }, { text: "通话不流畅", - value: 5 + value: 5, + active: false, }, { text: "视频卡顿", - value: 6 + value: 6, + active: false, }, { text: "操作麻烦", - value: 7 + value: 7, + active: false, }, { text: "其他,需要手动填写", - value: 1 + value: 1, + active: false, }, ]); return ( @@ -75,11 +81,10 @@ const FeedBackModel = forwardRef((_props: any, ref: any) => { { feedBackList.map((item, index) => { return ( -
{ - setFeedBackForm({ - ...feedBackForm, - type: item.value - }) +
{ + const feedBackListTemp = [...feedBackList] + feedBackListTemp[index].active = !feedBackListTemp[index].active + setFeedBackList(feedBackListTemp) }}> {item.text}
@@ -88,7 +93,7 @@ const FeedBackModel = forwardRef((_props: any, ref: any) => { }
-
+