jeecgboot / JeecgBoot

🔥「企业级低代码平台」前后端分离架构SpringBoot 2.x/3.x,SpringCloud,Ant Design&Vue3,Mybatis,Shiro,JWT。强大的代码生成器让前后端代码一键生成,无需写任何代码! 引领新的开发模式OnlineCoding->代码生成->手工MERGE,帮助Java项目解决70%重复工作,让开发更关注业务,既能快速提高效率,帮助公司节省成本,同时又不失灵活性。
http://www.jeecg.com
Apache License 2.0
40.19k stars 14.73k forks source link

JSearchSelect组件异步查询不生效 #6681

Closed testnet0 closed 2 months ago

testnet0 commented 3 months ago
版本号:

V3.7.0

问题描述:

JSearchSelect的async异步加载参数现在不生效,即使配置了首次打开下拉框,发起请求获得的也是全部数据:

image
错误截图:

友情提示:

testnet0 commented 3 months ago
image

应该是当第一次打开下拉框的时候,没有拼接keyword和pageSize参数

zhangdaiscott commented 3 months ago

什么接口,这种问题应该是后台接口问题吧

testnet0 commented 3 months ago

什么接口,这种问题应该是后台接口问题吧

接口是:/jeecgboot/sys/dict/getDictItems 前端代码: image

升级前还是可以的,只有在首次加载的时候会没有分页

testnet0 commented 3 months ago

image 第一次打开下拉框的时候,没带分页参数: image

zhangdaiscott commented 3 months ago

你分页参数在哪配置的

testnet0 commented 3 months ago

你分页参数在哪配置的

找到原因了 jeecgboot-vue3/src/components/Form/src/jeecg/components/JSearchSelect.vue 这里的代码有问题,没考虑字典表的情况: options.value.length && initDictCodeData();

修改成了: image

options.value.length && isDictTable.value ? initDictTableData() : initDictCodeData(); 就不会第一次的时候加载全部数据了

zhangdaiscott commented 3 months ago

我们看看

liaozhiyang commented 2 months ago

已修复,下一版本发布。

你本地可按如下进行修复: import { isObject } from '/@/utils/is';

const handleAsyncFocus = () => { (isObject(selectedAsyncValue.value) || selectedAsyncValue.value?.length) && isDictTable.value && props.async && initDictTableData(); attrs.onFocus?.(); };

image