1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| // composables/useGlobal.ts
| import { getCurrentInstance } from 'vue'
|
| export function useGlobal() {
| const instance = getCurrentInstance()
| const $message = instance?.proxy?.$message
| const $http = instance?.proxy?.$http
| const $util = instance?.proxy?.$util
| const $store = instance?.proxy?.$store
| const $storage = instance?.proxy?.$storage
|
| return {
| $message,
| $http,
| $util,
| $store,
| $storage,
| }
| }
|
|