ijry / uview-plus

零云®uview-plus,是uni-app全面兼容nvue的uni-app生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水。
https://uview-plus.jiangruyi.com
MIT License
434 stars 110 forks source link

up-swiper无法自定义模版内容 #473

Closed leezozz closed 4 weeks ago

leezozz commented 1 month ago
        <up-swiper
            :autoplay="false"
        >
            <view class="">推荐。。。</view>
            <view class="">咨询。。。</view> 
        </up-swiper>
leezozz commented 1 month ago

上面代码在小程序中运行会报错:: display-multiple-items 不能大于 swiper-item 数量。如何自定义模版呢?

ijry commented 4 weeks ago
<up-swiper
          :list="list1"
          @change="change"
          @click="click"
>
<template #default="scope">自定义</template>
</up-swiper>
leezozz commented 4 weeks ago
        <up-swiper
            :autoplay="false"
            :list="testLists"
        >
            <template #default="scope">
                <view class="" v-for="(item) in testLists" :key="index">
                    <text>{{ item }}</text>
                </view>
            </template>
        </up-swiper>
        // 这样修改了,想要显示自定义文本,但是显示:[渲染层网络层错误] Failed to load local image resource /node-modules/uview-plus/components/u-swiper/111 

the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error)