Module: renderer
Table of contents
Enumerations
Classes
Interfaces
- ContextAttrs
- ContextOptions
- CreateLoaderOptions
- CreateRendererOptions
- MockCallbackOptions
- ProvideAdapter
- ProviderOptions
- UseProviderOptions
Type Aliases
Variables
Functions
- JSCodeToString
- adoptedStyleSheets
- createAssetScripts
- createAssetsCss
- createDataSources
- createLoader
- createMemoryService
- createProvider
- createRenderer
- createSchemaApi
- createSchemaApis
- defaultLoader
- fillBasePath
- getModifiers
- getPlugin
- getRawComponent
- isCSSUrl
- isJSCode
- isJSExpression
- isJSFunction
- isJSON
- isJSUrl
- isVuePlugin
- loadCss
- loadCssUrl
- loadScriptUrl
- mockApi
- mockApis
- mockCleanup
- nodeRender
- parseDeps
- parseExpression
- parseFunction
- toString
- useMask
- useProvider
Type Aliases
BlockLoader
Ƭ BlockLoader: (name
: string
, from?
: NodeFrom
, Vue?
: any
) => string
| DefineComponent
Type declaration
▸ (name
, from?
, Vue?
): string
| DefineComponent
Parameters
Name | Type |
---|---|
name | string |
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
Name | Type |
---|---|
...args | any [] |
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
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
Name | Type |
---|---|
data | unknown |
Returns
string
Defined in
packages/renderer/types/utils/parser.d.ts:8
adoptedStyleSheets
▸ adoptedStyleSheets(global
, id
, css
): void
Parameters
Name | Type |
---|---|
global | Window |
id | string |
css | string |
Returns
void
Defined in
packages/renderer/types/utils/util.d.ts:4
createAssetScripts
▸ createAssetScripts(scripts
): string
Parameters
Name | Type |
---|---|
scripts | string [] |
Returns
string
Defined in
packages/renderer/types/utils/deps.d.ts:7
createAssetsCss
▸ createAssetsCss(css?
): string
Parameters
Name | Type |
---|---|
css? | string [] |
Returns
string
Defined in
packages/renderer/types/utils/deps.d.ts:8
createDataSources
▸ createDataSources(dataSources
, context
): Record
<string
, DataSourceHandler
>
Parameters
Name | Type |
---|---|
dataSources | Record <string , DataSourceSchema > |
context | Context |
Returns
Record
<string
, DataSourceHandler
>
Defined in
packages/renderer/types/render/block.d.ts:21
createLoader
▸ createLoader(opts
): BlockLoader
Parameters
Name | Type |
---|---|
opts | CreateLoaderOptions |
Returns
Defined in
packages/renderer/types/render/loader.d.ts:13
createMemoryService
▸ createMemoryService(): MemoryService
Returns
Defined in
packages/renderer/types/services/memory.d.ts:23
createProvider
▸ createProvider(options
): Object
Parameters
Name | Type |
---|---|
options | ProviderOptions |
Returns
Object
Name | Type |
---|---|
onReady | (callback : () => void ) => void |
provider | Provider |
Defined in
packages/renderer/types/provider/provider.d.ts:59
createRenderer
▸ createRenderer(options
): Object
Parameters
Name | Type |
---|---|
options | CreateRendererOptions |
Returns
Object
Name | Type |
---|---|
context | Context |
renderer | any |
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
Name | Type |
---|---|
schema | ApiSchema |
adapter | ProvideAdapter |
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
Name | Type |
---|---|
schema | undefined | ApiSchema [] |
adapter | ProvideAdapter |
Returns
Record
<string
, any
>
Defined in
packages/renderer/types/provider/apis.d.ts:6
defaultLoader
▸ defaultLoader(name
, from?
, Vue?
): string
| DefineComponent
Parameters
Name | Type |
---|---|
name | string |
from? | NodeFrom |
Vue? | any |
Returns
string
| DefineComponent
Defined in
packages/renderer/types/render/loader.d.ts:6
fillBasePath
▸ fillBasePath(urls
, basePath
): string
[]
Parameters
Name | Type |
---|---|
urls | string [] |
basePath | string |
Returns
string
[]
Defined in
packages/renderer/types/utils/deps.d.ts:3
getModifiers
▸ getModifiers(modifiers?
, isToString?
): string
[]
Parameters
Name | Type |
---|---|
modifiers? | NodeModifiers |
isToString? | boolean |
Returns
string
[]
Defined in
packages/renderer/types/render/node.d.ts:7
getPlugin
▸ getPlugin(from
, global?
): Promise
<BlockPlugin
| null
>
Parameters
Name | Type |
---|---|
from | NodeFromPlugin |
global? | any |
Returns
Promise
<BlockPlugin
| null
>
Defined in
packages/renderer/types/render/loader.d.ts:7
getRawComponent
▸ getRawComponent(desc
, lib
): any
Parameters
Name | Type |
---|---|
desc | MaterialDescription |
lib | any |
Returns
any
Defined in
packages/renderer/types/utils/deps.d.ts:19
isCSSUrl
▸ isCSSUrl(url
): boolean
Parameters
Name | Type |
---|---|
url | string |
Returns
boolean
Defined in
packages/renderer/types/utils/deps.d.ts:4
isJSCode
▸ isJSCode(data
): data is JSExpression | JSFunction
Parameters
Name | Type |
---|---|
data | unknown |
Returns
data is JSExpression | JSFunction
Defined in
packages/renderer/types/utils/parser.d.ts:7
isJSExpression
▸ isJSExpression(data
): data is JSExpression
Parameters
Name | Type |
---|---|
data | any |
Returns
data is JSExpression
Defined in
packages/renderer/types/utils/parser.d.ts:5
isJSFunction
▸ isJSFunction(x
): x is JSFunction
Parameters
Name | Type |
---|---|
x | any |
Returns
x is JSFunction
Defined in
packages/renderer/types/utils/parser.d.ts:6
isJSON
▸ isJSON(url
): boolean
Parameters
Name | Type |
---|---|
url | string |
Returns
boolean
Defined in
packages/renderer/types/utils/deps.d.ts:6
isJSUrl
▸ isJSUrl(url
): boolean
Parameters
Name | Type |
---|---|
url | string |
Returns
boolean
Defined in
packages/renderer/types/utils/deps.d.ts:5
isVuePlugin
▸ isVuePlugin(value
): value is Plugin
Parameters
Name | Type |
---|---|
value | unknown |
Returns
value is Plugin
Defined in
packages/renderer/types/utils/util.d.ts:8
loadCss
▸ loadCss(id
, url
): Promise
<void
>
Parameters
Name | Type |
---|---|
id | string |
url | string |
Returns
Promise
<void
>
Defined in
packages/renderer/types/utils/util.d.ts:5
loadCssUrl
▸ loadCssUrl(urls
, global?
): void
Parameters
Name | Type |
---|---|
urls | string [] |
global? | any |
Returns
void
Defined in
packages/renderer/types/utils/util.d.ts:6
loadScriptUrl
▸ loadScriptUrl(urls
, library
, global?
): Promise
<any
>
Parameters
Name | Type |
---|---|
urls | string [] |
library | string |
global? | any |
Returns
Promise
<any
>
Defined in
packages/renderer/types/utils/util.d.ts:7
mockApi
▸ mockApi(schema
): void
Parameters
Name | Type |
---|---|
schema | ApiSchema |
Returns
void
Defined in
packages/renderer/types/provider/apis.d.ts:34
mockApis
▸ mockApis(schemas?
): void
Parameters
Name | Type |
---|---|
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
Name | Type |
---|---|
dsl | NodeSchema |
context | Context |
Vue? | any |
loader? | BlockLoader |
Returns
VNode
| VNode
[] | null
Defined in
packages/renderer/types/render/node.d.ts:6
parseDeps
▸ parseDeps(deps
, basePath
): Object
Parameters
Name | Type |
---|---|
deps | Dependencie [] |
basePath | string |
Returns
Object
Name | Type |
---|---|
css | string [] |
libraryExports | string [] |
libraryLocaleMap | Record <string , string > |
libraryMap | Record <string , string []> |
materialExports | string [] |
materialMapLibrary | Record <string , string > |
materials | string [] |
scripts | string [] |
Defined in
packages/renderer/types/utils/deps.d.ts:9
parseExpression
▸ parseExpression(str
, self
, thisRequired?
, throwError?
): any
Parameters
Name | Type |
---|---|
str | JSExpression | JSFunction |
self | any |
thisRequired? | boolean |
throwError? | boolean |
Returns
any
Defined in
packages/renderer/types/utils/parser.d.ts:3
parseFunction
▸ parseFunction(str
, self
, thisRequired?
, throwError?
): Function
Parameters
Name | Type |
---|---|
str | JSFunction |
self | any |
thisRequired? | boolean |
throwError? | boolean |
Returns
Function
Defined in
packages/renderer/types/utils/parser.d.ts:4
toString
▸ toString(value
): string
Parameters
Name | Type |
---|---|
value | any |
Returns
string
Defined in
packages/renderer/types/utils/util.d.ts:3
useMask
▸ useMask(): Object
Returns
Object
Name | Type |
---|---|
disabled | Ref <boolean > |
logo | string | undefined |
menus | MenuDataItem [] |
themeSwitchable | boolean | undefined |
title | string |
Defined in
packages/renderer/types/hooks/mask.d.ts:4
useProvider
▸ useProvider(options?
): Provider
Parameters
Name | Type |
---|---|
options? | UseProviderOptions |
Returns
Defined in
packages/renderer/types/provider/provider.d.ts:67