mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-05 03:05:07 +08:00
fix(plugin-locale):修复导出函数t
This commit is contained in:
parent
c180b3fa4c
commit
032b5d464c
@ -80,9 +80,7 @@ const install = (app) => {
|
||||
app.use(i18n);
|
||||
};
|
||||
|
||||
const t = (key) => {
|
||||
return i18n.global.t(key)
|
||||
}
|
||||
const t = i18n.global.t;
|
||||
|
||||
const locale = {
|
||||
setLocale,
|
||||
|
3
packages/fes-plugin-locale/types.d.ts
vendored
3
packages/fes-plugin-locale/types.d.ts
vendored
@ -1,3 +1,5 @@
|
||||
import type { VueI18n } from 'vue-i18n';
|
||||
|
||||
export { useI18n } from 'vue-i18n';
|
||||
|
||||
export const locale: {
|
||||
@ -5,6 +7,7 @@ export const locale: {
|
||||
addLocale: ({ locale, messages }: { locale: string; messages: object }) => void;
|
||||
getAllLocales: () => string[];
|
||||
messages: Record<string, object>;
|
||||
t: VueI18n['t'];
|
||||
};
|
||||
|
||||
declare module '@fesjs/fes' {
|
||||
|
Loading…
x
Reference in New Issue
Block a user