Skip to content

wxml中的模版表达式解析报错 #116

@as13579e

Description

@as13579e

描述问题 (Describe the bug)

假设有一个组件:
Component({
data: {
obj2:{}
},
})

{{test}} {{obj1.name}} {{obj2.a.b}}

在微信小程序中组件可以正常渲染,但是在星河小程序中渲染层会报错。

复现步骤 (To Reproduce)

打开可复现仓库的中的小程序即可复现错误

复现链接 (Reproduce link)

https://github.com/as13579e/mini-app-demo

预期行为 (Expected behavior)

  1. test、obj1 这种未在 data 中声明的变量也可以在模版中使用,并且vue3可以正常进行依赖收集。
  2. 即使 obj2.a 为 undefined, 模版表达式 {{obj2.a.b}} 也不会报错

截图 (Screenshots)

No response

平台 (Platform)

  • Android
  • iOS
  • Harmony
  • Web

操作系统 (OS)

No response

浏览器/终端 (Browser/Terminal)

No response

其它相关环境信息 (Other info)

No response

补充信息 (Additional context)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions