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]ProFormColorPicker onChange 类型错误 是AggregationColor #8740

Open
xu756 opened this issue Sep 24, 2024 · 0 comments
Open

🐛[BUG]ProFormColorPicker onChange 类型错误 是AggregationColor #8740

xu756 opened this issue Sep 24, 2024 · 0 comments

Comments

@xu756
Copy link

xu756 commented Sep 24, 2024

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🐛 bug 描述

ProFormColorPicker onChange 类型错误

image

📷 复现步骤

image

🏞 期望结果

💻 复现代码

 <ProFormColorPicker
              name={['background', 'color']}
              layout="vertical"
              fieldProps={{
                // @ts-ignore
                disabledAlpha: true,
                // @ts-ignore
                onChange: (color: AggregationColor) => {
                  // setBackgroundColor(color.toHexString());
                  // console.log(color.toHexString());
                  // console.log(background.color);
                  form.setFieldsValue({
                    background: {
                      use: 'color',
                      image: [],
                      color: color.toHexString(),
                    },
                  });
                },
              }}
            />

© 版本信息

  • ProComponents 版本: [e.g. 4.0.0]
  • umi 版本
  • 浏览器环境
  • 开发环境 [e.g. mac OS]

🚑 其他信息

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

No branches or pull requests

1 participant