diff --git a/packages/app/src/components/form.fields/sub-table/Form.tsx b/packages/app/src/components/form.fields/sub-table/Form.tsx
index 505a72f425..b24470e494 100644
--- a/packages/app/src/components/form.fields/sub-table/Form.tsx
+++ b/packages/app/src/components/form.fields/sub-table/Form.tsx
@@ -19,6 +19,7 @@ import { useRequest } from 'umi';
import api from '@/api-client';
import { Spin } from '@nocobase/client';
import cleanDeep from 'clean-deep';
+import scopes from '@/components/views/Form/scopes';
const actions = createFormActions();
@@ -107,20 +108,7 @@ export default forwardRef((props: any, ref) => {
type: 'object',
properties: fields,
}}
- expressionScope={{
- text(...args: any[]) {
- return React.createElement('span', {}, ...args)
- },
- tooltip(title: string, offset = 3) {
- return (
-
-
-
- );
- },
- }}
+ expressionScope={scopes}
>
diff --git a/packages/app/src/components/views/Form/DrawerForm.tsx b/packages/app/src/components/views/Form/DrawerForm.tsx
index 32c0fe9ef4..7f9d9f9e2f 100644
--- a/packages/app/src/components/views/Form/DrawerForm.tsx
+++ b/packages/app/src/components/views/Form/DrawerForm.tsx
@@ -23,6 +23,7 @@ import isEqual from 'lodash/isEqual';
import isEmpty from 'lodash/isEmpty';
import get from 'lodash/get';
import cleanDeep from 'clean-deep';
+import scopes from './scopes';
const actions = createFormActions();
@@ -137,23 +138,8 @@ export const DrawerForm = forwardRef((props: any, ref) => {
type: 'object',
properties,
}}
- expressionScope={{
- text(...args: any[]) {
- return React.createElement('span', {}, ...args)
- },
- html(html: string) {
- return
- },
- tooltip(title: string, offset = 3) {
- return (
- }>
-
-
- );
- },
- }}
+ autoComplete={'off'}
+ expressionScope={scopes}
>
)}
diff --git a/packages/app/src/components/views/Form/FilterForm.tsx b/packages/app/src/components/views/Form/FilterForm.tsx
index 73f0830c7a..625b1427a4 100644
--- a/packages/app/src/components/views/Form/FilterForm.tsx
+++ b/packages/app/src/components/views/Form/FilterForm.tsx
@@ -13,6 +13,7 @@ import {
setValidationLanguage,
} from '@formily/antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
+import scopes from './scopes';
export function FilterForm(props: any) {
const actions = createAsyncFormActions();
@@ -37,20 +38,7 @@ export function FilterForm(props: any) {
type: 'object',
properties,
}}
- expressionScope={{
- text(...args: any[]) {
- return React.createElement('span', {}, ...args)
- },
- tooltip(title: string, offset = 3) {
- return (
-
-
-
- );
- },
- }}
+ expressionScope={scopes}
>
取消
diff --git a/packages/app/src/components/views/Form/scopes.tsx b/packages/app/src/components/views/Form/scopes.tsx
new file mode 100644
index 0000000000..de5e02e64a
--- /dev/null
+++ b/packages/app/src/components/views/Form/scopes.tsx
@@ -0,0 +1,21 @@
+import React from 'react';
+import { Tooltip } from 'antd';
+import { QuestionCircleOutlined } from '@ant-design/icons';
+
+export default {
+ text(...args: any[]) {
+ return React.createElement('span', {}, ...args)
+ },
+ html(html: string) {
+ return
+ },
+ tooltip(title: string, offset = 3) {
+ return (
+ }>
+
+
+ );
+ },
+};