Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在CRUD的columns中使用了type为list的组件,但显示出来的数据是乱码 #11492

Open
aihuoye opened this issue Jan 11, 2025 · 1 comment

Comments

@aihuoye
Copy link

aihuoye commented Jan 11, 2025

实现场景:

请简单描述你想要实现的原始场景,例如:我想要实现xxx的功能...
想要在CRUD的columns中使用了type为list的组件

存在的问题:

请简单描述你现在遇到的不符合预期的问题...
Clipboard_Screenshot_1736618996
如图所示,后台接口返回的数据为:
"thought_data": [
{
"thought_title": "思考",
"thought_content": "需要获取巴黎明天的天气信息。",
},
{
"thought_title": "天气/GetWeatherInfo",
"thought_content": "{"Code":8000999,"Msg":"工具调用失败。","Data":null}",
},
......
],
在CRUD中显示出来的效果,是把像双引号显示为&quot,将\显示为/
看起来很乱,求解决方案

当前方案:

请粘贴你当前方案的完整 amis schema 代码...

            "columns": [
                {
                    "type": "list",
                    "name": "thought_data",
                    "label": "思考过程",
                    "listItem": {
                        "title": "${thought_title}",
                        "subTitle": "${thought_content}"
                    }
                }
            ]
@lhtuling
Copy link

变量加个过滤器就行了
|raw

https://aisuda.bce.baidu.com/amis/zh-CN/docs/concepts/data-mapping#raw

Amis低代码前端框架交流群【QQ 1群】:717791727
Amis低代码前端框架交流群【QQ 2群】:721182449

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants