useTitle
A hook that set title of the page.
代码演示
API
useTitle(title: string, options?: Options);
useTitle(title: string, options?: Options);
Params
Property | Description | Type | Default |
---|---|---|---|
title | Page title | Ref<string> | - |
Options
Property | Description | Type | Default |
---|---|---|---|
restoreOnUnmount | Whether to restore the previous page title when the component is unmounted | boolean | false |