我有两个视图,logo
和folder
,该文件夹在徽标中被召回,我将检查文件夹是否为空,以便将某些内容发送到徽标视图中。
logo.html
<template>
<require from="company-assets/folders"></require>
<folders resourcetype="logo" loadresources.bind="bindedLoadResources"
isloading.bind="bindedIsLoading" rootitems.bind="rootResources" if.bind="!searchQuery">
</folders>
<ul class="row logos list" if.bind="resourcesList.items.length">
<logo repeat.for="logo of resourcesList.items" item.bind="logo"></logo>
</ul>
<div if.bind="resourcesList.items.length==0 &&
!resourcesList.isLoading || folders.resourcetype" >
<assest-emptyscreens></assest-emptyscreens>
</div>
</template>
folder.html
<template>
<ul class="row folders list mb-30 mt-10" if.bind="!isLoading && hasFolders">
<folder if.bind="resourcetype" repeat.for="folder of foldersList.items"
item.bind="folder" loadfoldercontent.bind="bindedGoToFolder"
isloading.bind="bindedIsLoading" deletedfolder.bind="bindedDeletedFolder">
</folder>
</ul>
<div if.bind="!hasFolders && isRoot && !isLoading" >
Empty
</div>
</template>
我将从文件夹中获取“空”来签入徽标
答案 0 :(得分:0)
通常有两种方法可以在组件之间传递数据。