Skip to content

开启 virtualHost 之后,无法获取组件实例 #101

Open
@LeeJim

Description

@LeeJim
// child.js
Component({
  options: {
    virtualHost: true,
  }
})
const id = simulate.load({
  template: `<child class="son" />`,
})
const comp = simulate.render(id);
comp.attach(document.createElement('parent-wrapper'));
const $search = comp.querySelector('.son'); // undefined

相关问题在基础库已经修复,但单测环境没有处理。

https://developers.weixin.qq.com/community/develop/issue/287

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions