Closed tiantianliulang closed 7 months ago
暂时先使用request方法进行异步数据填充吧!
正常更新表单的值,需要通过调用表单内部的updateSchema来进行更新,目前我遗漏了将DynamicTable的QueryForm实例方法对外暴露了
已更新 代码变动位置:https://github.com/buqiyuan/vue3-antd-admin/blob/75c9f557b19b00bfd8516246b56e9eeec127dd24/src/components/core/dynamic-table/dynamic-table.vue#L280 使用示例:https://github.com/buqiyuan/vue3-antd-admin/blob/75c9f557b19b00bfd8516246b56e9eeec127dd24/src/views/demos/tables/wzry-table/index.vue#L68
OK 谢谢
tiantianliulang 你的问题解决了吗 我也有这样的问题
onSearch : async (val: string) =>{
const optionSel=[] as Array
const list = await getListApporgcode({ apporgcode: val });
list.list.map((item)=>(
console.log(item),
optionSel.push({ label: item.apporgname, value: item.apporgcode })
));
options: optionSel;
}, 下拉框里不显示
tiantianliulang 你的问题解决了吗 我也有这样的问题 onSearch : async (val: string) =>{ const optionSel=[] as Array const list = await getListApporgcode({ apporgcode: val });
list.list.map((item)=>( console.log(item), optionSel.push({ label: item.apporgname, value: item.apporgcode }) )); options: optionSel;
}, 下拉框里不显示
解决了啊 看上面 作者已经说的很详细了
是在做 新增功能,表单提交时用的,在onSearch : async (val: string) =>{里写的,能显示吗
我输出有值的,但是下拉框里没数据,我的写法有问题嘛,谢谢