mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 16:23:26 +08:00
uniapp【修复】:万能表单提交,商品模式和复选模式修复值的问题
This commit is contained in:
@@ -343,10 +343,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 多选 */
|
/** 多选 */
|
||||||
const handleChangeChecbox = (e : any, index : number) => {
|
const handleChangeChecbox = (e : any, index : number) => {
|
||||||
state.formInfo?.items[1]?.checkboxValue.forEach((item : any) => {
|
state.formInfo?.items[index]?.checkboxValue.forEach((item : any) => {
|
||||||
item.checked = e.includes(item.value);
|
item.checked = e.includes(item.value);
|
||||||
});
|
});
|
||||||
|
let arr :any = state.formInfo?.items[index]?.checkboxValue.filter((item:any) => item.checked);
|
||||||
|
state.formInfo.items[index].defaultValue = (arr?.map((item:any) => item.value)).join(',') || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 打开日期选择 */
|
/** 打开日期选择 */
|
||||||
@@ -407,7 +409,12 @@
|
|||||||
key: item.id,
|
key: item.id,
|
||||||
value: item.defaultValue.join(',')
|
value: item.defaultValue.join(',')
|
||||||
}
|
}
|
||||||
} else {
|
} else if(item.type === FormTypeEnum.goods){
|
||||||
|
return {
|
||||||
|
key: item.id,
|
||||||
|
value: JSON.stringify(item.defaultValue)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
return {
|
return {
|
||||||
key: item.id,
|
key: item.id,
|
||||||
value: item.defaultValue
|
value: item.defaultValue
|
||||||
|
|||||||
Reference in New Issue
Block a user