mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:53:25 +08:00
uniapp【修复】:万能表单提交,商品模式和复选模式修复值的问题
This commit is contained in:
@@ -343,10 +343,12 @@
|
||||
}
|
||||
|
||||
/** 多选 */
|
||||
const handleChangeChecbox = (e : any, index : number) => {
|
||||
state.formInfo?.items[1]?.checkboxValue.forEach((item : any) => {
|
||||
const handleChangeChecbox = (e : any, index : number) => {
|
||||
state.formInfo?.items[index]?.checkboxValue.forEach((item : any) => {
|
||||
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,
|
||||
value: item.defaultValue.join(',')
|
||||
}
|
||||
} else {
|
||||
} else if(item.type === FormTypeEnum.goods){
|
||||
return {
|
||||
key: item.id,
|
||||
value: JSON.stringify(item.defaultValue)
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
key: item.id,
|
||||
value: item.defaultValue
|
||||
|
||||
Reference in New Issue
Block a user