fix: 组件重复引入bug

This commit is contained in:
fyy 2025-07-20 20:40:35 +08:00
parent 9a14f9bc77
commit 31c260c8ca

View File

@ -11,7 +11,6 @@ import {
type VxeGridProps
} from '#/adapter/vxe-table';
import { getVxePopupContainer } from '@vben/utils';
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
import {
arrangementExport,
arrangementList,
@ -22,11 +21,7 @@ import type { ArrangementForm } from '#/api/property/attendanceManagement/arrang
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
import { Modal, Popconfirm, Space } from 'ant-design-vue';
const emit = defineEmits<{(e:'changeView',value:boolean):void}>();
const props = defineProps<{
viewMode:'calender' | 'schedule'
}>();
@ -40,25 +35,6 @@ function handleViewModeChange(e: RadioChangeEvent): void {
emit('changeView',e.target.value)
}
const formOptions: VbenFormProps = {
commonConfig: {
labelWidth: 80,
componentProps: {
allowClear: true,
},
},
schema: querySchema(),
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
// RangePicker /
//
// fieldMappingTime: [
// [
// 'createTime',
// ['params[beginTime]', 'params[endTime]'],
// ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'],
// ],
// ],
};
const gridOptions: VxeGridProps = {
checkboxConfig: {
@ -90,10 +66,23 @@ const gridOptions: VxeGridProps = {
keyField: 'id',
},
//
id: 'property-arrangement-index'
id: 'property-arrangement-index',
toolbarConfig: {
//
show: true,
// "/" redo
refresh: false,
// ""
fullscreen: false,
// "" setting
columns: false,
// "" size
size: undefined,
//
// export: false, //
},
};
const [BasicTable, tableApi] = useVbenVxeGrid({
formOptions,
gridOptions,
});
@ -129,7 +118,7 @@ async function handleDelete(row: Required<ArrangementForm>) {
</div>
<div class="flex-1">
<Page :auto-content-height="true">
<BasicTable table-title="排班列表">
<BasicTable >
<template #action="{ row }">
<Space>
<ghost-button
@ -162,4 +151,3 @@ async function handleDelete(row: Required<ArrangementForm>) {
</template>
<style>
</style>