文档:CSVLink 如果有引号,后面的一列就会到...
链接:http://note.youdao.com/noteshare?id=9a64aee2d6a52995640e334be60a35fb
<CSVLink
style={{textDecoration:"unset"}}
data={data.csvData}>Download me
CSVLink 如果有引号,后面的一列就会到前面来,请问这个怎么办呀
代码 直接在前端写引号不会复现这个 需要在数据库写引号,然后前端用fetch拿数据
react-demo: react demo # Getting Started with Create React App
https://gitee.com/starplatinum111/react-demo
@Resource
TenantService tenantService;
@PostMapping(value = "/tenantServiceList")
public Object tenantServiceList(@RequestBody ExamPaperAnswer examPaperAnswer) {
// D:\proj\springBoot\xzs-mysql\source\vue\xzs-admin\src\views\exam\paper\Statistics.vue
List list = tenantService.list();
log.info("list {}",list);
return RestResponse.ok(list);
//
}
useEffect( () => {
let url = "http://localhost:8003/api/all/tenantServiceList";
// fetch(url, {}).then(res=>{
// console.log(res);
// })
postData(url, { answer: 42 })
.then(res => {
console.log(res); // JSON data parsed by `data.json()` call
setData({csvData:res.response})
// dataRef.csvData=res.response;
});
},[]);
请看图片
文档:CSVLink 如果有引号,后面的一列就会到...
链接:http://note.youdao.com/noteshare?id=9a64aee2d6a52995640e334be60a35fb