为什么这样不行?
components/ancestor.js (ancestor-component):
Component({ relations: { "./descendant" : { type: "descendant" , linked() { console.log( "linked" ); } } } }); |
components/component.wxml (some-component):
< ancestor-component > < slot /> </ ancestor-component > |
components/descendant.js (descendant-component):
Component({ relations: { "./ancestor" : { type: "ancestor" } } }); |
index.wxml:
< some-component > < descendant-component /> </ some-component > |