chore: add useTranslate
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import { noop } from '../utils';
|
||||
import { createTranslate } from '../utils/create/translate';
|
||||
|
||||
export function useTranslate() {
|
||||
const { name } = getCurrentInstance()!.type;
|
||||
return name ? createTranslate(name) : noop;
|
||||
}
|
||||
Reference in New Issue
Block a user