Skip to content

Commit

Permalink
[Bug]: lookup字段有默认值时, 低版本手机、浏览器 新建记录报错. #510
Browse files Browse the repository at this point in the history
  • Loading branch information
yinlianghui committed May 7, 2024
1 parent ae7344b commit 60f10eb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ export async function lookupToAmisSelect(field, readonly, ctx){
var optionsFilters = [["${valueFieldKey}", optionsFiltersOp, []]];
if (defaultValue && !api.data.$term) {
const defaultValueOptionsQueryData = ${JSON.stringify(defaultValueOptionsQueryData)};
const defaultValueOptionsQuery = defaultValueOptionsQueryData?.query?.replace(/^{/,"").replace(/}$/,"");
const defaultValueOptionsQuery = defaultValueOptionsQueryData && defaultValueOptionsQueryData.query && defaultValueOptionsQueryData.query.replace(/^{/,"").replace(/}$/,"");
// 字段值单独请求,没值的时候在请求中返回空
optionsFilters = [["${valueFieldKey}", optionsFiltersOp, defaultValue]];
if(filters.length > 0){
Expand Down

0 comments on commit 60f10eb

Please sign in to comment.