chore: refactor code-mirror (#1196)

Reviewed-on: daoyoucloud/tachybase#1196
This commit is contained in:
sealday 2024-06-17 17:48:32 +08:00
parent 04b715e53d
commit dffa8b1d4f
3 changed files with 4 additions and 2 deletions

View File

@ -89,7 +89,7 @@ export const CodeMirror = connect(({ value, onChange, ...otherProps }) => {
override: [completionSource], override: [completionSource],
}), }),
]} ]}
height="200" height="300px"
></CM> ></CM>
); );
}); });

View File

@ -67,7 +67,7 @@ export class ShowFieldCodeInterface extends CollectionFieldInterface {
type: 'string', type: 'string',
title: 'JSCode', title: 'JSCode',
'x-decorator': 'FormItem', 'x-decorator': 'FormItem',
'x-component': 'Input.TextArea', 'x-component': 'CodeMirror',
default: '', default: '',
required: true, required: true,
}, },

View File

@ -13,6 +13,7 @@ import {
Expression, Expression,
SignatureInput, SignatureInput,
} from './components'; } from './components';
import { CodeMirror } from './components/code-mirror';
import { PluginAssistant } from './features/assistant'; import { PluginAssistant } from './features/assistant';
import { PluginGroupBlock } from './features/block-group'; import { PluginGroupBlock } from './features/block-group';
import { PluginContextMenu } from './features/context-menu'; import { PluginContextMenu } from './features/context-menu';
@ -143,6 +144,7 @@ export class PluginCoreClient extends Plugin {
AssociatedField, AssociatedField,
AutoComplete, AutoComplete,
CalcResult, CalcResult,
CodeMirror,
CreateSubmitActionInitializer, CreateSubmitActionInitializer,
CustomAssociatedField, CustomAssociatedField,
CustomComponentDispatcher, CustomComponentDispatcher,