Skip to content

Commit d493989

Browse files
committed
fix: 修复virtualHostClass在组合式组件内报错的Bug
1 parent f9d6988 commit d493989

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/uni-mp-compiler/src/transforms/transformClass.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export function rewriteClass(
114114
rewriteExpression(
115115
createCompoundExpression([
116116
`${context.helperString(PARSE_VIRTUAL_HOST_CLASS)}(`,
117-
'this.$scope.data.' + VIRTUAL_HOST_CLASS,
117+
'_ctx.$scope.data.' + VIRTUAL_HOST_CLASS,
118118
`)`,
119119
]),
120120
context

0 commit comments

Comments
 (0)