Skip to content

测试版

这些 App Bridge 组件是新加入的,测试期间,API 可能会在 minor 版本中变更。它们的行为由本地 E2E 测试套件在真实的 Shopify admin 中检查。如有问题,请提交 issue。

App Bridge 类型 ​

App Bridge 各页面用到的类型,以及它们引用的所有类型,均来自 @shopify/app-bridge-types 0.7.5。polaris-vue-elements/app-bridge 重新导出该包所导出的类型。说明是 Shopify 自己的 JSDoc,保留英文。

页面 ​

ShopifyGlobal ​

interface

导入: import type { ShopifyGlobal } from 'polaris-vue-elements/app-bridge'

config: AppBridgeConfig

类型中没有说明。

origin: string

类型中没有说明。

ready: Promise<void>

类型中没有说明。

setSignals(RealSignal: any): void

Registers a signals implementation (e.g. from @preact/signals) so that reactive values returned by App Bridge use the app's own Signal class instead of the built-in lightweight shim. Any signals created before this call are migrated to the provided implementation.

environment: EnvironmentApi

类型中没有说明。

loading: LoadingApi

类型中没有说明。

idToken: IdTokenApi

类型中没有说明。

user: UserApi

类型中没有说明。

toast: ToastApi

类型中没有说明。

resourcePicker: ResourcePickerApi

类型中没有说明。

scanner: ScannerApi

类型中没有说明。

modal: ModalApi

类型中没有说明。

saveBar: SaveBarApi

类型中没有说明。

pos: PosApi

类型中没有说明。

intents: IntentsApi

类型中没有说明。

webVitals: WebVitalsApi

类型中没有说明。

support: SupportApi

类型中没有说明。

reviews: ReviewsApi

类型中没有说明。

appEvents: AppEventsApi

Emits app events for the app's Dev Dashboard.

scopes: Scopes

类型中没有说明。

picker: PickerApi

类型中没有说明。

app: AppApi

类型中没有说明。

shopifyQL: ShopifyQLApi

类型中没有说明。

sidekick: SidekickApi

Start Sidekick conversations for the merchant from your app.

shopify.sidekick is always defined, but its methods reject when Sidekick isn't available to the app, for example in the Shopify mobile app or on a store without Sidekick. Feature-detect with isEnabled() and treat a rejection as unavailable.

tools: Tools

Entry point for Shopify tools.

Enables apps to bind runtime handler functions for tools already declared in app extension configuration, which can be invoked by the platform on behalf of the app. Registered tools are scoped to the current app and persist for the lifetime of the app or until explicitly removed.

用于: useAppBridge()

A–Z 索引 ​

基于 MIT 许可证发布。Vue 标志由 Evan You 设计,采用 CC BY-NC-SA 4.0 许可。