Skip to content

@vtj


@vtj / designer / Engine

Class: Engine

Defined in: packages/designer/types/framework/engine.d.ts:21

Extends

  • Base

Constructors

new Engine()

new Engine(options): Engine

Defined in: packages/designer/types/framework/engine.d.ts:41

Parameters

options

EngineOptions

Returns

Engine

Overrides

Base.constructor

Properties

adapter?

optional adapter: ProvideAdapter

Defined in: packages/designer/types/framework/engine.d.ts:36


app?

optional app: App

Defined in: packages/designer/types/framework/engine.d.ts:23


assets

assets: Assets

Defined in: packages/designer/types/framework/engine.d.ts:27


changed

changed: Ref<symbol, symbol>

Defined in: packages/designer/types/framework/engine.d.ts:40

当current变化时,更新该值,用于通知组件更新


container

container: MaybeRef<undefined | HTMLElement>

Defined in: packages/designer/types/framework/engine.d.ts:25


context

context: Ref<null | Context, null | Context>

Defined in: packages/designer/types/framework/engine.d.ts:32


current

current: Ref<null | BlockModel, null | BlockModel>

Defined in: packages/designer/types/framework/engine.d.ts:31


emitter

emitter: Emitter

Defined in: packages/designer/types/framework/engine.d.ts:29


history

history: Ref<null | HistoryModel, null | HistoryModel>

Defined in: packages/designer/types/framework/engine.d.ts:34


isEmptyCurrent

isEmptyCurrent: Ref<boolean, boolean>

Defined in: packages/designer/types/framework/engine.d.ts:33


isReady

isReady: boolean

Defined in: packages/core/types/models/base.d.ts:3

Inherited from

Base.isReady


listeners

protected listeners: () => void[]

Defined in: packages/core/types/models/base.d.ts:2

Returns

void

Inherited from

Base.listeners


options

options: EngineOptions

Defined in: packages/designer/types/framework/engine.d.ts:22


project

project: Ref<null | ProjectModel, null | ProjectModel>

Defined in: packages/designer/types/framework/engine.d.ts:30


provider

provider: Provider

Defined in: packages/designer/types/framework/engine.d.ts:35


service

service: Service

Defined in: packages/designer/types/framework/engine.d.ts:26


simulator

simulator: Simulator

Defined in: packages/designer/types/framework/engine.d.ts:28


skeleton?

