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: 5.0 form Divider设置orientation属性没有用 #5410

Closed
5 tasks done
nbzhugq opened this issue Jan 16, 2025 · 3 comments
Closed
5 tasks done

Bug: 5.0 form Divider设置orientation属性没有用 #5410

nbzhugq opened this issue Jan 16, 2025 · 3 comments

Comments

@nbzhugq
Copy link

nbzhugq commented Jan 16, 2025

Version

Vben Admin V5

Describe the bug?

{
  fieldName: 'divider-api-select',
  component: 'Divider',
  componentProps: {
    orientation:'center',
  },
  label: '远程下拉演示',
  formItemClass: 'col-span-3',
}

这样设置了orientation属性后不生效,分割线标题一直显示在最左侧

Reproduction

{
  fieldName: 'divider-api-select',
  component: 'Divider',
  componentProps: {
    orientation:'center',
  },
  label: '远程下拉演示',
  formItemClass: 'col-span-3',
}

这样设置了orientation属性后不生效,分割线标题一直显示在最左侧

System Info

5.0  web-antd

Relevant log output

No response

Validations

@mynetfan
Copy link
Collaborator

mynetfan commented Jan 16, 2025

orientation指的是分割线标题的位置,不是分割线的位置,跟label无关

@mynetfan
Copy link
Collaborator

    {
      component: 'Divider',
      componentProps: {
        dashed: true,
        orientation: 'center',  // 让分割线的标题显示在中间
      },
      fieldName: 'divider-api-select',
      formItemClass: 'col-span-3',
      hideLabel: true,  // 隐藏表单的Label
      renderComponentContent: () => {
        return {
          default: () => '分割线',   // 这是分割线的标题
        };
      },
    },

@nbzhugq
Copy link
Author

nbzhugq commented Jan 16, 2025

3Q,刚开始写5.0版本,还不太熟悉,好像以前2.0版本不需要这样写。

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