From 0df15ed47f6e2aa5eb0610890bed7dcbaabc7c92 Mon Sep 17 00:00:00 2001 From: cuiqian2004 <cuiqian2004@163.com> Date: 星期四, 11 七月 2024 17:32:07 +0800 Subject: [PATCH] test --- pages/modal/5601.vue | 51 ++++++++++++++++++++++++++++++++++----------------- 1 files changed, 34 insertions(+), 17 deletions(-) diff --git a/pages/modal/5601.vue b/pages/modal/5601.vue index 08b41f4..1bfc358 100644 --- a/pages/modal/5601.vue +++ b/pages/modal/5601.vue @@ -17,7 +17,8 @@ :style="{'padding-left':item.setting.prefix?0 : '8rpx','right':item.setting.suffix?0 : '8rpx'}" :type="item.name=='Input'?'text':'number'" v-model="item.value" :disabled="item.disabled" :placeholder="item.placeholder" :focus="focusFieldId == item.fieldId" @focus="ontap(item)" - @keyup.enter="onEnterChange(item)" @blur="onEnterChange(item)" /> + @click="onClick(item)" @keyup.enter="onEnterChange(item)" + @blur="onEnterChange(item)" /> <text v-if="item.setting.suffix" class="uni-icon" :class="[item.setting.suffix]" @click="onEnterChange(item)"></text> </view> @@ -39,7 +40,8 @@ :type="col.name=='Input'?'text':'number'" v-model="col.value" :disabled="col.disabled" :placeholder="col.placeholder" :focus="focusFieldId == col.fieldId" @focus="ontap(col)" - @keyup.enter="onEnterChange(col)" @blur="onEnterChange(col)" /> + @click="onClick(col)" @keyup.enter="onEnterChange(col)" + @blur="onEnterChange(col)" /> <text v-if="col.setting.suffix" class="uni-icon" :class="[col.setting.suffix]" @click="onEnterChange(col)"></text> </view> @@ -444,7 +446,9 @@ }); }); }, - + onClick(item) { + this.focusFieldId = item.fieldId + }, ontap(item) { //鎵爜鍔熻兘 // var $ele = e; //console.log(e.target) @@ -528,6 +532,7 @@ } }) }, + onEnterChange(item) { //鍥炶溅锛岀偣鍑绘寜閽紝鍙栨秷鑺傜偣浜嬩欢 console.log(item); if (item.oldvalue != item.value) { @@ -661,12 +666,18 @@ if (result.ret != 0) { var tip = result.err_info ? typeof result.err_info == 'string' ? result .err_info : result.err_info.join('<br/>') : ''; - if (result.ret == 801) uni.showModal({ - title: this.translateSys('tip'), - content: tip, - showCancel: false, - confirmText: this.translateSys("cancel") - }); + if (result.ret == 801){ + if (this.param.Only_Script_Error) { + let pos = tip.indexOf("锛�); + if (pos > -1) tip = tip.substring(pos + 1); + } + uni.showModal({ + title: this.translateSys("tip"), + content: tip, + showCancel: false, + confirmText: this.translateSys("cancel") + }); + } else uni.showModal({ title: this.translateSys('tip'), content: tip + ',' + this.translateSys('tip') + ':' + result @@ -736,7 +747,7 @@ // value = {"page_name":"鐮佺洏涓�, "row":{"id":"xx"}} var value = item.value; const pageData = $this.pageDetail.find((page) => { - return value.page_name == page.Name; + return value.page_name == page.Name; }); if (pageData?.DefList) { pageData.DefList.forEach(ele => { @@ -778,7 +789,7 @@ "remove_subtable_page_row") { //娓呴櫎闈㈡澘涓寚瀹歩d鐨勬暟鎹� var value = item.value; const pageData = $this.pageDetail.find((page) => { - return value.page_name == page.Name; + return value.page_name == page.Name; }); if (pageData ?.DefList @@ -1411,12 +1422,18 @@ var tip = result.err_info ? typeof result .err_info == 'string' ? result.err_info : result.err_info.join('<br/>') : ''; - if (result.ret == 801) uni.showModal({ - title: this.translateSys('tip'), - content: tip, - showCancel: false, - confirmText: this.translateSys("cancel") - }); + if (result.ret == 801) { + if (this.param.Only_Script_Error) { + let pos = tip.indexOf("锛�); + if (pos > -1) tip = tip.substring(pos + 1); + } + uni.showModal({ + title: this.translateSys("tip"), + content: tip, + showCancel: false, + confirmText: this.translateSys("cancel") + }); + } else uni.showModal({ title: this.translateSys('tip'), content: tip + ',' + this.translateSys('tip') + ':' + result.ret, -- Gitblit v1.9.1