メインコンテンツにスキップ

Getting Started

GitHub

Capgoを使用して、AIツールにスキルを追加できます。以下のコマンドを実行してください:

ターミナル画面
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

次に、以下のプロンプトを使用してください:

Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-pretty-toast` plugin in my project.

手動セットアップを使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の説明を参照してください:

ターミナル画面
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',
});

Use icon for a symbol name or raw SVG markup:

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から続けてくださいセクション

Capgoを使用している場合

Getting Started を使用してネイティブプラグインの作業を計画している場合、__CAPGO_KEEP_0__ プラグインディレクトリと接続してください. Getting Started Capgo Plugin Directory 製品ワークフローについては、Capgo プラグインディレクトリを参照してください。 Capacitor プラグインは、Capgo によって提供されています。 実装詳細については、Capacitor プラグインの Capgo を参照してください。 プラグインの追加または更新 実装詳細については、プラグインの追加または更新を参照してください。 Ionic Enterprise プラグインの代替 製品ワークフローについては、Ionic Enterprise プラグインの代替を参照してください。 Capgo ネイティブビルド 製品ワークフローについては、Capgo ネイティブビルドを参照してください。