完成跳转外部链接功能
Former-commit-id: f3efcfeef6aa80e71d58a283c7a012daf7e9b8f3 [formerly f3efcfeef6aa80e71d58a283c7a012daf7e9b8f3 [formerly f3efcfeef6aa80e71d58a283c7a012daf7e9b8f3 [formerly f3efcfeef6aa80e71d58a283c7a012daf7e9b8f3 [formerly 1992b24b60b05040dc05d5560346e588d67e6177 [formerly e739f55c37f694cb22cde32fee3d66745ef80906]]]]] Former-commit-id: 5a431444072fcd4a43866a458173da85d7380a6c Former-commit-id: 51c7bc03498d69ffe207436c0a470e2fd41407a0 Former-commit-id: 6fe58189034659f8c767ddb97fd3d6397f24d7bf [formerly 0b495976f82bf0633b3ded3e28dd1568c14be1ca] Former-commit-id: e6ddea0e2a683272a5a757271442ab62fdfeb5ce Former-commit-id: 07d0fad901b750296655a22fbe2fa29893d33f7c Former-commit-id: 9f718c52da8302b33f3d0c0c80628e6a6a92c4df Former-commit-id: 7b5db07e1542a42a3d0d3af1bca0606db47b5dbb Former-commit-id: 204199da27a137c4d4edde0fc88680810743e771
This commit is contained in:
@@ -17,6 +17,20 @@ util.title = function (titleText) {
|
||||
window.document.title = `${process.env.VUE_APP_TITLE}${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'))
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 判断是否在其内
|
||||
* @param {*} ele element
|
||||
|
||||
Reference in New Issue
Block a user