@acoustic-content-sdk/react-hbs-edit 中文文档教程

发布于 4年前 浏览 11 更新于 3年前

npm

API 文档

首页 @acoustic-content-sdk/react-hbs-edit

react-hbs-edit package

实用功能的实现和基于车把模板呈现组件并与内联编辑集成的反应组件。

Functions

FunctionDescription
createHandlebarsComponent(aStore, aDeliveryContent, aEditService, aDoc, aLogSvc, aScheduler)Returns a React component that renders the content item passed into its properties. Markup elements annotated with inline edit controls will be registered with the inline edit service.

Interfaces

InterfaceDescription
HandlebarsComponentPropsProperty interface of the handlebars components

Variables

VariableDescription
createMarkupRenderer
VERSIONVersion and build number of the package

Home > @acoustic-content-sdk/react-hbs-edit > createHandlebarsComponent

createHandlebarsComponent() function

返回一个 React 组件,该组件呈现传递到其属性中的内容项。 使用内联编辑控件注释的标记元素将注册到内联编辑服务。

签名:

export declare function createHandlebarsComponent(aStore: ReduxRootStore, aDeliveryContent: DeliveryContentResolver, aEditService: WchInlineEditServiceV2, aDoc: Document, aLogSvc?: LoggerService, aScheduler?: SchedulerLike): ReactComponent<HandlebarsComponentProps>;

Parameters

ParameterTypeDescription
aStoreReduxRootStorethe redux store that contains all metadata
aDeliveryContentDeliveryContentResolver
aEditServiceWchInlineEditServiceV2the edit service
aDocDocumentthe document, used to instantiate a template node
aLogSvcLoggerServiceoptionally a logger service
aSchedulerSchedulerLikeoptionally a scheduler

返回:

ReactComponent

一个基于来自 redux 存储的车把模板呈现内容项的组件

@acoustic-content-sdk/react-hbs-edit > HandlebarsComponentProps

HandlebarsComponentProps interface

Property interface of the handlebars components

Signature:

export interface HandlebarsComponentProps 

Properties

PropertyTypeDescription
contentItemIdstringID of the item to render
layoutModestringOptional layout mode

首页 > @acoustic-content-sdk/react-hbs-edit > createMarkupRenderer

createMarkupRenderer variable

Signature:

createMarkupRenderer: typeof createRendererV2

Home > ; @acoustic-content-sdk/react-hbs-edit > VERSION

VERSION variable

Version and build number of the package

Signature:

VERSION: {
    version: {
        major: string;
        minor: string;
        patch: string;
        branch: string;
    };
    build: Date;
}

首页 > @acoustic-content-sdk/react-hbs-edit > HandlebarsComponentProps > contentItemId

HandlebarsComponentProps.contentItemId property

ID of the item to render

Signature:

contentItemId?: string;

首页 > @acoustic-content-sdk/react-hbs-edit > HandlebarsComponentProps > layoutMode

HandlebarsComponentProps.layoutMode property

可选布局模式

签名:

[KEY_LAYOUT_MODE]?: string;

npm

API Documentation

Home > @acoustic-content-sdk/react-hbs-edit

react-hbs-edit package

Implementation of utility functions and react components that render the component based on handlebars templates and integrate with inline edit.

Functions

FunctionDescription
createHandlebarsComponent(aStore, aDeliveryContent, aEditService, aDoc, aLogSvc, aScheduler)Returns a React component that renders the content item passed into its properties. Markup elements annotated with inline edit controls will be registered with the inline edit service.

Interfaces

InterfaceDescription
HandlebarsComponentPropsProperty interface of the handlebars components

Variables

VariableDescription
createMarkupRenderer
VERSIONVersion and build number of the package

Home > @acoustic-content-sdk/react-hbs-edit > createHandlebarsComponent

createHandlebarsComponent() function

Returns a React component that renders the content item passed into its properties. Markup elements annotated with inline edit controls will be registered with the inline edit service.

Signature:

export declare function createHandlebarsComponent(aStore: ReduxRootStore, aDeliveryContent: DeliveryContentResolver, aEditService: WchInlineEditServiceV2, aDoc: Document, aLogSvc?: LoggerService, aScheduler?: SchedulerLike): ReactComponent<HandlebarsComponentProps>;

Parameters

ParameterTypeDescription
aStoreReduxRootStorethe redux store that contains all metadata
aDeliveryContentDeliveryContentResolver
aEditServiceWchInlineEditServiceV2the edit service
aDocDocumentthe document, used to instantiate a template node
aLogSvcLoggerServiceoptionally a logger service
aSchedulerSchedulerLikeoptionally a scheduler

Returns:

ReactComponent<HandlebarsComponentProps>

a component that renders a content item based on the handlebars templates from the redux store

Home > @acoustic-content-sdk/react-hbs-edit > HandlebarsComponentProps

HandlebarsComponentProps interface

Property interface of the handlebars components

Signature:

export interface HandlebarsComponentProps 

Properties

PropertyTypeDescription
contentItemIdstringID of the item to render
layoutModestringOptional layout mode

Home > @acoustic-content-sdk/react-hbs-edit > createMarkupRenderer

createMarkupRenderer variable

Signature:

createMarkupRenderer: typeof createRendererV2

Home > @acoustic-content-sdk/react-hbs-edit > VERSION

VERSION variable

Version and build number of the package

Signature:

VERSION: {
    version: {
        major: string;
        minor: string;
        patch: string;
        branch: string;
    };
    build: Date;
}

Home > @acoustic-content-sdk/react-hbs-edit > HandlebarsComponentProps > contentItemId

HandlebarsComponentProps.contentItemId property

ID of the item to render

Signature:

contentItemId?: string;

Home > @acoustic-content-sdk/react-hbs-edit > HandlebarsComponentProps > layoutMode

HandlebarsComponentProps.layoutMode property

Optional layout mode

Signature:

[KEY_LAYOUT_MODE]?: string;
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文