feat: 动态更新页面标题
This commit is contained in:
9
src/assets/js/utils.js
Normal file
9
src/assets/js/utils.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import { description as appDesc } from '@package-json';
|
||||
|
||||
/**
|
||||
* @description 更新页面标题
|
||||
* @param {string} title
|
||||
*/
|
||||
export function updateAppTitle(title = '') {
|
||||
document.title = (title ? `${title} - ${appDesc}` : appDesc);
|
||||
}
|
Reference in New Issue
Block a user