alibaba / ChatUI

The UI design language and React library for Conversational UI
https://chatui.io
MIT License
2.61k stars 277 forks source link

点赞点踩功能可以无限次点击 #138

Open WoodenGirl opened 5 months ago

WoodenGirl commented 5 months ago

Version information (版本信息)

Describe the bug (描述问题) 每个回答的点赞点踩功能可以无限次点击

Steps To Reproduce (重现步骤)

  1. 显示点赞功能 return { _id: res.data.id, type: 'card', content: { code: 'knowledge', data: { text: res.data.answer } }, meta: { evaluable: true, // 是否展示点赞点踩按钮 } } 2.配置显示交互 feedback: { // 点赞后出的文本 textOfGood: '感谢您的评价,我们会继续努力的哦!', // 点踩后出的文本 textOfBad: '很抱歉,给您带来不好的体验,我会继续学习,下次为您提供更好的服务。', // 点踩后是否显示反馈表单 needFeedback: false, // 不满意原因列表 options: [ { value: '我没有得到我想要的答案', }, { value: '界面太难用了', }, { value: '我不认可这个规则', }, ], // 原因是否必选 isReasonRequired: true, // 提交反馈后出的文本 textAfterSubmit: '', }, 3.点赞点踩的请求配置 //点赞点踩接口(可选) evaluate(data) { return { url: 'http://localhost:1234/faq/dialog/evaluate', data: { msgId: data.msgId, evaluateType: data.type, }, }; },

Link to minimal reproduction (最小化重现链接)

Expected behavior (期望的结果是什么) 每个回答的点赞点踩功能点击一次后无法再点击

WoodenGirl commented 5 months ago

image