Skip to content

Commit

Permalink
refactor: custom useI18n should be used uniformly #105
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Jul 13, 2022
1 parent ec9a6b7 commit 0068b87
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/basic/excel/src/ExportExcelModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useI18n } from 'vue-i18n';
import type { ExportModalResult } from './typing';
import type { FormSchema } from '@/components/core/schema-form/';
import { useI18n } from '@/hooks/useI18n';

import { useFormModal } from '@/hooks/useModal/useFormModal';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { computed, ref, unref, watchEffect } from 'vue';
import { useI18n } from 'vue-i18n';
import { isBoolean, omit } from 'lodash-es';
import { Table } from 'ant-design-vue';
import type { Slots } from 'vue';
import type { DynamicTableProps } from '../dynamic-table';
import type { SchemaFormInstance } from '@/components/core/schema-form';
import type { TableProps } from 'ant-design-vue';
import type { TableColumn } from '../types/column';
import { useI18n } from '@/hooks/useI18n';

export type Pagination = TableProps['pagination'];
export type TableState = ReturnType<typeof useTableState>;
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useI18n.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Composer } from 'vue-i18n';
import type { Composer } from 'vue-i18n';
import { i18n } from '@/locales';

type I18nGlobalTranslation = Composer['t'];
Expand Down
2 changes: 1 addition & 1 deletion src/layout/header/components/fullscreen/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
</template>
<script lang="ts" setup>
import { computed, unref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useFullscreen } from '@vueuse/core';
import { FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons-vue';
import { Tooltip } from 'ant-design-vue';
import { useI18n } from '@/hooks/useI18n';
const { t } = useI18n();
const { toggle, isFullscreen } = useFullscreen();
Expand Down
2 changes: 1 addition & 1 deletion src/locales/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type App } from 'vue';
import { createI18n } from 'vue-i18n';
import { localeMap } from './config';
import { setHtmlPageLang, setLoadLocalePool } from './helper';
import type { App } from 'vue';
import { useLocaleStoreWithOut } from '@/store/modules/locale';

async function createI18nOptions() {
Expand Down

1 comment on commit 0068b87

@vercel
Copy link

@vercel vercel bot commented on 0068b87 Jul 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vue3-antd-admin – ./

vue3-antd-admin.vercel.app
vue3-antd-admin-git-main-buqiyuan.vercel.app
vue3-antd-admin-buqiyuan.vercel.app

Please sign in to comment.