From 14a8d41403df9b346d910c4d320059c82884067c Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Tue, 12 Dec 2023 19:59:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20globalPropertiesFn=E7=AE=AD=E5=A4=B4?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E5=86=85=E4=B8=8D=E5=8F=AF=E4=BD=BF=E7=94=A8?= =?UTF-8?q?this?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.uts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.uts b/main.uts index f8fa5022..f321b3c4 100644 --- a/main.uts +++ b/main.uts @@ -19,8 +19,8 @@ export function createApp() { str: 'default reactive string', num: 0, bool: false, - }) - app.config.globalProperties.globalPropertiesFn = () : string => { + } as UTSJSONObject) + app.config.globalProperties.globalPropertiesFn = function () : string { console.log('this.globalPropertiesStr', this.globalPropertiesStr) console.log('this.globalPropertiesNum', this.globalPropertiesNum) return `globalPropertiesStr: ${this.globalPropertiesStr}, globalPropertiesNum: ${this.globalPropertiesNum}` @@ -29,4 +29,4 @@ export function createApp() { return { app } -} +} -- GitLab