You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
smartbi2/frontend/src/utils/get-page-title.js

16 lines
418 B
JavaScript

4 years ago
import defaultSettings from '@/settings'
import { getSysUI } from '@/utils/auth'
let title = defaultSettings.title || 'Vue Admin Template'
export default function getPageTitle(pageTitle) {
const uiInfo = getSysUI()
if (uiInfo && uiInfo['ui.title'] && uiInfo['ui.title'].paramValue) {
title = uiInfo['ui.title'].paramValue
}
if (pageTitle) {
return `${pageTitle} - ${title}`
}
return `${title}`
}