diff --git a/pages/API/get-battery-info/get-battery-info.uvue b/pages/API/get-battery-info/get-battery-info.uvue index e55d296d8d38c0218e77ce15956040fcc8956f1d..870b7269633a41ea82865854b2376b9453f4e995 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 c2dd500663cddc385bfd614b361b6d9f41d0c730..923fc124483d189bc74568399034e724307cd37b 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 b4d7da7bd4ac88a3efcb1195a206317586286c19..d9f47818d87b03c0260fc0791cb5b0d19bf235d5 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')