Skip to main content

LibraryProvider

A required component of the component library, responsible for initializing the environment context of the component library and providing a uniform global configuration for the component

When To Use

  • Required component for component library initialization

Properties

keyvalue typeproperty explanationget source
getPopupContainerfunctionReturns the mount point of the internal mod of the component library
tenantstringtenant keyQianKunProps?.context?.env?.TENANT_KEY
workspaceKeystringspacekeyQianKunProps?.context?.env?.WORKSPACE_KEY
localezh/enlanguageQianKunProps?.context?.env?.LOCALES ? 'en'
teamGatewaystringteam gatewayQianKunProps?.context?.env?.PROXIMA_GATEWAY
teamBasePathstringteam basePathQianKunProps?.context?.env?.PROXIMA_BASE_PATH
item.fetchItemByIdfunctionfetch item by itemIdfetch /parse/api/items/:id/values
workflow.checkTransitionScriptfunctionValidate workflow scriptfetch vm
workflow.fetchRolefunctionGet permission informationfetch /parse/api/permission/user/:workspaceId
workflow.getWorkflowDatafunctionGet item workflow configurationfetch /parse/api/workflows/item/:itemId
workflow.runTransitionfunctionWorkflow transitionfetch Parse.Cloud.run('transition', params)
workflow.getItemStatusfunctionGet item statusfetch Parse.Query(Item)
import {LibraryProvider} from '@giteeteam/apps-team-components';

<LibraryProvider
sessionToken={sessionToken}
getPopupContainer={getContainer}
tenant={TENANT_KEY}
workspaceKey={workspaceKey}
locale={locales}
teamGateway={teamGateway}
teamBasePath={teamBasePath}
item={{fetchItemById}}
workflow={{
checkTransitionScript,
fetchRole,
getWorkflowData,
runTransition,
getItemStatus,
}}
>
</LibraryProvider>