跳转到内容

DefineEntry

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:433

定义单条 entry: 路径 + 该路径下的 actions。

  • 路径 P 由第一个实参推断, 写错编译期报错;
  • actions 的期望类型是 ConfigAction<PiFieldAtPath<Root, P>>, 工厂上的 F 由此反推, 所以 d.props.patchAsync({ x: (field) => ... }) 里的 field 与 builder.get(path) 完全等价(自身 / 父级 / 根级 / 别名)。

注意: 工厂调用必须写在本次的 actions 数组里, 提前存到变量会丢上下文。

Root extends v.BaseSchema<any, any, any>

DefineEntry<P>(path, actions): FieldEntry

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:436

定义单条 entry: 路径 + 该路径下的 actions。

  • 路径 P 由第一个实参推断, 写错编译期报错;
  • actions 的期望类型是 ConfigAction<PiFieldAtPath<Root, P>>, 工厂上的 F 由此反推, 所以 d.props.patchAsync({ x: (field) => ... }) 里的 field 与 builder.get(path) 完全等价(自身 / 父级 / 根级 / 别名)。

注意: 工厂调用必须写在本次的 actions 数组里, 提前存到变量会丢上下文。

P extends NodePathsOf<any, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]> | [string, "[rest]"] | [string, number] | [string, "[value]"] | [string, "[key]"] | [string, string] | ["[rest]", "[rest]"] | ["[rest]", number] | ["[rest]", "[value]"] | ["[rest]", "[key]"] | ["[rest]", string] | [number, "[rest]"] | [number, number] | [number, "[value]"] | [number, "[key]"] | [number, string] | ["[value]", "[rest]"] | ["[value]", number] | ["[value]", "[value]"] | ["[value]", "[key]"] | ["[value]", string] | ["[key]", "[rest]"] | ["[key]", number] | ["[key]", "[value]"] | ["[key]", "[key]"] | ["[key]", string]

[...P[]]

readonly FieldActionOf<Root, P>[]

FieldEntry

attributes: AttributesGroupFactory

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:122

ActionFactories.attributes


class: object

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:139

class 族: 同步形态不涉 field, 异步形态的回调必须拿到路径精确的 field。 这里重新声明而不是 typeof classAction: 底层函数把 field 写死成了松散形态。

asyncBottom: <F>(classNameFn) => ConfigAction<F>

F extends AnyField

AsyncCallback<string, F>

ConfigAction<F>

asyncComponent: <F>(classNameFn) => ConfigAction<F>

F extends AnyField

AsyncCallback<string, F>

ConfigAction<F>

asyncTop: <F>(classNameFn) => ConfigAction<F>

F extends AnyField

AsyncCallback<ClassValue, F>

ConfigAction<F>

bottom: <F>(className, merge?) => ConfigAction<F>

F

ClassValue

boolean

ConfigAction<F>

component: <F>(className, merge?) => ConfigAction<F>

F

ClassValue

boolean

ConfigAction<F>

top: <F>(className, merge?) => ConfigAction<F>

F

ClassValue

boolean

ConfigAction<F>

ActionFactories.class


createOptions: object

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:126

patch: <F>(value) => ConfigAction<F>

F

any

ConfigAction<F>

set: <F>(value) => ConfigAction<F>

F

any

ConfigAction<F>

ActionFactories.createOptions


disableWhen: <F>(options) => ConfigAction<F>

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:155

F extends AnyField

DisableWhenOption<F>

ConfigAction<F>

ActionFactories.disableWhen


events: EventsGroupFactory

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:124

ActionFactories.events


hideWhen: <F>(options) => ConfigAction<F>

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:154

F extends AnyField

HideWhenOption<F>

ConfigAction<F>

ActionFactories.hideWhen


hooks: HooksGroupFactory

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:125

ActionFactories.hooks


inputs: KeyGroupFactory

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:119

ActionFactories.inputs


models: KeyGroupFactory

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:120

ActionFactories.models


outputChange: <F>(fn) => ConfigAction<F>

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:162

监听其他字段的 output: 回调里 list/listenFields 与监听项逐位对齐

F extends AnyField

EventChangeFn<F>

ConfigAction<F>

ActionFactories.outputChange


outputs: OutputsGroupFactory

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:123

ActionFactories.outputs


props: KeyGroupFactory

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:118

ActionFactories.props


providers: object

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:130

change: <T>(providersFn) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

T

(input) => InjectorProvider[]

RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

patch: <T>(providers) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

T

InjectorProvider[]

RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

set: <T>(providers) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

T

InjectorProvider[]

RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

ActionFactories.providers


slots: KeyGroupFactory

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:121

ActionFactories.slots


valueChange: <F>(listenFn) => ConfigAction<F>

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:158

F extends AnyField

ValueChangeFn<F>

ConfigAction<F>

ActionFactories.valueChange


wrappers: object

Defined in: projects/view-core/convert/action/typed-field-pipe.ts:153

changeAsync: <T>(indexFn, actions) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle> = changeAsyncWrapper

T

(list) => any

ConfigAction<any>[]

RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

patch: <T>(wrappers) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

T

(string | SetOptional<SetUnWrapper$<CoreWrapperConfig, WrapperChangeKey>, WrapperChangeKey>)[]

RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

patchAsync: <T>(type, actions?, options?) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle> = patchAsyncWrapper

T

any

ConfigAction<any>[]

number

RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

remove: <T>(removeList) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle> = removeWrappers

T

string[] | ((list) => Signal<CoreWrapperConfig>[])

RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

set: <T>(wrappers) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

T

(string | SetOptional<SetUnWrapper$<CoreWrapperConfig, WrapperChangeKey>, WrapperChangeKey>)[]

RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

ActionFactories.wrappers