optional skeleton: null | CreateComponentPublicInstanceWithMixins<Readonly<{}>, { engine: ShallowReactive<Engine>; skeletonRef: Ref; widgets: Ref<Record<string, CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<{ region: { required: ...; type: ...; }; widget: { required: ...; type: ...; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, { B: {}; C: {}; D: {}; Defaults: {}; M: {}; P: {}; }, Readonly<ExtractPropTypes<{ region: { required: ...; type: ...; }; widget: { required: ...; type: ...; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, {}>>, Record<string, CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<{ region: { required: ...; type: ...; }; widget: { required: ...; type: ...; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, { B: {}; C: {}; D: {}; Defaults: {}; M: {}; P: {}; }, Readonly<ExtractPropTypes<{ region: { required: ...; type: ...; }; widget: { required: ...; type: ...; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, {}>>>; }, {}, {}, { closePreview: void; getRegion: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<{ region: { required: true; type: PropType<... | ... | ... | ... | ... | ... | ... | ...>; }; }>> & Readonly<{}>, { regionRef: Ref; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, OptionTypesType<{}, {}, {}, {}, {}, {}>, Readonly<ExtractPropTypes<{ region: { required: true; type: PropType<... | ... | ... | ... | ... | ... | ... | ...>; }; }>> & Readonly<{}>, { regionRef: Ref; }, {}, {}, {}, {}>; getWidget: undefined | CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<{ region: { required: true; type: PropType<...>; }; widget: { required: true; type: PropType<...>; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, OptionTypesType<{}, {}, {}, {}, {}, {}>, Readonly<ExtractPropTypes<{ region: { required: true; type: PropType<...>; }; widget: { required: true; type: PropType<...>; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, {}>; getWidgets: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<{ region: { required: true; type: PropType<...>; }; widget: { required: true; type: PropType<...>; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, OptionTypesType<{}, {}, {}, {}, {}, {}>, Readonly<ExtractPropTypes<{ region: { required: true; type: PropType<...>; }; widget: { required: true; type: PropType<...>; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, {}>[]; openPreview: void; settable: void; toggleCollapse: void; }, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, OptionTypesType<{}, {}, {}, {}, {}, {}>, Readonly<{}>, { engine: ShallowReactive<Engine>; skeletonRef: Ref; widgets: Ref<Record<string, CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<{ region: { required: ...; type: ...; }; widget: { required: ...; type: ...; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, { B: {}; C: {}; D: {}; Defaults: {}; M: {}; P: {}; }, Readonly<ExtractPropTypes<{ region: { required: ...; type: ...; }; widget: { required: ...; type: ...; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, {}>>, Record<string, CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<{ region: { required: ...; type: ...; }; widget: { required: ...; type: ...; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, { B: {}; C: {}; D: {}; Defaults: {}; M: {}; P: {}; }, Readonly<ExtractPropTypes<{ region: { required: ...; type: ...; }; widget: { required: ...; type: ...; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, {}>>>; }, {}, {}, { closePreview: void; getRegion: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<{ region: { required: true; type: PropType<... | ... | ... | ... | ... | ... | ... | ...>; }; }>> & Readonly<{}>, { regionRef: Ref; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, OptionTypesType<{}, {}, {}, {}, {}, {}>, Readonly<ExtractPropTypes<{ region: { required: true; type: PropType<... | ... | ... | ... | ... | ... | ... | ...>; }; }>> & Readonly<{}>, { regionRef: Ref; }, {}, {}, {}, {}>; getWidget: undefined | CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<{ region: { required: true; type: PropType<...>; }; widget: { required: true; type: PropType<...>; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, OptionTypesType<{}, {}, {}, {}, {}, {}>, Readonly<ExtractPropTypes<{ region: { required: true; type: PropType<...>; }; widget: { required: true; type: PropType<...>; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, {}>; getWidgets: CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<{ region: { required: true; type: PropType<...>; }; widget: { required: true; type: PropType<...>; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, OptionTypesType<{}, {}, {}, {}, {}, {}>, Readonly<ExtractPropTypes<{ region: { required: true; type: PropType<...>; }; widget: { required: true; type: PropType<...>; }; }>> & Readonly<{}>, { widgetRef: Ref; }, {}, {}, {}, {}>[]; openPreview: void; settable: void; toggleCollapse: void; }, {}>

Defined in: packages/designer/types/framework/engine.d.ts:24

Methods

dispose()

dispose(): void

Defined in: packages/designer/types/framework/engine.d.ts:60

Returns

void


genSource()

genSource(): Promise<undefined | string>

Defined in: packages/designer/types/framework/engine.d.ts:58

Returns

Promise<undefined | string>


onSaveBlockFileFinish()

onSaveBlockFileFinish(callback): void

Defined in: packages/designer/types/framework/engine.d.ts:51

Parameters

callback

(e) => void

Returns

void


openFile()

openFile(fileId?): Promise<void>

Defined in: packages/designer/types/framework/engine.d.ts:61

Parameters

fileId?

string

Returns

Promise<void>


ready()

ready(callback): void

Defined in: packages/core/types/models/base.d.ts:5

Parameters

callback

() => void

Returns

void

Inherited from

Base.ready


resetReady()

resetReady(): void

Defined in: packages/core/types/models/base.d.ts:6

Returns

void

Inherited from

Base.resetReady


triggerReady()

protected triggerReady(): void

Defined in: packages/core/types/models/base.d.ts:4

Returns

void

Inherited from

Base.triggerReady

Released under the MIT License.