[improvement] unify mixin name (#2795)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { get, camelize } from '..';
|
||||
import locale from '../../locale';
|
||||
|
||||
export default (name: string) => {
|
||||
export const useI18N = (name: string) => {
|
||||
const prefix = camelize(name) + '.';
|
||||
return (path: string, ...args: any[]): string => {
|
||||
const message = get(locale.messages(), prefix + path) || get(locale.messages(), path);
|
||||
|
||||
Reference in New Issue
Block a user