diff --git a/packages/arco-lib/src/components/NumberInput.tsx b/packages/arco-lib/src/components/NumberInput.tsx index 09bd996d..8e5734cc 100644 --- a/packages/arco-lib/src/components/NumberInput.tsx +++ b/packages/arco-lib/src/components/NumberInput.tsx @@ -6,7 +6,7 @@ import { FALLBACK_METADATA, getComponentProps } from '../sunmao-helper'; import { NumberInputPropsSpec as BaseNumberInputPropsSpec } from '../generated/types/NumberInput'; import { useEffect, useRef } from 'react'; import { RefInputType } from '@arco-design/web-react/es/Input/interface'; -import { useStateValue } from 'src/hooks/useStateValue'; +import { useStateValue } from '../hooks/useStateValue'; const InputPropsSpec = Type.Object({ ...BaseNumberInputPropsSpec, diff --git a/packages/arco-lib/src/components/PasswordInput.tsx b/packages/arco-lib/src/components/PasswordInput.tsx index 166eb1ac..24e31c2f 100644 --- a/packages/arco-lib/src/components/PasswordInput.tsx +++ b/packages/arco-lib/src/components/PasswordInput.tsx @@ -4,7 +4,7 @@ import { css } from '@emotion/css'; import { Type, Static } from '@sinclair/typebox'; import { FALLBACK_METADATA, getComponentProps } from '../sunmao-helper'; import { PasswordInputPropsSpec as BasePasswordInputPropsSpec } from '../generated/types/PasswordInput'; -import { useStateValue } from 'src/hooks/useStateValue'; +import { useStateValue } from '../hooks/useStateValue'; const InputPropsSpec = Type.Object({ ...BasePasswordInputPropsSpec, diff --git a/packages/core/src/module.ts b/packages/core/src/module.ts index 779c61dd..339d03e1 100644 --- a/packages/core/src/module.ts +++ b/packages/core/src/module.ts @@ -43,12 +43,6 @@ export function createModule(options: CreateModuleOptions): RuntimeModule { exampleProperties: options.metadata.exampleProperties || {}, }, spec: { - // `json-schema-editor` has a readonly root object by default, - // it provides two schema formats,array({type:'array'}) and object({type:'object'}). - // In sunmao, we only use the object schema, so we need to specify a default value here - // and silently fail when root selects array. - // This is a bit obscure, so should remove the array type of root from the json-schema-editor later - // TODO remove the array type of root from the json-schema-editor properties: { type: 'object' }, events: [], stateMap: {}, diff --git a/packages/editor-sdk/src/components/Form/RecordEditor.tsx b/packages/editor-sdk/src/components/Form/RecordEditor.tsx index 3000453c..98b52d3b 100644 --- a/packages/editor-sdk/src/components/Form/RecordEditor.tsx +++ b/packages/editor-sdk/src/components/Form/RecordEditor.tsx @@ -20,6 +20,7 @@ import { mergeWidgetOptionsIntoSpec } from '../../utils/widget'; import { ExpressionEditorProps } from './ExpressionEditor'; import { generateDefaultValueFromSpec } from '@sunmao-ui/shared'; import { JSONSchema7 } from 'json-schema'; +import { css } from '@emotion/css'; const IGNORE_SPEC_TYPES = ['array', 'object']; @@ -127,6 +128,11 @@ const RowItem = (props: RowItemProps) => { return (