From 8fba3fccec521fd031a515b08cd2061b16ca25e8 Mon Sep 17 00:00:00 2001 From: lileirjyb Date: Thu, 21 Nov 2024 15:14:53 +0800 Subject: [PATCH] fix: replace string with json for lite expression result Signed-off-by: lileirjyb --- packages/hap-packager/src/post-handler/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/hap-packager/src/post-handler/index.js b/packages/hap-packager/src/post-handler/index.js index 27cd4b0..2ab029f 100644 --- a/packages/hap-packager/src/post-handler/index.js +++ b/packages/hap-packager/src/post-handler/index.js @@ -251,8 +251,8 @@ function getPrefixExpr(expr) { // 表达式是简单标识符,直接返回模板字符串。如: {{ name }} -> {{ name }} return expr } else { - // 表达式为复杂表达式,返回前缀表达式字符串。如: {{ $item.name }} -> "[\".\",[\"$\",\"$item\"],\"name\"]" - return res + // 表达式为复杂表达式,返回前缀表达式字符串。如: {{ $item.name }} -> [".",["$","$item"],"name"] + return parsed } }