mirror of
https://github.com/fugary/simple-element-plus-template.git
synced 2026-02-23 06:37:01 +00:00
bug: 修复部分情况下提交误触发提交问题
This commit is contained in:
@@ -115,6 +115,9 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
if (props.submitByEnter) {
|
if (props.submitByEnter) {
|
||||||
removeEnterFn.value = onKeyStroke('Enter', (event) => {
|
removeEnterFn.value = onKeyStroke('Enter', (event) => {
|
||||||
|
if (event?.target?.tagName === 'TEXTAREA' || event?.target?.isContentEditable) {
|
||||||
|
return
|
||||||
|
}
|
||||||
event?.stopImmediatePropagation()
|
event?.stopImmediatePropagation()
|
||||||
if (form.value) {
|
if (form.value) {
|
||||||
console.info('=========================submitByEnter', formDiv.value)
|
console.info('=========================submitByEnter', formDiv.value)
|
||||||
|
|||||||
Reference in New Issue
Block a user