Skip to content

@vtj / Modules / renderer

Module: renderer

Table of contents

Enumerations

Classes

Interfaces

Type Aliases

Variables

Functions

Type Aliases

BlockLoader

Ƭ BlockLoader: (name: string, from?: NodeFrom, Vue?: any) => string | DefineComponent

Type declaration

▸ (name, from?, Vue?): string | DefineComponent

Parameters
NameType
namestring
from?NodeFrom
Vue?any
Returns

string | DefineComponent

Defined in

packages/renderer/types/render/loader.d.ts:5


DataSourceHandler

Ƭ DataSourceHandler: (...args: any[]) => Promise<any>

Type declaration

▸ (...args): Promise<any>

Parameters
NameType
...argsany[]
Returns

Promise<any>

Defined in

packages/renderer/types/render/block.d.ts:6

Variables

BUILT_IN_DIRECTIVES

Const BUILT_IN_DIRECTIVES: string[]

内置指令

Defined in

packages/renderer/types/constants.d.ts:29


CONTEXT_HOST

Const CONTEXT_HOST: string[]

vue 组件实例提供的属性名

Defined in

packages/renderer/types/constants.d.ts:24


DATA_TYPES

Const DATA_TYPES: Record<BlockPropDataType, any>

数据类型

Defined in

packages/renderer/types/constants.d.ts:33


LIFE_CYCLES_LIST

Const LIFE_CYCLES_LIST: string[]

Defined in

packages/renderer/types/constants.d.ts:25


VTJ_RENDERER_VERSION

Const VTJ_RENDERER_VERSION: "0.8.7"

! Copyright (c) 2024, VTJ.PRO All rights reserved.

Name

@vtj/renderer

Author

CHC chenhuachun1549@dingtalk.com

Version

0.8.7

License

MIT License

Defined in

packages/renderer/types/version.d.ts:8


providerKey

Const providerKey: InjectionKey<Provider>

Defined in

packages/renderer/types/provider/provider.d.ts:8

Functions

JSCodeToString

JSCodeToString(data): string

Parameters

NameType
dataunknown

Returns

string

Defined in

packages/renderer/types/utils/parser.d.ts:8


adoptedStyleSheets

adoptedStyleSheets(global, id, css): void

Parameters

NameType
globalWindow
idstring
cssstring

Returns

void

Defined in

packages/renderer/types/utils/util.d.ts:4


createAssetScripts

createAssetScripts(scripts): string

Parameters

NameType
scriptsstring[]

Returns

string

Defined in

packages/renderer/types/utils/deps.d.ts:7


createAssetsCss

createAssetsCss(css?): string

Parameters

NameType
css?string[]

Returns

string

Defined in

packages/renderer/types/utils/deps.d.ts:8


createDataSources

createDataSources(dataSources, context): Record<string, DataSourceHandler>

Parameters

NameType
dataSourcesRecord<string, DataSourceSchema>
contextContext

Returns

Record<string, DataSourceHandler>

Defined in

packages/renderer/types/render/block.d.ts:21


createLoader

createLoader(opts): BlockLoader

Parameters

NameType
optsCreateLoaderOptions

Returns

BlockLoader

Defined in

packages/renderer/types/render/loader.d.ts:13


createMemoryService

createMemoryService(): MemoryService

Returns

MemoryService

Defined in

packages/renderer/types/services/memory.d.ts:23


createProvider

createProvider(options): Object

Parameters

NameType
optionsProviderOptions

Returns

Object

NameType
onReady(callback: () => void) => void
providerProvider

Defined in

packages/renderer/types/provider/provider.d.ts:59


createRenderer

createRenderer(options): Object

Parameters

NameType
optionsCreateRendererOptions

Returns

Object

NameType
contextContext
rendererany

Defined in

packages/renderer/types/render/block.d.ts:17


createSchemaApi

createSchemaApi(schema, adapter): (query?: Record<string, any>) => Promise<any> | (data: any, opts?: IRequestConfig) => Promise<any>

Parameters

NameType
schemaApiSchema
adapterProvideAdapter

Returns

(query?: Record<string, any>) => Promise<any> | (data: any, opts?: IRequestConfig) => Promise<any>

Defined in

packages/renderer/types/provider/apis.d.ts:5


createSchemaApis

createSchemaApis(schema, adapter): Record<string, any>

Parameters

NameType
schemaundefined | ApiSchema[]
adapterProvideAdapter

Returns

Record<string, any>

Defined in

packages/renderer/types/provider/apis.d.ts:6


defaultLoader

defaultLoader(name, from?, Vue?): string | DefineComponent

Parameters

NameType
namestring
from?NodeFrom
Vue?any

Returns

string | DefineComponent

Defined in

packages/renderer/types/render/loader.d.ts:6


fillBasePath

fillBasePath(urls, basePath): string[]

Parameters

NameType
urlsstring[]
basePathstring

Returns

string[]

Defined in

packages/renderer/types/utils/deps.d.ts:3


