z***@126.com
z***@126.com
  • 发布:2023-08-18 22:43
  • 更新:2025-04-16 10:01
  • 阅读:427

scroll-view组件无法使用refresher插槽

分类:uni-app

页面代码结构:

<template>  
    <view>  
        <scroll-view ... refresher-default-style="none">  

            <template v-slot:refresher>  
                <view class="text-center" style="width:100%">  
                    <tui-divider width="0" background-color="transparent">玩命刷新中...</tui-divider>  
                </view>  
            </template>  

            <template v-slot:default>  
                .........  
            </view>  

        </scroll-view>  

    </view>  

</template>

试图使用refresher插槽自定义下拉刷新的样式。

在H5端展示没有问题,但是打包至安卓端时,报错:[plugin:vite:vue] Codegen node is missing for element/if/for node. Apply appropriate transforms first.

其他情况:

<template v-slot:refresher></template>

只要是被H5、uniapp原生组件包围的,都会这个错,甚至将refresher修改为其他字符串,也会报该错误,但是如果是随意写的一个标签包围,就不会报错。

2023-08-18 22:43 负责人:无 分享
已邀请:
5***@qq.com

5***@qq.com

遇到了同样的问题。。。
这狗屁社区要落寞了吗。。。为什么没有人回答

  • 1***@163.com

    用不了 根本用不了https://gitee.com/caihongyuchy/scroll-view/blob/master/scroll.vue#可以根据这个调试一下 把默认的层级调低 实际还是存在的 只是看不到 然后自己的margin-top 负数上去 虽然很笨的方法 但是真找不到解决办法配合需求

    2024-01-23 20:27

7***@qq.com

7***@qq.com

ios打包也会有这个问题

要回复问题请先登录注册