docs: improve demo translating

This commit is contained in:
chenjiahan
2020-12-11 10:07:07 +08:00
parent b3dfb4997f
commit 09858eb1d3
15 changed files with 281 additions and 248 deletions
-8
View File
@@ -1,8 +0,0 @@
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;
}