getModifiers

getModifiers(modifiers?, isToString?): string[]

Parameters

NameType
modifiers?NodeModifiers
isToString?boolean

Returns

string[]

Defined in

packages/renderer/types/render/node.d.ts:7


getPlugin

getPlugin(from, global?): Promise<BlockPlugin | null>

Parameters

NameType
fromNodeFromPlugin
global?any

Returns

Promise<BlockPlugin | null>

Defined in

packages/renderer/types/render/loader.d.ts:7


getRawComponent

getRawComponent(desc, lib): any

Parameters

NameType
descMaterialDescription
libany

Returns

any

Defined in

packages/renderer/types/utils/deps.d.ts:19


isCSSUrl

isCSSUrl(url): boolean

Parameters

NameType
urlstring

Returns

boolean

Defined in

packages/renderer/types/utils/deps.d.ts:4


isJSCode

isJSCode(data): data is JSExpression | JSFunction

Parameters

NameType
dataunknown

Returns

data is JSExpression | JSFunction

Defined in

packages/renderer/types/utils/parser.d.ts:7


isJSExpression

isJSExpression(data): data is JSExpression

Parameters

NameType
dataany

Returns

data is JSExpression

Defined in

packages/renderer/types/utils/parser.d.ts:5


isJSFunction

isJSFunction(x): x is JSFunction

Parameters

NameType
xany

Returns

x is JSFunction

Defined in

packages/renderer/types/utils/parser.d.ts:6


isJSON

isJSON(url): boolean

Parameters

NameType
urlstring

Returns

boolean

Defined in

packages/renderer/types/utils/deps.d.ts:6


isJSUrl

isJSUrl(url): boolean

Parameters

NameType
urlstring

Returns

boolean

Defined in

packages/renderer/types/utils/deps.d.ts:5


isVuePlugin

isVuePlugin(value): value is Plugin

Parameters

NameType
valueunknown

Returns

value is Plugin

Defined in

packages/renderer/types/utils/util.d.ts:8


loadCss

loadCss(id, url): Promise<void>

Parameters

NameType
idstring
urlstring

Returns

Promise<void>

Defined in

packages/renderer/types/utils/util.d.ts:5


loadCssUrl

loadCssUrl(urls, global?): void

Parameters

NameType
urlsstring[]
global?any

Returns

void

Defined in

packages/renderer/types/utils/util.d.ts:6


loadScriptUrl

loadScriptUrl(urls, library, global?): Promise<any>

Parameters

NameType
urlsstring[]
librarystring
global?any

Returns

Promise<any>

Defined in

packages/renderer/types/utils/util.d.ts:7


mockApi

mockApi(schema): void

Parameters

NameType
schemaApiSchema

Returns

void

Defined in

packages/renderer/types/provider/apis.d.ts:34


mockApis

mockApis(schemas?): void

Parameters

NameType
schemas?ApiSchema[]

Returns

void

Defined in

packages/renderer/types/provider/apis.d.ts:7


mockCleanup

mockCleanup(): void

Returns

void

Defined in

packages/renderer/types/provider/apis.d.ts:35


nodeRender

nodeRender(dsl, context, Vue?, loader?): VNode | VNode[] | null

Parameters

NameType
dslNodeSchema
contextContext
Vue?any
loader?BlockLoader

Returns

VNode | VNode[] | null

Defined in

packages/renderer/types/render/node.d.ts:6


parseDeps

parseDeps(deps, basePath): Object

Parameters

NameType
depsDependencie[]
basePathstring

Returns

Object

NameType
cssstring[]
libraryExportsstring[]
libraryLocaleMapRecord<string, string>
libraryMapRecord<string, string[]>
materialExportsstring[]
materialMapLibraryRecord<string, string>
materialsstring[]
scriptsstring[]

Defined in

packages/renderer/types/utils/deps.d.ts:9


parseExpression

parseExpression(str, self, thisRequired?, throwError?): any

Parameters

NameType
strJSExpression | JSFunction
selfany
thisRequired?boolean
throwError?boolean

Returns

any

Defined in

packages/renderer/types/utils/parser.d.ts:3


parseFunction

parseFunction(str, self, thisRequired?, throwError?): Function

Parameters

NameType
strJSFunction
selfany
thisRequired?boolean
throwError?boolean

Returns

Function

Defined in

packages/renderer/types/utils/parser.d.ts:4


toString

toString(value): string

Parameters

NameType
valueany

Returns

string

Defined in

packages/renderer/types/utils/util.d.ts:3


useMask

useMask(): Object

Returns

Object

NameType
disabledRef<boolean>
logostring | undefined
menusMenuDataItem[]
themeSwitchableboolean | undefined
titlestring

Defined in

packages/renderer/types/hooks/mask.d.ts:4


useProvider

useProvider(options?): Provider

Parameters

NameType
options?UseProviderOptions

Returns

Provider

Defined in

packages/renderer/types/provider/provider.d.ts:67

Released under the MIT License.