diff --git a/packages/core/client/src/schema-component/antd/formula-input/Compute.tsx b/packages/core/client/src/schema-component/antd/formula-input/Compute.tsx index 8db6db9e1..e5a8b58ff 100644 --- a/packages/core/client/src/schema-component/antd/formula-input/Compute.tsx +++ b/packages/core/client/src/schema-component/antd/formula-input/Compute.tsx @@ -1,11 +1,11 @@ import { onFormValuesChange } from '@formily/core'; import { connect, mapReadPretty, useFieldSchema, useFormEffects } from '@formily/react'; import { InputNumber } from 'antd'; -import React, { useState } from 'react'; -import * as math from 'mathjs'; import _ from 'lodash'; +import * as math from 'mathjs'; +import React, { useState } from 'react'; +import { useCollection } from '../../../collection-manager/hooks'; import { ReadPretty } from '../input-number/ReadPretty'; -import { useCollection, useCollectionField } from '../../../collection-manager/hooks'; const AntdCompute = (props) => { const { value, onChange, step } = props; diff --git a/packages/core/client/src/schema-component/antd/formula-input/FormulaInput.tsx b/packages/core/client/src/schema-component/antd/formula-input/FormulaInput.tsx index b2757355f..8e206aabf 100644 --- a/packages/core/client/src/schema-component/antd/formula-input/FormulaInput.tsx +++ b/packages/core/client/src/schema-component/antd/formula-input/FormulaInput.tsx @@ -1,14 +1,9 @@ -import { CloseOutlined, LoadingOutlined } from '@ant-design/icons'; -import { useFormLayout } from '@formily/antd'; -import { connect, mapProps, mapReadPretty, useFieldSchema } from '@formily/react'; -import { isValid } from '@formily/shared'; -import { useRecord } from '@nocobase/client'; -import { Button, Input, Popover, Tag, Menu, Dropdown } from 'antd'; +import { connect, mapProps } from '@formily/react'; +import { Dropdown, Menu } from 'antd'; import React, { useEffect, useRef, useState } from 'react'; import ContentEditable from 'react-contenteditable'; -import { useTranslation } from 'react-i18next'; import { useCollectionManager } from '../../../collection-manager/hooks'; -import { hasIcon, Icon, icons } from '../../../icon'; +import { useRecord } from '../../../record-provider'; const AntdFormulaInput = (props) => { const { value, onChange } = props; diff --git a/packages/core/client/src/schema-component/antd/formula-input/index.ts b/packages/core/client/src/schema-component/antd/formula-input/index.ts index 2fe9c0c18..19f071dcb 100644 --- a/packages/core/client/src/schema-component/antd/formula-input/index.ts +++ b/packages/core/client/src/schema-component/antd/formula-input/index.ts @@ -1,5 +1,5 @@ -import { FormulaInput } from './FormulaInput'; import { Compute } from './Compute'; +import { FormulaInput } from './FormulaInput'; export const Formula: any = () => null; Formula.Expression = FormulaInput;