chore: 优化代码

This commit is contained in:
xlsea
2025-04-23 15:59:45 +08:00
parent 82b6ff6c92
commit 8b237b3f61
21 changed files with 50 additions and 461 deletions

View File

@ -1,7 +1,7 @@
<script setup lang="tsx">
import { ref } from 'vue';
import { NButton, NPopconfirm, NTooltip } from 'naive-ui';
import { useBoolean } from '@sa/hooks';
import { ref } from 'vue';
import { jsonClone } from '@sa/utils';
import {
fetchBatchDeleteGenTable,
@ -10,12 +10,12 @@ import {
fetchGetGenTableList,
fetchSynchGenDbList
} from '@/service/api/tool';
import { $t } from '@/locales';
import { useAppStore } from '@/store/modules/app';
import { useTable, useTableOperate } from '@/hooks/common/table';
import { useDownload } from '@/hooks/business/download';
import { $t } from '@/locales';
import ButtonIcon from '@/components/custom/button-icon.vue';
import SvgIcon from '@/components/custom/svg-icon.vue';
import { useDownload } from '@/hooks/business/download';
import GenTableSearch from './modules/gen-table-search.vue';
import GenTableImportDrawer from './modules/gen-table-import-drawer.vue';
import GenTableOperateDrawer from './modules/gen-table-operate-drawer.vue';

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import { $t } from '@/locales';
import { useNaiveForm } from '@/hooks/common/form';
import { $t } from '@/locales';
defineOptions({
name: 'GenTableDbSearch'

View File

@ -1,9 +1,9 @@
<script setup lang="tsx">
import { watch } from 'vue';
import { fetchGetGenDbList, fetchImportGenTable } from '@/service/api/tool';
import { $t } from '@/locales';
import { useAppStore } from '@/store/modules/app';
import { useTable, useTableOperate } from '@/hooks/common/table';
import { $t } from '@/locales';
import GenTableDbSearch from './gen-table-db-search.vue';
defineOptions({

View File

@ -4,10 +4,6 @@ import type { FormInst, SelectOption } from 'naive-ui';
import { NCheckbox, NInput, NSelect, NTabs } from 'naive-ui';
import { useLoading } from '@sa/hooks';
import { jsonClone } from '@sa/utils';
import { fetchGetDictTypeOption } from '@/service/api/system';
import { fetchGetGenTableInfo, fetchUpdateGenTable } from '@/service/api/tool';
import { $t } from '@/locales';
import { useAppStore } from '@/store/modules/app';
import {
genHtmlTypeOptions,
genJavaTypeOptions,
@ -15,7 +11,11 @@ import {
genTplCategoryOptions,
genTypeOptions
} from '@/constants/business';
import { fetchGetDictTypeOption } from '@/service/api/system';
import { fetchGetGenTableInfo, fetchUpdateGenTable } from '@/service/api/tool';
import { useAppStore } from '@/store/modules/app';
import { useFormRules } from '@/hooks/common/form';
import { $t } from '@/locales';
defineOptions({
name: 'GenTableOperateDrawer'

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { useLoading } from '@sa/hooks';
import { ref, watch } from 'vue';
import { useClipboard } from '@vueuse/core';
import { useLoading } from '@sa/hooks';
import { fetchGetGenPreview } from '@/service/api/tool';
import MonacoEditor from '@/components/common/monaco-editor.vue';

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { ref } from 'vue';
import { $t } from '@/locales';
import { useNaiveForm } from '@/hooks/common/form';
import { $t } from '@/locales';
defineOptions({
name: 'GenTableSearch'