Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: the vxeUI global configuration does not take effect #4574

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/effects/plugins/src/vxe-table/use-vxe-grid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ const options = computed(() => {
const slotActions = slots['toolbar-actions']?.();
const slotTools = slots['toolbar-tools']?.();

const globalGridConfig = VxeUI?.getConfig()?.grid ?? {};

const forceUseToolbarOptions = showToolbar.value
? {
toolbarConfig: {
Expand All @@ -79,6 +81,7 @@ const options = computed(() => {
{},
forceUseToolbarOptions,
toRaw(gridOptions.value),
globalGridConfig,
),
);

Expand Down Expand Up @@ -205,7 +208,7 @@ async function init() {
}

// form 由 vben-form代替,所以不适配formConfig,这里给出警告
const formConfig = options.value.formConfig;
const formConfig = gridOptions.value?.formConfig;
if (formConfig) {
console.warn(
'[Vben Vxe Table]: The formConfig in the grid is not supported, please use the `formOptions` props',
Expand Down