Skip to content

Commit

Permalink
fix(table): card add hashid
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Oct 13, 2022
1 parent 367c667 commit b98c387
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/table/src/components/Form/FormRender.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { BaseQueryFilterProps, ProFormProps } from '@ant-design/pro-form';
import { BetaSchemaForm } from '@ant-design/pro-form';
import type { ProSchemaComponentTypes } from '@ant-design/pro-utils';
import { ProSchemaComponentTypes, useToken } from '@ant-design/pro-utils';
import type { FormInstance, FormItemProps } from 'antd';
import { ConfigProvider, Table } from 'antd';
import classNames from 'classnames';
Expand Down Expand Up @@ -127,6 +127,7 @@ const FormRender = <T, U = any>({
form: formConfig,
bordered,
}: TableFormItem<T, U>) => {
const { hashId } = useToken();
const isForm = type === 'form';
/** 提交表单,根据两种模式不同,方法不相同 */
const submit = async (values: T, firstLoad: boolean) => {
Expand Down Expand Up @@ -195,6 +196,7 @@ const FormRender = <T, U = any>({
return (
<div
className={classNames({
hashId,
[getPrefixCls('pro-card')]: true,
[`${getPrefixCls('pro-card')}-border`]: !!bordered,
[`${getPrefixCls('pro-card')}-bordered`]: !!bordered,
Expand Down

0 comments on commit b98c387

Please sign in to comment.