首页 > 其他分享 >uni-app 148朋友圈列表分页功能实现

uni-app 148朋友圈列表分页功能实现

时间:2022-10-14 16:36:38浏览次数:65  
标签:style false navigationBarTitleText 148 pages 朋友圈 enablePullDownRefresh path app


下图是我测试的截图

uni-app 148朋友圈列表分页功能实现_javascript

/pages/find/moments/moments.vue

<template>
<view>
<free-transparent-bar :scrollTop="scrollTop" @clickRight="clickRight"></free-transparent-bar>
<view class="position-relative" style="height: 620rpx;">
<image src="https://douyinzcmcss.oss-cn-shenzhen.aliyuncs.com/shengchengqi/datapic/1.jpg" mode="aspectFill" style="height: 590rpx;" class="bg-secondary w-100"></image>
<image :src="user.avatar || '/static/images/demo/demo6.jpg'" style="width: 120rpx;height:120rpx;right: 30rpx;" mode="" class="bg-secondary rounded position-absolute bottom-0"></image>
<text class="text-white font-md position-absolute" style="bottom: 45rpx;right: 160rpx">{{user.nickname || user.username}}</text>
</view>

<!-- 朋友圈列表样式 -->
<free-moment-list v-for="(item,index) in list" :key='index' :item="item" :index="index" @action="doAction"></free-moment-list>

<!-- 评论框 -->
<free-popup ref="action" bottom transformOrigin="center bottom">
<view style="height: 105rpx;" class="bg-light border-top flex align-center">
<textarea fixed class="bg-white rounded p-2 font-md" style="height: 75rpx;width: 520rpx;" value="" placeholder="" v-model="content" :focus="true"/>
<free-icon-button @click="changeFaceModeal"><text class="iconfont font-lg"></text></free-icon-button>
<free-main-button name="发送" :disabled="content.length===0" @click="send"></free-main-button>
</view>

<!-- 表情包 -->
<scroll-view v-if="faceModal" scroll-y="true" style="height: 350rpx;" class="bg-light flex flex-wrap">
<view class="flex align-center justify-center" hover-class="bg-white" style="width:107rpx;height:107rpx;" v-for="(item,index) in faceList" :key="index" @click="addFace(item)">
<text>{{item}}</text>
</view>
</scroll-view>
</free-popup>

<!-- 上拉加载 -->
<view class="flex align-center justify-center py-5 bg-light" v-if="list.length >= 10">
<text class="text-muted font">{{loadmore}}</text>
</view>
</view>
</template>

<script>
import freeTransparentBar from '@/components/free-ui/free-transparent-bar.vue';
import freeMomentList from '@/components/free-ui/free-moment-list.vue';
import freePopup from '@/components/free-ui/free-popup.vue';
import freeIconButton from '@/components/free-ui/free-icon-button.vue';
import freeMainButton from '@/components/free-ui/free-main-button.vue';
import $H from '@/common/free-lib/request.js';
import { mapState } from 'vuex';
export default {
components:{
freeTransparentBar,
freeMomentList,
freePopup,
freeIconButton,
freeMainButton
},
data() {
return {
content:'',
scrollTop:0,
faceModal:false,
faceList:["

标签:style,false,navigationBarTitleText,148,pages,朋友圈,enablePullDownRefresh,path,app
From: https://blog.51cto.com/u_15565664/5757437

相关文章

  • uni-app 171部分小细节优化
    /pages/mail/user-base/user-base.vue<template><viewclass="page"><!--导航栏--><free-nav-barshowBack:showRight="detail.friend"bgColor="bg-white">......
  • uni-app 188修复弹框问题
    弹框问题/components/free-ui/free-nav-bar.vue<template><view><view:class="getClass"><!--状态栏--><view:style="'height:'+statusBarHeight+'px......
  • uni-app 190扫一扫加入群聊功能(二)
    /pages/chat/scan-add/scan-add.nvue<template><viewclass="page"><!--导航栏--><free-nav-bartitle="加入群聊"showBack:showRight="false"></free-nav-ba......
  • uni-app 24egg.js 基础课
    24.1创建egg.js项目24.2写第一个api接口24.3-24.5router路由相关24.6数据库迁移(一)24.7数据库迁移(二)24.8sequelize模型-新增24.9sequelize模型-批量新增和修改器24.1......
  • uni-app 110清空聊天记录功能
    chat.jsimport$Ufrom"./util.js";import$Hfrom'./request.js';classchat{constructor(arg){this.url=arg.urlthis.isOnline=falsethis.socket=......
  • uni-app 111发送表情包功能
    chat.jsimport$Ufrom"./util.js";import$Hfrom'./request.js';classchat{constructor(arg){this.url=arg.urlthis.isOnline=falsethis.socket=......
  • uni-app 4.7封装头像组件
    创建free-avart.vue文件<template><image:src="src"mode="widthFix":style="getStyle":class="type"></image></template><script>exportdefault{props:{......
  • uni-app 4.10封装聊天列表组件
    聊天组件free-media-list.vue,如下代码<template><viewhover-class="bg-light"><divclass="flexalign-stretch"><viewclass="flexalign-centerjustify-c......
  • uni-app 4.12开发弹出层组件(一)基础架构
    弹框开发<template><viewclass=""><free-nav-bar:title="'微信(100)'":fixed='true'><templatev-slot="title"></template></free-nav-bar><!--......
  • uni-app 4.11封装全局mixin
    封装mixin(free-base.js)import$Timefrom"@/common/free-lib/time.js";exportdefault{filters:{formateTime(value){return$Time.gettime(value);}......