This commit is contained in:
dap
2024-11-09 16:45:50 +08:00
58 changed files with 1512 additions and 111 deletions

View File

@@ -2,9 +2,7 @@ import type { VxeGridProps, VxeUIExport } from 'vxe-table';
import type { VxeGridApi } from './api';
import { isFunction } from '@vben/utils';
import dayjs from 'dayjs';
import { formatDate, formatDateTime, isFunction } from '@vben/utils';
export function extendProxyOptions(
api: VxeGridApi,
@@ -54,13 +52,13 @@ function extendProxyOption(
export function extendsDefaultFormatter(vxeUI: VxeUIExport) {
vxeUI.formats.add('formatDate', {
tableCellFormatMethod({ cellValue }) {
return dayjs(cellValue).format('YYYY-MM-DD');
return formatDate(cellValue);
},
});
vxeUI.formats.add('formatDateTime', {
tableCellFormatMethod({ cellValue }) {
return dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss');
return formatDateTime(cellValue);
},
});
}

View File

@@ -87,3 +87,11 @@
.vxe-table-custom--checkbox-option:hover {
background: none !important;
}
.vxe-toolbar {
padding-top: 0;
}
.vxe-tools--operate:not(:has(button)) {
margin-left: 0;
}

View File

@@ -1,4 +1,4 @@
import type { DeepPartial } from '@vben/types';
import type { ClassType, DeepPartial } from '@vben/types';
import type { VbenFormProps } from '@vben-core/form-ui';
import type {
VxeGridListeners,
@@ -30,11 +30,11 @@ export interface VxeGridProps {
/**
* 组件class
*/
class?: any;
class?: ClassType;
/**
* vxe-grid class
*/
gridClass?: any;
gridClass?: ClassType;
/**
* vxe-grid 配置
*/

View File

@@ -139,10 +139,6 @@ const options = computed(() => {
mergedOptions.proxyConfig.autoLoad = false;
}
if (!showToolbar.value && mergedOptions.toolbarConfig) {
mergedOptions.toolbarConfig.enabled = false;
}
if (mergedOptions.pagerConfig) {
const mobileLayouts = [
'PrevJump',