😎代码格式化

This commit is contained in:
zuohuaijun 2024-07-10 12:59:32 +08:00
parent 3d3c32084d
commit 1d12c06676
4 changed files with 10 additions and 12 deletions

View File

@ -9,8 +9,7 @@ import 'vxe-table-plugin-element/dist/style.css';
import VxeUI, { VxeComponentSizeType } from 'vxe-pc-ui';
import ExcelJS from 'exceljs';
import { useThemeConfig } from '/@/stores/themeConfig';
const vxeSize:VxeComponentSizeType = useThemeConfig().themeConfig.globalComponentSize == 'small' ? 'mini'
: useThemeConfig().themeConfig.globalComponentSize == 'default' ? 'small' : 'medium';
const vxeSize: VxeComponentSizeType = useThemeConfig().themeConfig.globalComponentSize == 'small' ? 'mini' : useThemeConfig().themeConfig.globalComponentSize == 'default' ? 'small' : 'medium';
export const setupVXETable = (app: App) => {
// 加载插件
@ -109,4 +108,4 @@ export const setupVXETable = (app: App) => {
// app.config.globalProperties.$XPrint = VxeUI.print
// app.config.globalProperties.$XSaveFile = VxeUI.saveFile
// app.config.globalProperties.$XReadFile = VxeUI.readFile
};
};

View File

@ -1,11 +1,10 @@
import { dayjs } from 'element-plus';
import { reactive } from 'vue';
import { VxeGridProps, VxeGridPropTypes,VxeComponentSizeType } from 'vxe-table';
import { VxeGridProps, VxeGridPropTypes, VxeComponentSizeType } from 'vxe-table';
import { useThemeConfig } from '/@/stores/themeConfig';
import { merge } from 'lodash-es';
const vxeSize:VxeComponentSizeType = useThemeConfig().themeConfig.globalComponentSize == 'small' ? 'mini'
: useThemeConfig().themeConfig.globalComponentSize == 'default' ? 'small' : 'medium';
const vxeSize: VxeComponentSizeType = useThemeConfig().themeConfig.globalComponentSize == 'small' ? 'mini' : useThemeConfig().themeConfig.globalComponentSize == 'default' ? 'small' : 'medium';
/**
* @param {String} id ;

View File

@ -122,7 +122,7 @@ const options = useVxeTable<SysConfig>(
// vxeGrid()vxe-table
{
//
proxyConfig: { autoLoad: true, ajax: { query: ({ page, sort }) => handleQueryApi(page, sort) } },
proxyConfig: { autoLoad: true, ajax: { query: ({ page, sort }) => handleQueryApi(page, sort) } },
//
sortConfig: { defaultSort: Local.get(localPageParamKey)?.defaultSort || state.localPageParam.defaultSort },
//

View File

@ -79,7 +79,7 @@
<script lang="ts" setup name="sysMenu">
import { reactive, ref } from 'vue';
import { ElMessageBox, ElMessage } from 'element-plus';
import { VxeGridInstance,VxeGridListeners } from 'vxe-table';
import { VxeGridInstance, VxeGridListeners } from 'vxe-table';
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
import SvgIcon from '/@/components/svgIcon/index.vue';
@ -130,7 +130,7 @@ const options = useVxeTable<SysMenu>(
pagerConfig: { enabled: false },
//
toolbarConfig: { export: false },
treeConfig: { expandAll: false},
treeConfig: { expandAll: false },
}
);
@ -143,7 +143,7 @@ const handleQueryApi = async () => {
//
const handleQuery = async () => {
// vxe-gridcommitProxy(query)
await xGrid.value?.commitProxy('query')
await xGrid.value?.commitProxy('query');
};
//
@ -151,14 +151,14 @@ const resetQuery = async () => {
state.queryParams.title = undefined;
state.queryParams.type = undefined;
// vxe-gridcommitProxy(reload)
await xGrid.value?.commitProxy('reload')
await xGrid.value?.commitProxy('reload');
};
//
const gridEvents: VxeGridListeners<SysMenu> = {
// proxy-config.ajax.query
async proxyQuery() {
state.menuData = xGrid.value?.getTableData().tableData?? []
state.menuData = xGrid.value?.getTableData().tableData ?? [];
},
};