メインコンテンツにジャンプ

Getting Started

ターミナル画面
npm install @capgo/capacitor-pretty-toast
npx cap sync
import { toast } from '@capgo/capacitor-pretty-toast';
toast.success('Saved', {
message: 'Your changes are ready.',
});
const id = toast.loading('Uploading', {
message: 'Waiting for the server response.',
});
setTimeout(() => {
toast.update(id, {
title: 'Upload complete',
message: 'The file was stored successfully.',
icon: 'checkmark.circle.fill',
autoDismiss: true,
});
}, 1500);
await toast.promise(uploadFile(), {
loading: {
title: 'Uploading',
message: 'Keep the app open while the file is sent.',
},
success: 'Uploaded',
error: 'Upload failed',
});

使用 icon シンボル名またはRAW SVG マークアップの場合:

toast.info('New message', {
icon: 'message.fill',
message: 'Open the inbox to reply.',
});

使用 iconSource URIのような画像に対して。絶対ファイルパス、または https://, http://, file://, data:, blob:クリップボードにコピー { uri }.

toast.show({
title: 'Profile updated',
message: 'Your avatar changed.',
iconSource: 'https://example.com/avatar.png',
});

iconSource Getting Startedから続けて icon.

Getting Startedセクション

Capacitorを使用している場合

Getting Started ネイティブ プラグインの作業を計画する場合、Capacitorを接続する Getting Started Capgo プラグイン ディレクトリ Capgo プラグイン ディレクトリの製品ワークフローについて Capacitor プラグイン (Capgo によって提供) Capacitor プラグイン (Capgo によって提供)の実装詳細について プラグインの追加または更新 プラグインの追加または更新の実装詳細について Ionic Enterprise プラグインの代替 Ionic Enterprise プラグインの代替の製品ワークフローについて Capgo ネイティブ ビルド Capgo ネイティブ ビルドの製品ワークフローについて