ant-design / pro-components

🏆 Use Ant Design like a Pro!
https://pro-components.antdigital.dev
MIT License
4.26k stars 1.35k forks source link

ProFormColorPicker在ModalForm里作为ProTable的Action构建后出错显示require is not defined🐛[BUG] #8094

Open RadiumScriptTang opened 8 months ago

RadiumScriptTang commented 8 months ago

🐛 bug 描述

代码如下,dev模式下可以正常运行,但build上线之后出问题

<ProTable
            search={false}
            actionRef={tableRef}
            columns={columns}
            toolBarRender={() => [
                <ModalForm
                    title="创建标签"
                    trigger={<Button type="primary">创建标签</Button>}
                >
                    <ProFormText name="name" label="标签名称" />
                    <ProFormColorPicker name="color" label="颜色" />
                </ModalForm>
            ]}
        />

已经改用Form.Item + ColorPicker 做了替补,忘了截图了。但应该可以复现出来。 版本大约是 "@ant-design/pro-components": "^2.6.43", "antd": "^5.11.5",

RadiumScriptTang commented 8 months ago

image

bitbw commented 8 months ago

me too

 "@ant-design/pro-components": "^2.6.43"
  "antd": "5.11.0"

image