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

Bug: Form ApiTreeSelect组件校验 选中后其他必选表单显示红色提示XXX必填 #5605

Open
5 tasks done
bulingbulingbuling opened this issue Feb 25, 2025 · 2 comments

Comments

@bulingbulingbuling
Copy link

Version

Vben Admin V5

Describe the bug?

代码

{
    component: 'ApiTreeSelect',
    // 对应组件的参数
    componentProps: {
      // 菜单接口
      api: getRegion,
      // 菜单接口转options格式
      labelField: 'caption',
      valueField: 'code',
      childrenField: 'children',
      placeholder: `请选择${formField('regionCode')}`,
    },
    // 字段名
    defaultValue: '',
    fieldName: 'regionCode',
    formItemClass: 'col-span-2',
    // 界面显示的label
    label: `${formField('regionCode')}`,
    rules: 'required',
  },

选中后表单表现为

Image

Reproduction

所提供的信息足以理解问题

System Info

System:
    OS: macOS 14.1
    CPU: (8) arm64 Apple M2
    Memory: 56.03 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 23.1.0 - ~/.nvm/versions/node/v23.1.0/bin/node
    npm: 10.9.0 - ~/.nvm/versions/node/v23.1.0/bin/npm
    pnpm: 9.15.3 - ~/.nvm/versions/node/v23.1.0/bin/pnpm
  Browsers:
    Chrome: 133.0.6943.127
    Safari: 17.1

Relevant log output

Validations

@mynetfan
Copy link
Collaborator

你描述的问题在当前最新的Demo中未能重现。请补充更多细节,或者在Demo中测试具体重现方法。

Copy link

Hello @bulingbulingbuling. Please provide the complete reproduction steps and code. Issues labeled by needs reproduction will be closed if no activities in 3 days.

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

No branches or pull requests

2 participants