From ea2e0a63ef8a43ee554cd940c08172fe9522bc87 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期三, 13 九月 2023 15:28:19 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | 40 +++++++++++++++++++++++++---------------
1 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 12f27cd..7f41850 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -326,12 +326,11 @@
>
<template slot-scope="{ row }">
<el-input v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' ||item.edit == 'refer' )"
- ref="inputRef"
- :id="'inputRef' + row.oid"
+ :ref="'input' + row.oid"
v-show="!AddCellFlag"
v-model="row[item.prop]"
- @blur="saveRows"
- autofocus></el-input>
+ @blur="saveRows(row)"
+ ></el-input>
<el-input-number v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]"
:style="{width:(item.width-10)+'px'}"
controls-position="right"
@@ -456,6 +455,16 @@
}
}
},
+ // editingRows:{
+ // handler(newval,oldval){
+ // if(newval){
+ // const inputElement = document.querySelector(`#inputRef${newval.oid}`);
+ // if (inputElement) {
+ // inputElement.focus();
+ // };
+ // }
+ // }
+ // },
ProData: {
handler(newval, oldval) {
if (newval) {
@@ -1745,7 +1754,6 @@
addsHandler(event) {
this.$refs.referAttrCrud.sort("orderNum");
var ischeck = true;
- console.log('ProData',this.ProData)
this.ProData.forEach((item, index) => {
if ((item.requireFlag && item.requireFlag.toString() == 'true') && (item.readOnlyFlag && item.readOnlyFlag.toString() == 'true')) {
this.$message.warning(item.name + "(" + item.id + ")蹇呰緭鐨勫睘鎬т笉鑳芥槸鍙");
@@ -1809,12 +1817,13 @@
this.editShows = column.property;
this.rowOid = row.oid;
this.CurrentCell = row;
- if(this.editingRows){
- const inputElement = document.querySelector(`#inputRef${row.oid}`);
- if (inputElement) {
- inputElement.focus();
- };
- }
+ this.$nextTick(() => {
+ const inputs = this.$refs['input' + row.oid];
+ const input = inputs && inputs.length > 0 ? inputs[0].$el : null;
+ if (input) {
+ input.focus();
+ }
+ });
if (column.property == 'referConfig') {
this.referConfigVisble = true;
this.referConfigOption = {
@@ -1846,6 +1855,7 @@
this.isShowformulaEdit = true;
} else if (column.property == 'enumString') {
this.enumVisible = true;
+ this.tableData=[];
if (this.CurrentCell.enumString != "") {
this.tableData = JSON.parse(this.CurrentCell.enumString)
return
@@ -1873,10 +1883,10 @@
saveRows() {
this.editingRows = null;
this.editShows = null;
- const inputElement = document.querySelector(`#inputRef${this.CurrentCell.oid}`);
- if (inputElement) {
- inputElement.blur();
- }
+ // const inputElement = document.querySelector(`#inputRef${this.CurrentCell.oid}`);
+ // if (inputElement) {
+ // inputElement.blur();
+ // }
},
// 鏋氫妇娉ㄥ叆娣诲姞涓�琛岀┖鏁版嵁
addRow() {
--
Gitblit v1.10.0