feat: setup composables for vue 2.7 (#9305)

* feat: setup vuelitdate for vue 2.7

* feat: add all composables

* feat: return track method

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Shivam Mishra
2024-04-29 17:00:49 +05:30
committed by GitHub
parent c4eadd12ed
commit 8e9b21820e
6 changed files with 93 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
import { getCurrentInstance } from 'vue';
export const useTrack = () => {
const vm = getCurrentInstance();
if (!vm) throw new Error('must be called in setup');
return vm.proxy.$track;
};
export function useAlert(message, action) {
bus.$emit('newToastMessage', message, action);
}