I want to realize input selected

I want to realize input selected

zlz9527zlz9527 Posts: 12Questions: 1Answers: 0

fields: [ {
label:"课件标题",
name:"title"
},{
label:"课件封面",
name:"imgUrl",
type:"upload"
},{
label:"课件地址",
name:"resourceUrl"
},{
label:"课件介绍",
name:"introDetail"
},{
label:"课件分类",
name:"resourceType",
type:"select",
value:["视频","音频","图文"]
},{
label:"是否有效",
name:"isValid",
type:"select"
},{
label:"主讲人",
name:"speaker"
}]
I can see the input select in the page,but I don't know how to set value in option.The input select is empty!

Replies

  • PaulusPaulus Posts: 69Questions: 17Answers: 5

    If for instance the values of resourceType are not the same as the labels, then set the values also like

    {
        "label": "课件分类:",
        "name": "resourceType",
        "type": "select",
        "options": [
            { label: "视频", value: 0 },
            { label: "音频", value: 1 },
            { label: "图文", value: 2 }
        ]
    },
    

    The values must be the data displayed in the table with the resourceType field.

  • zlz9527zlz9527 Posts: 12Questions: 1Answers: 0

    Thank you very much !! I relized my requirement.

This discussion has been closed.