Skip to content

Commit

Permalink
chore: add vxe-table toolbar example (#4765)
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb authored Oct 29, 2024
1 parent d23db32 commit e600d78
Show file tree
Hide file tree
Showing 9 changed files with 548 additions and 430 deletions.
1 change: 0 additions & 1 deletion internal/node-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"dayjs": "catalog:",
"execa": "catalog:",
"find-up": "catalog:",
"nanoid": "catalog:",
"ora": "catalog:",
"pkg-types": "catalog:",
"prettier": "catalog:",
Expand Down
2 changes: 0 additions & 2 deletions internal/node-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ export { default as colors } from 'chalk';
export { consola } from 'consola';
export * from 'execa';

export { nanoid } from 'nanoid';

export { default as fs } from 'node:fs/promises';

export { type PackageJson, readPackageJSON } from 'pkg-types';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"node": ">=20.10.0",
"pnpm": ">=9.5.0"
},
"packageManager": "[email protected].2",
"packageManager": "[email protected].3",
"pnpm": {
"peerDependencyRules": {
"allowedVersions": {
Expand Down
15 changes: 8 additions & 7 deletions packages/effects/plugins/src/vxe-table/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ import { useVbenForm } from '@vben-core/form-ui';

import {
VxeButton,
VxeButtonGroup,
VxeCheckbox,

// VxeFormGather,
// VxeForm,
// VxeFormItem,
VxeIcon,
VxeInput,
VxeLoading,
VxeModal,
VxePager,
// VxeList,
// VxeModal,
Expand All @@ -22,7 +24,7 @@ import {
// VxePulldown,
// VxeRadio,
// VxeRadioButton,
// VxeRadioGroup,
VxeRadioGroup,
VxeSelect,
VxeTooltip,
VxeUI,
Expand Down Expand Up @@ -64,13 +66,12 @@ export function initVxeTable() {
VxeUI.component(VxeTable);
VxeUI.component(VxeColumn);
VxeUI.component(VxeColgroup);
VxeUI.component(VxeLoading);
VxeUI.component(VxeGrid);
VxeUI.component(VxeToolbar);

VxeUI.component(VxeButton);
VxeUI.component(VxeButtonGroup);
// VxeUI.component(VxeCheckbox);
// VxeUI.component(VxeButtonGroup);
VxeUI.component(VxeCheckbox);
// VxeUI.component(VxeCheckboxGroup);
VxeUI.component(createVirtualComponent('VxeForm'));
// VxeUI.component(VxeFormGather);
Expand All @@ -79,14 +80,14 @@ export function initVxeTable() {
VxeUI.component(VxeInput);
// VxeUI.component(VxeList);
VxeUI.component(VxeLoading);
// VxeUI.component(VxeModal);
VxeUI.component(VxeModal);
// VxeUI.component(VxeOptgroup);
// VxeUI.component(VxeOption);
VxeUI.component(VxePager);
// VxeUI.component(VxePulldown);
// VxeUI.component(VxeRadio);
// VxeUI.component(VxeRadioButton);
// VxeUI.component(VxeRadioGroup);
VxeUI.component(VxeRadioGroup);
VxeUI.component(VxeSelect);
// VxeUI.component(VxeSwitch);
// VxeUI.component(VxeTextarea);
Expand Down
8 changes: 8 additions & 0 deletions packages/effects/plugins/src/vxe-table/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,11 @@
.vxe-pager--wrapper {
@apply justify-center md:justify-end;
}

.vxe-tools--operate {
@apply ml-3;
}

.vxe-table-custom--checkbox-option:hover {
background: none !important;
}
5 changes: 5 additions & 0 deletions packages/effects/plugins/src/vxe-table/use-vxe-grid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ const options = computed(() => {
toolbarOptions.value,
toRaw(gridOptions.value),
globalGridConfig,
{
// toolbarConfig: {
// tools: [],
// },
} as VxeTableGridProps,
),
);
Expand Down
12 changes: 10 additions & 2 deletions playground/src/views/examples/vxe-table/remote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const gridOptions: VxeGridProps<RowType> = {
],
height: 'auto',
keepSource: true,
pagerConfig: {},
proxyConfig: {
ajax: {
query: async ({ page }) => {
Expand All @@ -44,9 +43,18 @@ const gridOptions: VxeGridProps<RowType> = {
},
},
},
toolbarConfig: {
custom: true,
// export: true,
// import: true,
refresh: true,
zoom: true,
},
};
const [Grid, gridApi] = useVbenVxeGrid({ gridOptions });
const [Grid, gridApi] = useVbenVxeGrid({
gridOptions,
});
</script>

<template>
Expand Down
Loading

0 comments on commit e600d78

Please sign in to comment.