From 2026f16743427bcbda46e51eaa089ce0d9cebed4 Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Wed, 25 Sep 2024 18:13:18 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=85=BC=E5=AE=B9=20onLoad=20optio?= =?UTF-8?q?ns=20=E7=B1=BB=E5=9E=8B=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/navigator/new-page/new-page-1.uvue | 2 +- pages/template/list-news/detail/detail.uvue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/API/navigator/new-page/new-page-1.uvue b/pages/API/navigator/new-page/new-page-1.uvue index 7f675542..a67ad2e5 100644 --- a/pages/API/navigator/new-page/new-page-1.uvue +++ b/pages/API/navigator/new-page/new-page-1.uvue @@ -20,7 +20,7 @@ }, onLoad(options : OnLoadOptions) { if (options['data'] != null) { - this.data = options['data']! + this.data = options['data'] as string } }, methods: { diff --git a/pages/template/list-news/detail/detail.uvue b/pages/template/list-news/detail/detail.uvue index 9f160926..b667e567 100644 --- a/pages/template/list-news/detail/detail.uvue +++ b/pages/template/list-news/detail/detail.uvue @@ -23,9 +23,9 @@ } }, onLoad(event : OnLoadOptions) { - this.post_id = event["post_id"] ?? ""; - this.cover = event["cover"] ?? ""; - this.title = event["title"] ?? ""; + this.post_id = event["post_id"] as string ?? ""; + this.cover = event["cover"] as string ?? ""; + this.title = event["title"] as string ?? ""; this.getDetail(); }, methods: { -- GitLab