1***@qq.com
1***@qq.com
  • 发布:2024-03-16 20:55
  • 更新:2025-04-22 10:48
  • 阅读:526

【报Bug】Failed to resolve component: cell-slot

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win10

HBuilderX类型: 正式

HBuilderX版本号: 3.99

手机系统: Android

手机系统版本号: Android 14

手机厂商: 模拟器

手机机型: V2172A

页面类型: nvue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:

Failed to resolve component: cell-slot

预期结果:

<recycle-list v-for="(item, index) in list" :key="index">
<cell-slot>
...
</cell-slot>
</recycle-list>

实际结果:

Failed to resolve component: cell-slot

bug描述:

[Vue warn]: Failed to resolve component: cell-slot

2024-03-16 20:55 负责人:无 分享
已邀请:
6***@qq.com

6***@qq.com

同问。没有人回答吗?

7***@qq.com

7***@qq.com

一样 我也是这个毛病 用都用不了

DCloud_UNI_JBB

DCloud_UNI_JBB

稍等我看下

DCloud_UNI_JBB

DCloud_UNI_JBB

刚刚测试了下,这个组件正常运行了,能提供下复现信息吗

<template>  
    <view class="child-list">  
        <view class="child-item" v-for="(item,index) in list" :key="index"><text>{{item}}</text></view>  
        <recycle-list for="(item, i) in longList" switch="type">  
            <cell-slot case="A">  
                <text>- A {{i}} -</text>  
            </cell-slot>  
            <cell-slot case="B">  
                <text>- B {{i}} -</text>  
            </cell-slot>  
        </recycle-list>  
    </view>  
</template>  

<script>  
    export default {  
        data() {  
            return {  
                list: [1, 2, 3, 4],  
                longList: [{  
                        type: 'A'  
                    },  
                    {  
                        type: 'B'  
                    },  
                    {  
                        type: 'B'  
                    },  
                    {  
                        type: 'A'  
                    },  
                    {  
                        type: 'B'  
                    }  
                ]  
            }  
        }  
    }  
</script>  

<style lang="scss" scoped>  
    .child-list {  
        display: flex;  
        width: 100vw;  

        .child-item {  
            flex: 1;  
            text-align: center;  
            border: 1rpx solid red;  
        }  
    }  
</style>
  • 7***@qq.com

    我是提示cell-slot 这个组件找不到 js-framework.js:5 [Vue warn]: Failed to resolve component: cell-slot

    If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.

    2025-04-15 13:25

  • DCloud_UNI_JBB

    回复 7***@qq.com: 可以发个复现demo吗

    2025-04-15 13:27

  • 7***@qq.com

    回复 DCloud_UNI_JBB: 暂时搞不了 我纯nvue项目 使用就使用不了

    2025-04-15 13:42

  • 2***@qq.com

    回复 DCloud_UNI_JBB: 我在hello-uniapp里跑这个nvue页面是有这个的 [Vue warn]: Failed to resolve component: cell-slot,hx4.57,他只渲染了上面的v-for,但是下面的recycle-list没有渲染

    2025-04-19 17:12

  • 2***@qq.com

    回复 DCloud_UNI_JBB: 你这是在vue页面跑的,而且很明显{{i}}这个插值,i并没有被渲染出来

    2025-04-19 17:17

DCloud_UNI_JBB

DCloud_UNI_JBB

vue3 nvue 暂不支持 recycle-list 组件,文档

要回复问题请先登录注册