diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index a267e7d4..89511afe 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -84,6 +84,7 @@ "type": "Data Source Type", "status": "Status", "actions": "Actions", + "local_excelcsv": "Local Excel/CSV", "pieces_in_total": "Showing {ms} records", "test_connection": "Test Connection", "check": "check", diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index 6feea927..e752f045 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -86,6 +86,7 @@ }, "ds": { "title": "数据源", + "local_excelcsv": "本地 Excel/CSV", "add": "添加数据源", "delete": "删除数据源", "name": "数据源名称", diff --git a/frontend/src/views/ds/Datasource.vue b/frontend/src/views/ds/Datasource.vue index bc71b28b..82ae6a61 100644 --- a/frontend/src/views/ds/Datasource.vue +++ b/frontend/src/views/ds/Datasource.vue @@ -16,7 +16,7 @@ import { datasourceApi } from '@/api/datasource' import { useEmitt } from '@/utils/useEmitt' import Card from './Card.vue' import DelMessageBox from './DelMessageBox.vue' -import { dsTypeWithImgSort } from './js/ds-type' +import { dsTypeWithImg } from './js/ds-type' import { useI18n } from 'vue-i18n' interface Datasource { @@ -41,7 +41,7 @@ const activeType = ref('') const datasourceFormRef = ref() const datasourceList = shallowRef([] as Datasource[]) -const defaultDatasourceList = shallowRef(dsTypeWithImgSort as (Datasource & { img: string })[]) +const defaultDatasourceList = shallowRef(dsTypeWithImg as (Datasource & { img: string })[]) const currentDefaultDatasource = ref('') const datasourceListWithSearch = computed(() => { diff --git a/frontend/src/views/ds/DatasourceForm.vue b/frontend/src/views/ds/DatasourceForm.vue index 45361224..595baa13 100644 --- a/frontend/src/views/ds/DatasourceForm.vue +++ b/frontend/src/views/ds/DatasourceForm.vue @@ -460,7 +460,19 @@ defineExpose({ class="model-form" :class="(!isCreate || activeStep === 2) && 'edit-form'" > -
{{ activeName }}
+
+ {{ activeName }} + + {{ t('ds.form.support_version') }}:  + 2012+ + 12+ + 5.6+ + 9.6+ + +
- - {{ t('ds.form.support_version') }}:  - 2012+ - 12+ - 5.6+ - 9.6+ -
diff --git a/frontend/src/views/ds/js/ds-type.ts b/frontend/src/views/ds/js/ds-type.ts index fb5052ea..ab10879b 100644 --- a/frontend/src/views/ds/js/ds-type.ts +++ b/frontend/src/views/ds/js/ds-type.ts @@ -3,28 +3,22 @@ import excel from '@/assets/datasource/icon_excel.png' import oracle from '@/assets/datasource/icon_oracle.png' import pg from '@/assets/datasource/icon_PostgreSQL.png' import sqlServer from '@/assets/datasource/icon_SQL_Server.png' +import { i18n } from '@/i18n' +const t = i18n.global.t export const dsType = [ + { label: t('ds.local_excelcsv'), value: 'excel' }, { label: 'MySQL', value: 'mysql' }, - { label: 'PostgreSQL', value: 'pg' }, - { label: 'Microsoft SQL Server', value: 'sqlServer' }, { label: 'Oracle', value: 'oracle' }, - { label: 'Excel/CSV', value: 'excel' }, + { label: 'PostgreSQL', value: 'pg' }, + { label: 'SQL Server', value: 'sqlServer' }, ] export const dsTypeWithImg = [ - { name: '本地 Excel/CSV', type: 'excel', img: excel }, + { name: t('ds.local_excelcsv'), type: 'excel', img: excel }, { name: 'MySQL', type: 'mysql', img: mysql_ds }, - { name: 'SQL Server', type: 'sqlServer', img: sqlServer }, { name: 'Oracle', type: 'oracle', img: oracle }, { name: 'PostgreSQL', type: 'pg', img: pg }, -] - -export const dsTypeWithImgSort = [ - { name: '本地 Excel/CSV', type: 'excel', img: excel }, - { name: 'PostgreSQL', type: 'pg', img: pg }, - { name: 'Oracle', type: 'oracle', img: oracle }, - { name: 'MySQL', type: 'mysql', img: mysql_ds }, { name: 'SQL Server', type: 'sqlServer', img: sqlServer }, ]