File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 9090 }
9191 ` ` `
9292
93+ ## app .onUnmount () < sup class = " vt-badge" data - text = " 3.5+" / > {#app-onunmount }
94+
95+ アプリケーションがアンマウントされたときに呼び出されるコールバックを登録します。
96+
97+ - ** 型**
98+
99+ ` ` ` ts
100+ interface App {
101+ onUnmount(callback: () => any): void
102+ }
103+ ` ` `
104+
93105## app .component () {#app - component }
94106
95107名称文字列とコンポーネント定義を両方渡す場合、グローバルコンポーネントとして登録し、名称のみ渡す場合、登録済みのコンポーネントを取得します。
@@ -610,3 +622,21 @@ Vue からの実行時警告に対して、カスタムハンドラーを割り
610622 ` ` `
611623
612624- ** 参照** [コンポーネントインスタンス - ` $options ` ](/ api / component - instance #options )
625+
626+ ## app .config .throwUnhandledErrorInProduction < sup class = " vt-badge" data - text = " 3.5+" / > {#app-config-throwunhandlederrorinproduction }
627+
628+ プロダクションモードで未処理のエラーを強制的にスローします。
629+
630+ - ** 型:** ` boolean `
631+
632+ - ** デフォルト:** ` false `
633+
634+ - ** 詳細**
635+
636+ デフォルトでは、Vue アプリケーション内でスローされたが明示的に処理されていないエラーは、開発モードとプロダクションモードで異なる動作をします:
637+
638+ - 開発中は、エラーがスローされ、アプリケーションがクラッシュする可能性があります。これは、エラーを目立たせることで、開発中に気づいて修正できるようにするためです。
639+
640+ - プロダクションでは、エンドユーザーへの影響を最小限に抑えるため、エラーはコンソールにログ出力されるだけです。ただし、これによりプロダクションでのみ発生するエラーがエラー監視サービスで捕捉されない可能性があります。
641+
642+ ` app.config.throwUnhandledErrorInProduction ` を ` true ` に設定することで、プロダクションモードでも未処理のエラーがスローされるようになります。
You can’t perform that action at this time.
0 commit comments