Open imdap opened 1 week ago
Vben Admin V5
打开modal: 添加参数 点击查询 参数并没有更新
http://localhost:5555/examples/vxe-table/form 可修改playground\src\views\examples\vxe-table\form.vue来快速复现
http://localhost:5555/examples/vxe-table/form
playground\src\views\examples\vxe-table\form.vue
<script lang="ts" setup> import type { VbenFormProps } from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; import { Page, useVbenModal } from '@vben/common-ui'; import { Button, message } from 'ant-design-vue'; import { useVbenVxeGrid } from '#/adapter/vxe-table'; import { getExampleTableApi } from '#/api'; interface RowType { category: string; color: string; id: string; price: string; productName: string; releaseDate: string; } const formOptions: VbenFormProps = { // 默认展开 collapsed: false, schema: [ { component: 'Input', defaultValue: '1', fieldName: 'category', label: 'Category', }, { component: 'Input', fieldName: 'productName', label: 'ProductName', }, { component: 'Input', fieldName: 'price', label: 'Price', }, { component: 'Select', componentProps: { allowClear: true, options: [ { label: 'Color1', value: '1', }, { label: 'Color2', value: '2', }, ], placeholder: '请选择', }, fieldName: 'color', label: 'Color', }, { component: 'DatePicker', fieldName: 'datePicker', label: 'Date', }, ], // 控制表单是否显示折叠按钮 showCollapseButton: true, // 按下回车时是否提交表单 submitOnEnter: false, }; const gridOptions: VxeGridProps<RowType> = { checkboxConfig: { highlight: true, labelField: 'name', }, columns: [ { title: '序号', type: 'seq', width: 50 }, { align: 'left', title: 'Name', type: 'checkbox', width: 100 }, { field: 'category', title: 'Category' }, { field: 'color', title: 'Color' }, { field: 'productName', title: 'Product Name' }, { field: 'price', title: 'Price' }, { field: 'releaseDate', formatter: 'formatDateTime', title: 'Date' }, ], height: 'auto', keepSource: true, pagerConfig: {}, proxyConfig: { ajax: { query: async ({ page }, formValues) => { message.success(`Query params: ${JSON.stringify(formValues)}`); return await getExampleTableApi({ page: page.currentPage, pageSize: page.pageSize, ...formValues, }); }, }, }, }; const [Grid] = useVbenVxeGrid({ formOptions, gridOptions }); const [ModalWithTable, modalApi] = useVbenModal({ title: 'Table Form', }); </script> <template> <Page auto-content-height> <Button @click="modalApi.open">open</Button> <Grid /> <ModalWithTable class="w-[700px]"> <div class="h-[600px]"> <Grid /> </div> </ModalWithTable> </Page> </template>
Binaries: Node: 20.15.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD pnpm: 9.12.2 - ~\AppData\Roaming\npm\pnpm.CMD Browsers: Edge: Chromium (127.0.2651.74) Internet Explorer: 11.0.22621.3527
No response
有处理方法吗
可以用v-if把弹窗来显式销毁&重新挂载来临时解决
Version
Vben Admin V5
Describe the bug?
打开modal: 添加参数 点击查询 参数并没有更新
Reproduction
http://localhost:5555/examples/vxe-table/form
可修改playground\src\views\examples\vxe-table\form.vue
来快速复现System Info
Relevant log output
No response
Validations