|
@@ -7,14 +7,14 @@
|
|
|
#set ($SubJoinColumnName = $subJoinColumn.javaField.substring(0,1).toUpperCase() + ${subJoinColumn.javaField.substring(1)})##首字母大写
|
|
#set ($SubJoinColumnName = $subJoinColumn.javaField.substring(0,1).toUpperCase() + ${subJoinColumn.javaField.substring(1)})##首字母大写
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
|
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
|
|
- import type { VxeTableInstance } from 'vxe-table';
|
|
|
|
|
|
|
+ import type { VxeTableInstance } from '#/adapter/vxe-table';
|
|
|
|
|
|
|
|
import { DictTag } from '#/components/dict-tag';
|
|
import { DictTag } from '#/components/dict-tag';
|
|
|
import { DICT_TYPE, getDictOptions } from '#/utils';
|
|
import { DICT_TYPE, getDictOptions } from '#/utils';
|
|
|
- import { VxeColumn, VxeTable } from 'vxe-table';
|
|
|
|
|
|
|
+ import { VxeColumn, VxeTable } from '#/adapter/vxe-table';
|
|
|
import { reactive,ref, h, nextTick,watch,onMounted } from 'vue';
|
|
import { reactive,ref, h, nextTick,watch,onMounted } from 'vue';
|
|
|
import { cloneDeep, formatDateTime } from '@vben/utils';
|
|
import { cloneDeep, formatDateTime } from '@vben/utils';
|
|
|
- import { ContentWrap } from "#/components/content-wrap";
|
|
|
|
|
|
|
+ import { ContentWrap } from '#/components/content-wrap';
|
|
|
|
|
|
|
|
#if ($table.templateType == 11) ## erp
|
|
#if ($table.templateType == 11) ## erp
|
|
|
import { useVbenModal } from '@vben/common-ui';
|
|
import { useVbenModal } from '@vben/common-ui';
|
|
@@ -26,6 +26,7 @@
|
|
|
import { Plus } from '@vben/icons';
|
|
import { Plus } from '@vben/icons';
|
|
|
import { $t } from '#/locales';
|
|
import { $t } from '#/locales';
|
|
|
import { TableToolbar } from '#/components/table-toolbar';
|
|
import { TableToolbar } from '#/components/table-toolbar';
|
|
|
|
|
+ import { useTableToolbar } from '#/hooks';
|
|
|
#end
|
|
#end
|
|
|
|
|
|
|
|
#if ($table.templateType == 11) ## erp
|
|
#if ($table.templateType == 11) ## erp
|
|
@@ -165,21 +166,10 @@ const resetQuery = () => {
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
#if ($table.templateType == 11) ## erp
|
|
#if ($table.templateType == 11) ## erp
|
|
|
-/** 隐藏搜索栏 */
|
|
|
|
|
-const hiddenSearchBar = ref(false);
|
|
|
|
|
-const tableToolbarRef = ref<InstanceType<typeof TableToolbar>>();
|
|
|
|
|
-const tableRef = ref<VxeTableInstance>();
|
|
|
|
|
-
|
|
|
|
|
/** 初始化 */
|
|
/** 初始化 */
|
|
|
-onMounted(async () => {
|
|
|
|
|
- await getList();
|
|
|
|
|
- await nextTick();
|
|
|
|
|
- // 挂载 toolbar 工具栏
|
|
|
|
|
- const table = tableRef.value;
|
|
|
|
|
- const tableToolbar = tableToolbarRef.value;
|
|
|
|
|
- if (table && tableToolbar) {
|
|
|
|
|
- await table.connect(tableToolbar.getToolbarRef()!);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ getList();
|
|
|
});
|
|
});
|
|
|
#end
|
|
#end
|
|
|
</script>
|
|
</script>
|