请选择 进入手机版 | 继续访问电脑版
帖子
帖子
用户
博客
课程
12下一页
返回列表 发新帖
显示全部楼层
157
帖子
1
勋章
3581
Y币

[其他] scroll-view问题,请解答

[复制链接]
发表于 2022-1-25 13:55:07
<scroll-view class="page" scroll-y enable-back-to-top refresher-enabled refresher-triggered={refresherTriggered}  lower-threshold={800}>


threshold  无效,这个应该是距离多少的时候加载,在小程序上面完全失效,到底也不能触发   {800}   "800"  都不行

<scroll-view scroll-x show-scrollbar={false} class="diy_list">
在app
QQ截图20220125135207.jpg
是这样的,正常吧,可以左右滑动

但是在小程序就是这样的,所有的scroll-x都一样
QQ截图20220125135151.jpg


第一次用多端开发,也许技术有限,说实话还不如两次开发太累了
157
帖子
1
勋章
3581
Y币
本帖最后由 jack tang 于 2022-1-25 14:20 编辑

这是常用组件,按理说这个算是低级的问题不会出现的,应该是我不会用,望指点下
lower-threshold={1800}  还是能看到效果的,但这个是滚动条 距离底部的距离还是页面内容距离底部的距离?我怎么感觉是内容的高度距离底部的高度
380
帖子
4
勋章
6
Y币
我们确认一下
10
帖子
1
勋章
5638
Y币
方便提供一下完整的代码吗
包括页面样式
jack tang · 2022-1-25 13:56这是常用组件,按理说这个算是低级的问题不会出现的,应该是我不会用,望指点下
lower-threshold={1800}  还是能看到效果的,但这个是滚动条 距离底部的距离还是页面内容距离底部的距离?我怎么感觉是内容的高度距离 ...
10
帖子
1
勋章
5638
Y币
好像还缺两个组件和一个js哦

157
帖子
1
勋章
3581
Y币
errrrrr
157
帖子
1
勋章
3581
Y币

<template>
<view>
                <!--search-->
                <view class="search_container">
                        <view class="search_box">
                                <image class="search_img" src="../../images/main1/search.png"></image>
                                <input class="search_int" type="text" placeholder="请输入搜索内容" confirm-type="search"
                                        oninput="onInput" onconfirm="search"></input>
                        </view>
                        <text class="search_btn" onclick="cancel">搜索</text>
                </view>

                <!--parent-->
                <view style={"height:"+(this.props.select.first==0?"50px":"100px")}>
                        <scroll-view class="sort" scroll-x scroll-y="false" scroll-enabled bounces show-scrollbar="false">
                                <text class={this.props.select.first==0 ?'catnav_s':'catnav'} style="height:50px;line-height: 50px;" @click="change_cart(0,1)">热门推荐</text>
                                <text v-for="(d,i) in this.props.catnav.parent" style="height:50px;line-height: 50px;" class={this.props.select.first==d.id ?'catnav_s':'catnav'} data-id={d.id}
                                        @click="change_cart(d.id,1)">{d.name}</text>
                        </scroll-view>
                        <!--children -->
                        <scroll-view class="sort" scroll-x scroll-y="false" scroll-enabled bounces show-scrollbar="false"
                                v-if="this.props.select.first !=0 && this.props.catnav.children[String(this.props.select.first)].length>=1">
                                <text v-for="(d,i) in this.props.catnav.children[String(this.props.select.first)]" style="height:30px;line-height: 30px;" class={this.props.select.secend==d.id
                                        ?'catnav_s':'catnav'} data-id={d.id} @click="change_cart(d.id,2)">{d.name}</text>
                        </scroll-view>
                </view>
        </view>
</template>
<script>
export default {
        name: 'list-nav',
    methods: {
    change_cart(id,type){
    this.fire('change_cart', {id:id,type:type});
    }
    }
}
</script>
<style scoped>
/* search */
.search_container {
        flex-direction: row;
        align-items: center;
        height: 44px;
        background-color: #fff;
}
.search_box {
        flex-direction: row;
        align-items: center;
        flex: 1;
        height: 30px;
        background-color: #f5f5f5;
        border-radius: 15px;
        margin-left: 15px;
}
.search_img {
        width: 12px;
        height: 12px;
        margin-left: 13px;
        margin-right: 6px;
}
.search_int {
        flex: 1;
        font-size: 12px;
        color: #333;
        background-color: transparent;
        border: none;
}
.search_btn {
        color: #666;
        font-size: 12px;
        padding: 0 15px;
}
.sort {
        flex-direction: row;
        overflow: hidden;
        padding: 0;
}
.catnav {
        padding: 0 10px;
        font-size: 12px;
        color: rgb(80, 80, 80);
        font-weight: normal;
}
.catnav_s {
        font-weight: bold;
        padding: 0 10px;
        font-size: 12px;
        color: #ff5555;
      
}
</style>




上面那段代码是下方的列表是scroll-y的,在微信上面不能触发分页,上面代码中用的list-nav模板组件就是一个可以横向滚动的代码,但是在小程序上面是竖排排列的
杨永安 · 2022-1-25 15:21好像还缺两个组件和一个js哦
157
帖子
1
勋章
3581
Y币
横向滚动的组件list-nav发上来了   loading组件就是一个显示正在加载的东西,util.js只用了请求跟打开窗口 这个有关系吗?如果有的话 我们可以私聊讨论下下
杨永安 · 2022-1-25 15:21好像还缺两个组件和一个js哦
10
帖子
1
勋章
5638
Y币
util没有影响,提供代码只是为了更快还原现场。

据测试是在长尺寸列表的情况下,计算规则稍微有点问题,问题已经确认,会尽快修复。
jack tang · 2022-1-25 15:26横向滚动的组件list-nav发上来了   loading组件就是一个显示正在加载的东西,util.js只用了请求跟打开窗口 这个有关系吗?如果有的话 我们可以私聊讨论下下
...
157
帖子
1
勋章
3581
Y币
感谢,但长尺寸影响计算规则,这个问题是距离底部触发分页的问题吧?在横向滑动的时候在微信会变成竖向呐?还有在微信不会触发分页  都是这个问题嘛?
杨永安 · 2022-1-25 17:06util没有影响,提供代码只是为了更快还原现场。

据测试是在长尺寸列表的情况下,计算规则稍微有点问题,问题已经确认,会尽快修复。
12下一页
您需要登录后才可以回帖 登录

本版积分规则