为了账号安全,请及时绑定邮箱和手机立即绑定

【金秋打卡】第8天 全新升级,基于Vue3新标准,打造后台综合解决方案 第八讲

标签:
Vue.js

课程章节: excel 、zip 与前端结合解决方案之用户管理页面实现

主讲老师: Sunday

课程内容:

今天学习的内容包括:

用户管理页面的实现

课程收获:

8.1 心得:

"use strict";
Component({
    properties: {
        list: {
            type: Array,
            value: [],
            observer: "onListChange"
        },
        loadMore: {
            type: Object,
            value: {
                enableLoadMore: false,
                hasMore: true,
            },
            observer: "onLoadMoreChange"
        },
        
    },


    data: {
        enableLoadMore: false,
        hasMore: true,
    },


    methods: {

        onListChange: function onListChange() {
            this.setData({
                list: this.data.list,
            });
        },

        /**
         * list里面item内部点击
         * 可通过e.detail.clickEvent.target知道是Item内部哪个子控件自身点击事件
         * @param {*} e 
         */
        onClickItem: function onClickItem(e) {
            // console.log(e);
            this.triggerEvent('onClickListItem', e.detail);
        },
        
        /**
         * 加载更多控件更新
         */
        onLoadMoreChange: function onLoadMoreChange() {
            this.setData({
                enableLoadMore: this.data.loadMore.enableLoadMore,
                hasMore: this.data.loadMore.hasMore,
            });
        },

    }
});
.container {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.loadmore_parent {
  text-align: center;
  flex-shrink: 0;
  width: 100%;
  background-color: #f8f9fa
}

.loading {
  width: 64rpx;
  height: 64rpx;
  margin-top: 32rpx;
  margin-bottom: 32rpx;
  display: inline-block
}

.loadmore {
  font-size: 14rpx;
  height: 160rpx;
  text-align: center
}

.loadmore, .loadmore-end-container {
  width: 100%
}

.loadmore-end {
  padding-bottom: 48rpx;
  padding-top: 48rpx
}

.loadmore-tip {
  width: auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center
}

.loadmore-end-tip {
  width: auto;
  height: 34rpx;
  font-size: 24rpx;
  line-height: 34rpx;
  margin-right: 14rpx;
  margin-left: 14rpx;
  display: inline-block;
  color: #888;
  flex-shrink: 0
}

.loadmore-end-line {
  width: auto;
  height: 1px;
  flex-grow: 1;
  margin-right: 32rpx;
  margin-left: 32rpx;
  background: #e5e5e5;
  display: inline-block;
  vertical-align: middle
}

图片描述

点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
  • 推荐
  • 评论
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消