From 45191940844d97c5415edd44847d9f0e153e25df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=89=B2?= Date: Fri, 4 Oct 2024 19:26:29 +0700 Subject: [PATCH] docs: typo (#1838) Co-authored-by: cipchk --- .../form/src/widgets/array/index.en-US.md | 21 ++++++++++++------- .../form/src/widgets/array/index.zh-CN.md | 21 ++++++++++++------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/packages/form/src/widgets/array/index.en-US.md b/packages/form/src/widgets/array/index.en-US.md index 1129dadd3d..30899aaee3 100644 --- a/packages/form/src/widgets/array/index.en-US.md +++ b/packages/form/src/widgets/array/index.en-US.md @@ -14,14 +14,19 @@ Array layout is divided into array itself and array element layout, `arraySpan` UI embed in Schema: ```ts -const schema = { - list: { - type: 'array', - items: { - a: { type: 'string' }, - b: { type: 'number', ui: { spanLabel: 10 } } - }, - ui: { spanLabel: 5, grid: { arraySpan: 12 } } +const schema: SFSchema = { + properties: { + list: { + type: 'array', + items: { + type: 'object', + properties: { + a: { type: 'string' }, + b: { type: 'number', ui: { spanLabel: 10 } } + } + }, + ui: { spanLabel: 5, grid: { arraySpan: 12 } } + } } }; ``` diff --git a/packages/form/src/widgets/array/index.zh-CN.md b/packages/form/src/widgets/array/index.zh-CN.md index f8e4f8d5b9..b0852b14d1 100644 --- a/packages/form/src/widgets/array/index.zh-CN.md +++ b/packages/form/src/widgets/array/index.zh-CN.md @@ -14,14 +14,19 @@ order: 2 Schema 内嵌 UI 风格: ```ts -const schema = { - list: { - type: 'array', - items: { - a: { type: 'string' }, - b: { type: 'number', ui: { spanLabel: 10 } } - }, - ui: { spanLabel: 5, grid: { arraySpan: 12 } } +const schema: SFSchema = { + properties: { + list: { + type: 'array', + items: { + type: 'object', + properties: { + a: { type: 'string' }, + b: { type: 'number', ui: { spanLabel: 10 } } + } + }, + ui: { spanLabel: 5, grid: { arraySpan: 12 } } + } } }; ```