From 7a9714e359ac47dc3bafa057cb1e4fe5d292f9c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=9A=E7=90=AA?= Date: Tue, 28 May 2024 15:42:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/get-battery-info/get-battery-info.uvue | 4 ++-- pages/API/request-payment/request-payment.uvue | 2 +- pages/template/browser-canvas/browser-canvas.uvue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/API/get-battery-info/get-battery-info.uvue b/pages/API/get-battery-info/get-battery-info.uvue index e55d296d..870b7269 100644 --- a/pages/API/get-battery-info/get-battery-info.uvue +++ b/pages/API/get-battery-info/get-battery-info.uvue @@ -22,9 +22,9 @@ } }); } catch (e) { - console.error(e.message); + console.error((e as Error).message); uni.showModal({ - content: e.message, + content: (e as Error).message, showCancel: false }); } diff --git a/pages/API/request-payment/request-payment.uvue b/pages/API/request-payment/request-payment.uvue index c2dd5006..923fc124 100644 --- a/pages/API/request-payment/request-payment.uvue +++ b/pages/API/request-payment/request-payment.uvue @@ -119,7 +119,7 @@ }) let url = 'https://demo.dcloud.net.cn/payment/wxpayv3.__UNI__uniappx/?total=0.01' const res = uni.getAppBaseInfo(); - let packageName:string | null + let packageName:string | null = '' // #ifdef APP-ANDROID packageName = res.packageName diff --git a/pages/template/browser-canvas/browser-canvas.uvue b/pages/template/browser-canvas/browser-canvas.uvue index b4d7da7b..d9f47818 100644 --- a/pages/template/browser-canvas/browser-canvas.uvue +++ b/pages/template/browser-canvas/browser-canvas.uvue @@ -21,7 +21,7 @@ onReady() { this.drawing = this.$refs['drawing'] as HTMLElement; this.canvasElement = document.createElement('canvas') as HTMLCanvasElement; - this.canvasElement.className = 'canvas' + this.canvasElement!.className = 'canvas' this.drawing!.appendChild(this.canvasElement) this.canvasContext = this.canvasElement!.getContext('2d') -- GitLab