Former-commit-id: 4f1bbdc34a208047aa26a37b3a15034f16463e9d [formerly 4f1bbdc34a208047aa26a37b3a15034f16463e9d [formerly 4f1bbdc34a208047aa26a37b3a15034f16463e9d [formerly 4f1bbdc34a208047aa26a37b3a15034f16463e9d [formerly f10219d0337fc94fcad4a395f634ff82da269a2e [formerly 3c58b53fea597ae0fe5418d44133a7e59ee1441e]]]]] Former-commit-id: 94e99a356571ebf8274954ca601c593e8ea93514 Former-commit-id: 1cab1aa58616e215d1a39f4d6a3a7c2453ca2153 Former-commit-id: ed071e422a123fb3094e88a936724e9c65d70888 [formerly 12d167b90bfde092d7521b4041cee7c656d944b7] Former-commit-id: 42a97fc37840b20ca517afabfa28a24bf557625d Former-commit-id: 764d8f4a94a499abbd2aaa9c3307600c13b78028 Former-commit-id: db598cfc092862c94b8bd859f9b941135c124069 Former-commit-id: 77f5ca3d799fe9d4a8bb9b08e5be79686369e361 Former-commit-id: 18c090ca7aaa651db442c4b41d39ba0543a89944
33 lines
745 B
JavaScript
33 lines
745 B
JavaScript
import log from './util.log.js'
|
|
import cookies from './util.cookies.js'
|
|
|
|
let util = {
|
|
cookies,
|
|
log
|
|
}
|
|
|
|
/**
|
|
* @description 更新标题
|
|
* @param {String} title 标题
|
|
*/
|
|
util.title = function (titleText) {
|
|
const processTitle = process.env.VUE_APP_TITLE || 'D2Admin'
|
|
window.document.title = `${processTitle}${titleText ? ` | ${titleText}` : ''}`
|
|
}
|
|
|
|
/**
|
|
* @description 打开新页面
|
|
* @param {String} url 地址
|
|
*/
|
|
util.open = function (url) {
|
|
var a = document.createElement('a')
|
|
a.setAttribute('href', url)
|
|
a.setAttribute('target', '_blank')
|
|
a.setAttribute('id', 'd2admin-menu-link')
|
|
document.body.appendChild(a)
|
|
a.click()
|
|
document.body.removeChild(document.getElementById('d2admin-menu-link'))
|
|
}
|
|
|
|
export default util
|