diff --git a/packages/design/src/form/__tests__/__snapshots__/index.test.tsx.snap b/packages/design/src/form/__tests__/__snapshots__/index.test.tsx.snap
index dbaace938..0a9f79483 100644
--- a/packages/design/src/form/__tests__/__snapshots__/index.test.tsx.snap
+++ b/packages/design/src/form/__tests__/__snapshots__/index.test.tsx.snap
@@ -1,5 +1,91 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
+exports[`Drawer Form hideRequiredMark should be priority over ConfigProvider form.requiredMark 1`] = `
+
+`;
+
exports[`Drawer requiredMark could be changed 1`] = `
+
+);
+
+export default App;
diff --git a/packages/design/src/form/demo/requiredMark-same-with-antd.tsx b/packages/design/src/form/demo/requiredMark-same-with-antd.tsx
new file mode 100644
index 000000000..52d1097f5
--- /dev/null
+++ b/packages/design/src/form/demo/requiredMark-same-with-antd.tsx
@@ -0,0 +1,49 @@
+import { Button, ConfigProvider, Form, Input, message } from '@oceanbase/design';
+import React from 'react';
+
+const onFinish = (values: any) => {
+ message.success('Success');
+ console.log(values);
+};
+
+const onFinishFailed = (errorInfo: any) => {
+ message.error('Failed');
+ console.log(errorInfo);
+};
+
+const App: React.FC = () => (
+
+
+
+
+
+
+
+
+
+
+
+
+);
+
+export default App;
diff --git a/packages/design/src/form/index.md b/packages/design/src/form/index.md
index 4ae995e65..b00fd1ba2 100644
--- a/packages/design/src/form/index.md
+++ b/packages/design/src/form/index.md
@@ -14,6 +14,10 @@ nav:
+
+
+
+
## API
diff --git a/packages/design/src/form/index.tsx b/packages/design/src/form/index.tsx
index 67afcf19a..b7aa388aa 100644
--- a/packages/design/src/form/index.tsx
+++ b/packages/design/src/form/index.tsx
@@ -20,15 +20,21 @@ type CompoundedComponent = React.FC & {
create: typeof AntForm.create;
};
-const Form: CompoundedComponent = props => {
+const Form: CompoundedComponent = ({ hideRequiredMark, ...restProps }) => {
const { form: contextForm } = useContext(ConfigProvider.ConfigContext);
return (
// @ts-ignore to ignore children type error
);
};
diff --git a/tests/__tests__/__snapshots__/demo.test.ts.snap b/tests/__tests__/__snapshots__/demo.test.ts.snap
index cb0e651bf..dfdd34653 100644
--- a/tests/__tests__/__snapshots__/demo.test.ts.snap
+++ b/tests/__tests__/__snapshots__/demo.test.ts.snap
@@ -624,6 +624,20 @@ exports[`renders packages/design/src/form/demo/form-item-tooltip.tsx correctly 1
}
`;
+exports[`renders packages/design/src/form/demo/hideRequiredMark.tsx correctly 1`] = `
+{
+ "html": "",
+ "type": "demo",
+}
+`;
+
+exports[`renders packages/design/src/form/demo/requiredMark-same-with-antd.tsx correctly 1`] = `
+{
+ "html": "",
+ "type": "demo",
+}
+`;
+
exports[`renders packages/design/src/input-number/demo/addon.tsx correctly 1`] = `
{
"html": "",
@@ -1392,56 +1406,56 @@ exports[`renders packages/ui/src/IconFont/demo/basic.tsx correctly 1`] = `
exports[`renders packages/ui/src/Login/demo/activate.tsx correctly 1`] = `
{
- "html": "Welcome to OCP Express
Let's start your usage
",
+ "html": "Welcome to OCP Express
Let's start your usage
",
"type": "demo",
}
`;
exports[`renders packages/ui/src/Login/demo/authCode.tsx correctly 1`] = `
{
- "html": "Welcome to OCP Express
Let's start your usage
",
+ "html": "Welcome to OCP Express
Let's start your usage
",
"type": "demo",
}
`;
exports[`renders packages/ui/src/Login/demo/basic.tsx correctly 1`] = `
{
- "html": "Welcome to OCP Express
Let's start your usage
",
+ "html": "Welcome to OCP Express
Let's start your usage
",
"type": "demo",
}
`;
exports[`renders packages/ui/src/Login/demo/bg-image.tsx correctly 1`] = `
{
- "html": " ",
+ "html": " ",
"type": "demo",
}
`;
exports[`renders packages/ui/src/Login/demo/board.tsx correctly 1`] = `
{
- "html": "顶部公告
",
+ "html": "顶部公告
",
"type": "demo",
}
`;
exports[`renders packages/ui/src/Login/demo/is-mobile.tsx correctly 1`] = `
{
- "html": " ",
+ "html": " ",
"type": "demo",
}
`;
exports[`renders packages/ui/src/Login/demo/otherLogin.tsx correctly 1`] = `
{
- "html": "Welcome to OCP Express
Let's start your usage
",
+ "html": "Welcome to OCP Express
Let's start your usage
",
"type": "demo",
}
`;
exports[`renders packages/ui/src/Login/demo/with-alert.tsx correctly 1`] = `
{
- "html": "Welcome to OCP Express
Let's start your usage
",
+ "html": "Welcome to OCP Express
Let's start your usage
",
"type": "demo",
}
`;