在 connector 组件中使用 {{didInsert}} 时出错:“无法在没有 'new' 的情况下调用类构造函数 DidInsertModifier”

It looks like there’s some code missing from your example? I’d expect to see a <template> / </template>, and for the modifier to be attached to an element like

<template>
  <div {{didInsert this.modifyElement}}>
    ...
  </div>
</template>
1 个赞