Skip to content

select 下拉框设置多选,提示“应当是预设定的枚举值之一” #373

@w582745483

Description

@w582745483

反馈问题请先查看文档和务必提供详细的复现代码,遵循如下格式,描述不清楚的问题将会直接关闭。

vue和ui框架

vue3、ui框架elementPlus、vjsf "@lljj/vue3-form-element": "^1.19.0",

问题描述

让el-select 设置为多选时,选中下拉框,或者初始化时给下拉框的v-model设置初始值为数组(为enum中的值),会报错“应当是预设定的枚举值之一”

如何复现

可以详细介绍你的复现场景或者相关代码。

必要时提供复现demo,如codepen,github 复现仓库,playground分享链接等
https://form.lljj.me/v3/#/demo?ui=VueElementForm&type=Test&schema={%22title%22:%22%E6%B5%8B%E8%AF%95%E6%B3%A8%E5%86%8C%E8%A1%A8%E5%8D%95%22,%22description%22:%22A+simple+form+example.%22,%22type%22:%22object%22,%22properties%22:{%22numberEnum%22:{%22title%22:%22Number+enum+(select)%22,%22enum%22:[1,2,3],%22enumNames%22:[%22Select+-+1%22,%22Select+-+2%22,%22Select+-+3%22],%22ui:options%22:{%22multiple%22:true}}}}&formData={%22numberEnum%22:[3,2]}&uiSchema={}&errorSchema={}&formFooter={%22show%22:true}&formProps={%22inline%22:false,%22labelPosition%22:%22top%22,%22inlineFooter%22:false,%22layoutColumn%22:1,%22labelWidth%22:%22100px%22}

期望的结果

不要报错“应当是预设定的枚举值之一”

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions