|
@ -1008,33 +1008,37 @@ const onChange = (field, cur) => { |
|
|
* @param field 当前操作字段 |
|
|
* @param field 当前操作字段 |
|
|
* @param e |
|
|
* @param e |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
const isOnBlur = ref(true) |
|
|
const onBlur = async (field, e) => { |
|
|
const onBlur = async (field, e) => { |
|
|
let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps |
|
|
// isOnBlur是false的时候证明先走了回车事件,可以不走失去焦点方法,true的时候直接走失去焦点事件 |
|
|
if (formSchemaObj?.enterSearch) { |
|
|
if (isOnBlur.value) {//同时走失去焦点方法bug |
|
|
await FormBlur( |
|
|
let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps |
|
|
field, |
|
|
if (formSchemaObj?.enterSearch) { |
|
|
e, |
|
|
await FormBlur( |
|
|
routeName.value, |
|
|
field, |
|
|
formRef.value, |
|
|
e, |
|
|
props.detailData, |
|
|
routeName.value, |
|
|
formSchemaObj, |
|
|
formRef.value, |
|
|
(list) => { |
|
|
props.detailData, |
|
|
emit('searchTableSuccess', field, formSchemaObj.searchField, list, formRef.value, 'form') |
|
|
formSchemaObj, |
|
|
} |
|
|
(list) => { |
|
|
) |
|
|
emit('searchTableSuccess', field, formSchemaObj.searchField, list, formRef.value, 'form') |
|
|
|
|
|
} |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
if (props.isShowFooterButtton && !props.footButttondata) { |
|
|
if (props.isShowFooterButtton && !props.footButttondata) { |
|
|
Butttondata = [ |
|
|
Butttondata = [ |
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
] |
|
|
] |
|
|
count.value++ |
|
|
count.value++ |
|
|
|
|
|
} |
|
|
|
|
|
sureDisabled.value= false |
|
|
|
|
|
} else { |
|
|
|
|
|
emit('onBlur', field, e) |
|
|
} |
|
|
} |
|
|
sureDisabled.value= false |
|
|
|
|
|
} else { |
|
|
|
|
|
emit('onBlur', field, e) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 批量增加 |
|
|
// 批量增加 |
|
@ -1138,6 +1142,7 @@ const inputStringFcous= (headerItem) => { |
|
|
const onEnter = async (field, value, e) => { |
|
|
const onEnter = async (field, value, e) => { |
|
|
let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps |
|
|
let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps |
|
|
if (formSchemaObj?.enterSearch && formSchemaObj?.isEnter) { |
|
|
if (formSchemaObj?.enterSearch && formSchemaObj?.isEnter) { |
|
|
|
|
|
isOnBlur.value = false//解决回车事件和失去焦点同时调用bug |
|
|
await FormBlur( |
|
|
await FormBlur( |
|
|
field, |
|
|
field, |
|
|
value, |
|
|
value, |
|
@ -1146,7 +1151,10 @@ const onEnter = async (field, value, e) => { |
|
|
props.detailData, |
|
|
props.detailData, |
|
|
formSchemaObj, |
|
|
formSchemaObj, |
|
|
(list) => { |
|
|
(list) => { |
|
|
emit('onEnter', field, value, e) |
|
|
isOnBlur.value = true |
|
|
|
|
|
if (list.length != 0) { |
|
|
|
|
|
emit('onEnter', field, value, e) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
) |
|
|
) |
|
|
} else { |
|
|
} else { |
|
|