dataease-dm/frontend/src/utils/get-page-title.js
2021-05-12 16:58:36 +08:00

16 lines
418 B
JavaScript

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}`
}