Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skyline模式下无法获取list-builder组件的slot数据 #5103

Open
MinakoKitani opened this issue Aug 21, 2024 · 0 comments
Open

skyline模式下无法获取list-builder组件的slot数据 #5103

MinakoKitani opened this issue Aug 21, 2024 · 0 comments
Labels
mp mini program uni api

Comments

@MinakoKitani
Copy link

MinakoKitani commented Aug 21, 2024

微信小程序启用了skyline渲染模式,其中使用了scroll-view和list-builder组件。
微信小程序官方文档中使用的时候可以通过插槽来指明传入的数据
但是在uniapp不懂怎么使用,按照示例文档用会被过滤掉,没有编译出来

<scroll-view
      class="flex w-full pl-48rpx pr-8rpx flex-1"
      type="custom"
      :scrollY="true"
      :scrollTop="scrollTop"
      :refresherEnabled="true"
      :refresherTriggered="refresherTriggered"
      :showScrollbar="true"
      :enableFlex="true"
      @refresherrefresh="onRefresh"
    >
      <list-builder
        type="dynamic"
        :list="convertList"
        :childCount="convertList.length"
      >
          <view slot:name slot:index>
            {{ item }}
          </view>
          <Paragraph
            :paragraph="item"
            :speakers="speakerInfo"
            :speakerColor="speakerColor"
            :picList="picRenderMap[item.id] || []"
          />
      </list-builder>
    </scroll-view>

编译后结果

<scroll-view
      class="flex w-full pl-48rpx pr-8rpx flex-1"
      type="custom"
      scrollY="{{true}}"
      scrollTop="{{g}}"
      refresherEnabled="{{true}}"
      refresherTriggered="{{h}}"
      showScrollbar="{{true}}"
      enableFlex="{{true}}"
      bindrefresherrefresh="{{i}}"
      ><list-builder type="dynamic" list="{{e}}" childCount="{{f}}"
        ><view slot:name slot:index>{{ c }}</view
        ><paragraph wx:if="{{d}}" u-i="a5d43c0c-1" bind:__l="__l" u-p="{{d}}" /></list-builder
    ></scroll-view>

其中view标签及paragraph 组件都是无法获取到list-builder传递的item及index
猜测是写法错误了,期望有大佬可以帮忙解答下!

@bfc846958672 bfc846958672 added mp mini program uni api labels Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mp mini program uni api
Projects
None yet
Development

No branches or pull requests

2 participants