メニューに進む

Getting Started

GitHub

インストール

インストール

AI-Assisted セットアップを使用してプラグインをインストールすることができます。AIツールに Capgo スキルを追加するには、以下のコマンドを実行してください。

ターミナル
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.

Manual Setup を使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください。

ターミナル
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 __CAPGO_KEEP_0__のシンボル名またはraw SVGマークアップ:

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

URIのような画像の場合使用 iconSource __CAPGO_KEEP_1__、絶対ファイルパス、または 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 Getting Started ネイティブ プラグインの作業を計画するには、 Capgo プラグイン ディレクトリと接続する Capgo プラグイン ディレクトリ内での製品ワークフローについて Capacitor プラグインを Capgo で Capacitor プラグインを Capgo で実装する プラグインの追加または更新 プラグインの追加または更新の実装詳細 Ionic Enterprise プラグインの代替 Ionic Enterprise プラグインの代替の製品ワークフロー Capgo ネイティブ ビルド Capgo ネイティブ ビルドの製品ワークフロー