无法显示列表选择

问题描述

我正在开发一个操作,我想在其中显示要使用 import React,{useEffect} from 'react'; import { Link } from 'react-router-dom'; import { connect } from 'react-redux'; import {topicActions,userActions} from '../../../actions'; import NavBar from '../../NavBar/NavBar'; import TopicCard from "../../ContentCard/TopicCard/TopicCard"; class KeyboardPage extends React.Component { componentDidMount() { this.props.getTopics(2); } handleUserByID(user_id){ return this.props.getUser(user_id); } render() { const { topics } = this.props; const { user,users} = this.props; //console.log(this.props.getUser(1)) *Works but gets called multiple times and returns the correct user object console.log(this.handleUserByID(1)); * Doesnt work; return ( <div className="container"> <NavBar loggedinAs={user.user_name}/> <h1>Gruppe 1 - Webforum</h1> <h3>Topics :</h3> {topics.loading && <em>Loading topics...</em>} {topics.error && <span className="text-danger">ERROR: {topics.error}</span>} {topics.items && users.items && <ul type='none' > {topics.items.map((topic,index) => <li key={topic.topic_id}> <p/> <a href={"/" + topic.topic_id} style={{ textdecoration: 'none' }}> <TopicCard topicSubject={topic.topic_subject} topicDate={topic.topic_date} topicBy={this.handleUserByID(topic.topic_by).user_name}/> </a> </li> )} </ul> } </div> ); } } function mapState(state) { const {topics } = state; const { users,authentication } = state; const { user,} = authentication; return { user,users,topics}; } const actionCreators = { getTopics: topicActions.getAllbyID,getUser: userActions.getById } const connectedKeyboardPage = connect(mapState,actionCreators)(KeyboardPage); export { connectedKeyboardPage as KeyboardPage }; 选择的项目列表,但助手引发以下错误

List

这是我的Unexpected internal error id=83ef0935-3d8f-473d-9e66-f96c886cd4cd.

Scene

我创建了一个名为 Scene 的空 Typeprompt_option 如下:

webhookResponse

我不知道我做错了什么。有什么建议吗?谢谢!

解决方法

虽然该属性明确定义为可选,但类型覆盖的显示属性需要图像。

{
  "name": "ITEM_1","synonyms": [
    "Item 1","Primer item"
  ],"display": {
    "title": "Artículo 1","description": "Descripción del artículo 1","image": IMAGE_REQUIRED
  }
}
,

Chad 对正确答案的补充:您不需要提供图片网址,但 Action 必须提供结构。因此,如果您的列表项中没有图片,您只需将 url 属性留空即可:

{
    "name": "ITEM_1","synonyms": [
        "Item 1","Primer item"
    ],"display": {
        "title": "Artículo 1","image": {
            "url": ""
        }
    }
}

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...