Select控件/Mention控件远程searchOptions的 bug。
按后端的返回值来看,远程控件只有两个属性api与params,不会存在key。所以搜索条件的字段名会变成undefined。
源代码:/yao-app-sources/xgen-v1.0/packages/xgen/models/remote.ts
尝试修复如下,使用参数中的一个key参数作为搜索字段
https://github.com/wwsheng009/xgen/commit/641745d5b8f544388831f7973619baf53b2c8551
js
async searchOptions(v: string) {
const search = this.raw_props.xProps.search
if (!search) return
const params = {
...search.params,
// [search.key]: v
[search.params?.key]: v
}
}