Skip to content

Commit 08a1804

Browse files
author
piexlmax
committed
将closeThisPage方法从global迁移到utils
1 parent 87ee53f commit 08a1804

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

web/src/core/global.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
import config from './config'
2-
import { emitter } from '@/utils/bus.js'
32

43
// 统一导入el-icon图标
54
import * as ElIconModules from '@element-plus/icons-vue'
65
// 导入转换图标名称的函数
76

8-
export const closeThisPage = () => {
9-
emitter.emit('closeThisPage')
10-
}
11-
127
export const register = (app) => {
138
// 统一注册el-icon图标
149
for (const iconName in ElIconModules) {

web/src/utils/closeThisPage.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { emitter } from '@/utils/bus.js'
2+
3+
export const closeThisPage = () => {
4+
emitter.emit('closeThisPage')
5+
}

0 commit comments

Comments
 (0)