From 622316049f9dca7a48efd616066e632c2a5ec4b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com>
Date: Thu, 30 Dec 2021 21:49:32 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E7=94=9F?=
=?UTF-8?q?=E6=88=90=E7=BC=96=E8=BE=91=E8=A1=A8=E6=A0=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ZR.Vue/src/views/tool/gen/editTable.vue | 33 ++++++++++++++++++-----
ZR.Vue/src/views/tool/gen/genInfoForm.vue | 5 +---
2 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/ZR.Vue/src/views/tool/gen/editTable.vue b/ZR.Vue/src/views/tool/gen/editTable.vue
index f8c3e8f..c5ad9c0 100644
--- a/ZR.Vue/src/views/tool/gen/editTable.vue
+++ b/ZR.Vue/src/views/tool/gen/editTable.vue
@@ -4,13 +4,16 @@
+
+
+
-
+
@@ -90,8 +93,7 @@
-
+
{{ dict.dictName }}
{{ dict.dictType }}
@@ -101,9 +103,6 @@
-
-
-
@@ -210,6 +209,9 @@ export default {
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.push({ path: "/tool/gen", query: { t: Date.now() } });
},
+ /**
+ * 排序保存
+ */
sortTable(columns) {
const el = this.$refs.dragTable.$el.querySelectorAll(
".el-table__body-wrapper > table > tbody"
@@ -229,6 +231,25 @@ export default {
},
});
},
+ /**
+ * 回车到下一行
+ */
+ nextFocus(row, index, e) {
+ // const val = e.target.value;
+ var keyCode = e.keyCode || e.which || e.charCode;
+ if (keyCode === 13) {
+ this.$refs[row.columnId].blur();
+ if (Object.keys(this.$refs).length - 1 === index) {
+ index = -1;
+ }
+ var num = Object.keys(this.$refs)[index + 1];
+ if (num > 0) {
+ this.$refs[num].focus();
+ } else {
+ console.warn("最后一行了");
+ }
+ }
+ },
},
watch: {
columns: {
diff --git a/ZR.Vue/src/views/tool/gen/genInfoForm.vue b/ZR.Vue/src/views/tool/gen/genInfoForm.vue
index 42e8cb2..1c4b753 100644
--- a/ZR.Vue/src/views/tool/gen/genInfoForm.vue
+++ b/ZR.Vue/src/views/tool/gen/genInfoForm.vue
@@ -34,7 +34,7 @@
-
+
@@ -261,9 +261,6 @@ export default {
},
};
},
- created() {
- console.log(this.columns);
- },
watch: {
"info.subTableName": function (val) {
this.setSubTableColumns(val);