From 84d102b534d7190d930712e48aa42a047027757d Mon Sep 17 00:00:00 2001 From: bayanxing Date: Tue, 8 Feb 2022 16:19:39 +0800 Subject: [PATCH] =?UTF-8?q?codecheck=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: bayanxing --- .../main/js/default/pages/picker/index.hml | 10 ++--- .../src/main/js/default/pages/picker/index.js | 31 ++++++------- .../main/js/default/pages/qrcode/index.hml | 14 +++--- .../src/main/js/default/pages/qrcode/index.js | 43 +++++++++++++------ 4 files changed, 55 insertions(+), 43 deletions(-) diff --git a/ace/ace_standard/src/main/js/default/pages/picker/index.hml b/ace/ace_standard/src/main/js/default/pages/picker/index.hml index acc7c4eb1..e7aa03846 100644 --- a/ace/ace_standard/src/main/js/default/pages/picker/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/picker/index.hml @@ -6,17 +6,17 @@ + oncancel="textOnCancel" class="pickertext"> + onchange="dateOnchange" oncancel="dateOnCancel" class="pickerdate" show="true"> + onchange="timeOnchange" oncancel="timeOnCancel" class="pickertime" show="true"> + onchange="datetimeOnchange" oncancel="datetimeOnCancel" class="pickerdatetime" show="true"> + onchange="multiTextOnchange" oncancel="multiTextOnCancel" class="pickermuitl" show="true"> \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/picker/index.js b/ace/ace_standard/src/main/js/default/pages/picker/index.js index 76202558d..4a9c975b2 100644 --- a/ace/ace_standard/src/main/js/default/pages/picker/index.js +++ b/ace/ace_standard/src/main/js/default/pages/picker/index.js @@ -42,17 +42,17 @@ export default { this.textvalue = e.newValue; prompt.showToast({ message:"text:"+e.newValue+",newSelected:"+e.newSelected }) }, - textoncancel(e) { - prompt.showToast({ message:"text: textoncancel" }) + textOnCancel(e) { + prompt.showToast({ message:"text: textOnCancel" }) }, - dateonchange(e) { + dateOnchange(e) { this.datevalue = e.year + "-" + e.month + "-" + e.day; prompt.showToast({ message:"date:"+e.year+"-"+(e.month+1)+"-"+e.day }) }, - dateoncancel() { - prompt.showToast({ message:"date: dateoncancel" }) + dateOnCancel() { + prompt.showToast({ message:"date: dateOnCancel" }) }, - timeonchange(e) { + timeOnchange(e) { if(this.containsecond){ this.timevalue=e.hour+":"+e.minute+":"+e.second; prompt.showToast({ message:"Time:" + e.hour + ":" + e.minute + ":" + e.second }) @@ -60,24 +60,21 @@ export default { this.timevalue=e.hour+":"+e.minute; prompt.showToast({ message:"Time:" + e.hour + ":" + e.minute }) }}, - timeoncancel() { - prompt.showToast({ message:"timeoncancel" }) + timeOnCancel() { + prompt.showToast({ message:"timeOnCancel" }) }, - datetimeonchange(e) { + datetimeOnchange(e) { this.datetimevalue=e.year+"-"+e.month+"-"+e.day+" "+e.hour+":"+e.minute; prompt.showToast({ message:"Time:"+(e.month+1)+"-"+e.day+" "+e.hour+":"+e.minute }) }, - datetimeoncancel() { - prompt.showToast({ message:"datetimeoncancel" }) + datetimeOnCancel() { + prompt.showToast({ message:"datetimeOnCancel" }) }, - multitextonchange(e) { + multiTextOnchange(e) { this.multitextvalue=e.newValue; prompt.showToast({ message:"Multi-column text change" + e.newValue }) }, - multitextoncancel() { - prompt.showToast({ message:"multitextoncancel" }) - }, - popup_picker() { - this.$element("picker_text").show(); + multiTextOnCancel() { + prompt.showToast({ message:"multiTextOnCancel" }) }, } \ No newline at end of file diff --git a/ace/ace_standard/src/main/js/default/pages/qrcode/index.hml b/ace/ace_standard/src/main/js/default/pages/qrcode/index.hml index aaad9991a..c6c88b1a3 100644 --- a/ace/ace_standard/src/main/js/default/pages/qrcode/index.hml +++ b/ace/ace_standard/src/main/js/default/pages/qrcode/index.hml @@ -1,14 +1,14 @@
- + Type - + Color - + Background Color - +
diff --git a/ace/ace_standard/src/main/js/default/pages/qrcode/index.js b/ace/ace_standard/src/main/js/default/pages/qrcode/index.js index f2e83daf8..7097ca65e 100644 --- a/ace/ace_standard/src/main/js/default/pages/qrcode/index.js +++ b/ace/ace_standard/src/main/js/default/pages/qrcode/index.js @@ -1,26 +1,41 @@ +/** + * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export default { data: { - qr_Type: 'rect', - qr_Size: '300px', - qr_Col: '#87ceeb', - col_List: ['#87ceeb','#fa8072','#da70d6','#80ff00ff','#00ff00ff'], - qr_BCol: '#f0ffff', - bCol_List: ['#f0ffff','#ffffe0','#d8bfd8'] + qrType: 'rect', + qrSize: '300px', + qrCol: '#87ceeb', + colList: ['#87ceeb','#fa8072','#da70d6','#80ff00ff','#00ff00ff'], + qrBCol: '#f0ffff', + bColList: ['#f0ffff','#ffffe0','#d8bfd8'] }, - settype(e) { + setType(e) { if (e.checked) { - this.qr_Type = 'rect' + this.qrType = 'rect' } else { - this.qr_Type = 'circle' + this.qrType = 'circle' } }, setvalue(e) { - this.qr_Value = e.newValue + this.qrValue = e.newValue }, - setcol(e) { - this.qr_Col = e.newValue + setCol(e) { + this.qrCol = e.newValue }, - setbcol(e) { - this.qr_BCol = e.newValue + setBCol(e) { + this.qrBCol = e.newValue } } \ No newline at end of file -- GitLab