在本地文本vue中,是否可以在另一个组件中包含一个组件?亲生父子
如下所示:
<Frame ~mainContent>
<Page>
<ActionBar title="Initial Page" style="color:white">
<NavigationButton icon="res://menu" @tap="openMenu"></NavigationButton>
</ActionBar>
<StackLayout>
<son-component></son-component>
</StackLayout>
</Page>
</Frame>发布于 2020-03-25 15:53:38
这样就行了。您需要注册子组件。
<Frame ~mainContent>
<Page>
<ActionBar title="Initial Page" style="color:white">
<NavigationButton icon="res://menu" @tap="openMenu"></NavigationButton>
</ActionBar>
<StackLayout>
<Son></Son>
</StackLayout>
</Page>
</Frame>
<script >
import Son from "./son-component";
export default {
components: {
Son,
},
props: {
},
data() {
}
}
</script>https://stackoverflow.com/questions/60804622
复制相似问题