Skip to content

@vtj


@vtj / core / DirectiveModel

Class: DirectiveModel

Constructors

new DirectiveModel()

new DirectiveModel(schema): DirectiveModel

Parameters

schema

NodeDirective

Returns

DirectiveModel

Defined in

packages/core/src/models/directive.ts:35

Properties

arg?

optional arg: string | JSExpression

参数

Defined in

packages/core/src/models/directive.ts:21


id

readonly id: string

标识

Defined in

packages/core/src/models/directive.ts:13


iterator?

optional iterator: NodeDirectiveIterator

v-for 迭代器

Defined in

packages/core/src/models/directive.ts:33


modifiers?

optional modifiers: NodeModifiers

修饰符

Defined in

packages/core/src/models/directive.ts:25


name

name: string | JSExpression = ''

指令名称

Defined in

packages/core/src/models/directive.ts:17


value?

optional value: JSExpression

指令值

Defined in

packages/core/src/models/directive.ts:29

Methods

update()

update(schema): void

Parameters

schema

Partial<NodeDirective>

Returns

void

Defined in

packages/core/src/models/directive.ts:39


parse()

static parse(directives): DirectiveModel[]

Parameters

directives

NodeDirective[] = []

Returns

DirectiveModel[]

Defined in

packages/core/src/models/directive.ts:48


toDsl()

static toDsl(directives): NodeDirective[]

Parameters

directives

DirectiveModel[] = []

Returns

NodeDirective[]

Defined in

packages/core/src/models/directive.ts:51

Released under the MIT License.