微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

无法显示列表选择

如何解决无法显示列表选择

我正在开发一个操作,我想在其中显示要使用 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": ""
        }
    }
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。