This commit is contained in:
dap
2024-10-07 20:23:55 +08:00
13 changed files with 44 additions and 37 deletions

View File

@@ -20,6 +20,7 @@ export function useVbenVxeGrid(options: VxeGridProps) {
onBeforeUnmount(() => {
api.unmount();
});
api.setState({ ...props, ...attrs });
return () => h(VxeGrid, { ...props, ...attrs, api: extendedApi }, slots);
},
{

View File

@@ -154,7 +154,7 @@ const vbenFormOptions = computed(() => {
},
showCollapseButton: true,
submitButtonOptions: {
text: $t('common.query'),
content: $t('common.query'),
},
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3',
};
@@ -215,7 +215,6 @@ async function init() {
);
}
}
onMounted(() => {
props.api?.mount?.(gridRef.value, formApi);
init();
@@ -246,7 +245,7 @@ onMounted(() => {
<slot :name="slotName" v-bind="slotProps"></slot>
</template>
<template #form>
<div v-if="formOptions" class="relative rounded py-3 pb-6">
<div v-if="formOptions" class="relative rounded py-3 pb-4">
<slot name="form">
<Form v-bind="vbenFormOptions">
<template