Skip to content

Beta

Các component App Bridge này còn mới, và API có thể thay đổi ở bản phát hành minor trong giai đoạn beta. Hành vi của chúng được kiểm tra trong Shopify admin thật bằng một bộ E2E chạy cục bộ. Nếu có gì không hoạt động, hãy mở issue.

Các type App Bridge ​

Các type được dùng trên các trang App Bridge, cùng mọi type mà chúng tham chiếu, lấy từ @shopify/app-bridge-types 0.7.5. polaris-vue-elements/app-bridge re-export những type mà package export. Phần mô tả là JSDoc của chính Shopify, giữ nguyên tiếng Anh.

Các trang ​

ShopifyGlobal ​

interface

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

config: AppBridgeConfig

Không được mô tả trong type.

origin: string

Không được mô tả trong type.

ready: Promise<void>

Không được mô tả trong type.

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

Không được mô tả trong type.

loading: LoadingApi

Không được mô tả trong type.

idToken: IdTokenApi

Không được mô tả trong type.

user: UserApi

Không được mô tả trong type.

toast: ToastApi

Không được mô tả trong type.

resourcePicker: ResourcePickerApi

Không được mô tả trong type.

scanner: ScannerApi

Không được mô tả trong type.

modal: ModalApi

Không được mô tả trong type.

saveBar: SaveBarApi

Không được mô tả trong type.

pos: PosApi

Không được mô tả trong type.

intents: IntentsApi

Không được mô tả trong type.

webVitals: WebVitalsApi

Không được mô tả trong type.

support: SupportApi

Không được mô tả trong type.

reviews: ReviewsApi

Không được mô tả trong type.

appEvents: AppEventsApi

Emits app events for the app's Dev Dashboard.

scopes: Scopes

Không được mô tả trong type.

picker: PickerApi

Không được mô tả trong type.

app: AppApi

Không được mô tả trong type.

shopifyQL: ShopifyQLApi

Không được mô tả trong type.

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.

Được dùng trong: useAppBridge()

Chỉ mục A–Z ​

Phát hành theo giấy phép MIT. Logo Vue của Evan You, CC BY-NC-SA 4.0.