• demo_13 基础卡片视图实现


    1. 中部滚动效果图及实现

    1.1 效果图:

     1.2 代码:

     2. 组件开发  基础卡片视图

    效果图:

    2.1 创建list-scroll组件,剪切view及样式代码:

     2.2 创建list-card组件

     样式:

    <style lang="scss" scope>
        .listcard {
            display: flex;
            padding: 10px;
            margin: 10rpx;
            border-radius: 5px;
            box-shadow: 0 0 5px 1px rgba($color: #000000, $alpha: 0.1);
            box-sizing: border-box;
            .listcard-image {
                flex-shrink: 0;
                 60px;
                height: 60px;
                border-radius: 5px;
                overflow: hidden;
                image {
                     100%;
                    height: 100%;
                }
            }
            .listcard-content {
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                padding-left: 10px;
                 100%;
                .listcard-content_title {
                    font-size: 14px;
                    color: #333;
                    font-weight: 400;
                    line-height: 1.2;
                    // 实现两行显示 ...
                    text {
                        overflow: hidden;
                        text-overflow: ellipsis;
                        display: -webkit-box;
                        -webkit-line-clamp: 2;
                        -webkit-box-orient: vertical;
                    }
                }
                .listcard-content_des{
                    display: flex;
                    justify-content: space-between;
                    font-size: 12px;
                    .listcard-content_des-label {
                        display: flex;
                        .listcard-content_des-label-item {
                            padding: 0 5px;
                            margin-right: 5px;
                            border-radius: 15px;
                            color: $mk-base-color;
                            border: 1px solid $mk-base-color;
                        }
                    }
                    .listcard-content_des-browse{
                        color: #999;
                        line-height: 1.5;
                    }
                }
            }
        }
    </style>
  • 相关阅读:
    【Python】脚本运行报错:IndentationError: unindent does not match any outer indentation level
    【托业】【新托业TOEIC新题型真题】学习笔记13-题库四-P7
    【Python】【面试必看】Python笔试题
    【JMeter】【微信好文收藏】Jmeter接口测试实战-有趣的cookie
    【托业】【新托业TOEIC新题型真题】学习笔记12-题库八-P7
    【Mock】mock-server 环境搭建
    【Linux】测试环境如何搭建?
    【Linux】常用指令、ps查看进程、kill杀进程、启动停止tomcat命令、查看日志、查看端口、find查找文件
    【SQL】SQL存储过程相关当前理解。(@temp=……)
    Vue.js+Koa2移动电商 笔记
  • 原文地址:https://www.cnblogs.com/luwei0915/p/13395066.html
Copyright © 2020-2023  润新知