|
@@ -7,6 +7,7 @@
|
|
:label-width="publicAttr.labelWidth"
|
|
:label-width="publicAttr.labelWidth"
|
|
:rules="rules"
|
|
:rules="rules"
|
|
@submit.prevent
|
|
@submit.prevent
|
|
|
|
+ @keyup.enter="handleKeyDown"
|
|
>
|
|
>
|
|
<div class="flx-col relative">
|
|
<div class="flx-col relative">
|
|
<div class="setting-aside absolute" style="right: 0; z-index: 10" v-if="ifLayoutEditable && !settingStatus">
|
|
<div class="setting-aside absolute" style="right: 0; z-index: 10" v-if="ifLayoutEditable && !settingStatus">
|
|
@@ -2338,6 +2339,18 @@ const getVisibleLength = (data: any) => {
|
|
return data.list.filter((item: any) => item.basicinfo.visible).length;
|
|
return data.list.filter((item: any) => item.basicinfo.visible).length;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+const handleKeyDown = (event: KeyboardEvent) => {
|
|
|
|
+ if (event.key === "Enter") {
|
|
|
|
+ let inputs = formRef.value?.$el.querySelectorAll("input, textarea");
|
|
|
|
+ inputs = Array.from(inputs).filter((input: any) => !input.disabled);
|
|
|
|
+
|
|
|
|
+ const currentIndex = inputs.indexOf(event.target);
|
|
|
|
+ if (currentIndex < inputs.length - 1) {
|
|
|
|
+ inputs[currentIndex + 1].focus();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
defineExpose({
|
|
defineExpose({
|
|
element: formRef,
|
|
element: formRef,
|
|
refresh
|
|
refresh
|