Path
@silver-formily/react 没有定义自己的路径协议。React 包里涉及路径的类型都直接复用 @silver-formily/path。
FormPathPattern
本包最常见的入口是 IRecursionFieldProps['basePath']:
ts
import type { ISchema, SchemaKey } from '@silver-formily/json-schema'
import type { Pattern as FormPathPattern } from '@silver-formily/path'
import type { ISchemaFilter, ISchemaMapper } from '@silver-formily/react'
import type React from 'react'
interface IRecursionFieldProps {
schema: ISchema
name?: SchemaKey
basePath?: FormPathPattern
propsRecursion?: boolean
onlyRenderProperties?: boolean
onlyRenderSelf?: boolean
mapProperties?: ISchemaMapper
filterProperties?: ISchemaFilter
children?: React.ReactNode
}这里的 FormPathPattern 只是从 @silver-formily/path 引入的别名来源,不是 React 包额外扩展出来的新类型。
如果你要了解:
- 路径字符串和数组路径如何互转
- 通配符、别名组、正则匹配如何工作
Path类与访问器 API
请直接查看 Path 文档。