• 快应用购物列表组件


    <template>
      <div class="product-list">
        <div class="list-name" if="{{ isName }}">
          <image src="/common/images/show.png"></image>
          <text>今日优选</text>
        </div>
        <!-- <list columns="2" class="list" scrollpage="true">
          <block for="{{ list }}">
            <list-item type="cover" class="cover">
              <div class="panel">
                <div class="panel-cover">
                  <image src="{{ $item.cover }}"></image>
                </div>
                <div class="panel-name">
                  <text>{{ $item.name }}</text>
                </div>
                <div class="panel-info">
                  <div class="panel-info-price">
                    <text class="price">{{ $item.price }}</text>
                    <text class="original">{{ $item.original }}</text>
                  </div>
                  <div class="panel-info-payret"></div>
                </div>
              </div>
            </list-item>
          </block>
        </list> -->
        <div class="list">
          <div class="cover" for="{{ list }}">
            <div class="panel" @click="checkDetail($idx, $item.link)">
              <div class="panel-cover">
                <image src="{{ $item.cover }}"></image>
              </div>
              <div class="panel-name">
                <text>{{ $item.name }}</text>
              </div>
              <div class="panel-info">
                <div class="panel-info-price">
                  <text class="price">{{ $item.price }}</text>
                  <text class="original">{{ $item.original }}</text>
                </div>
                <div class="panel-info-payret"></div>
              </div>
            </div>
          </div>
        </div>
        <div class="list-more" if="{{ isMore }}" onclick="checkMore">
          <text>查看更多</text>
          <image src="/common/images/right.png"></image>
        </div>
      </div>
    </template>
    
    <script>
    export default {
      props: {
        isName: { type: Boolean, default: false },
        isMore: { type: Boolean, default: false },
        list: { type: Array, default: [] }
      },
      checkMore() {
        this.$emit('more')
      },
      checkDetail(index, link) {
        this.$emit('detail', {index: index, link: link})
      }
    }
    </script>
    
    <style lang="less">
    .product-list {
      padding: 0 15px;
      background-color: #ffffff;
      flex-direction: column;
       100%;
      .list-name {
        justify-content: center;
        padding: 35px;
        image {
           38px;
          height: 39px;
        }
        text {
          margin-left: 12px;
          font-size: 32px;
          color: rgba(51,51,51,1);
        }
      }
      .list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
        .cover {
          background-color: rgba(255,255,255,1);
          border-radius: 10px;
          border: 1px solid rgba(0,0,0,0.2);
           330px;
          height: 490px;
          margin-bottom: 30px;
          .panel {
            flex-direction: column;
            .panel-cover {
              image {
                border-top-left-radius: 10px;
                border-top-right-radius: 10px;
                 330px;
                height: 330px;
              }
            }
            .panel-name {
              padding: 20px 20px 0 20px;
              height: 85px;
              align-items: flex-start;
              text {
                font-size: 26px;
                font-weight: 400;
                color: rgba(0,0,0,0.8);
              }
            }
            .panel-info {
              padding: 10px 20px 20px 20px;
              .panel-info-price {
                .price {
                  /* text-decoration: line-through; */
                  color: #F65100;
                  font-size: 30px;
                  font-weight: bold;
                }
                .original {
                  margin-left: 10px;
                  text-decoration: line-through;
                  color: rgba(0,0,0,0.3);
                  font-size: 28px;
                }
              }
            }
          }
        }
      }
      .list-more {
        justify-content: center;
        margin-bottom: 30px;
        text {
          font-size: 28px;
          color: rgba(0, 0, 0, 0.5);
        }
      }
    }
    </style>
    
    
  • 相关阅读:
    2014年10月10号——数据类型之间的转换
    2014年10月9日——语言基础2
    2014年10月9日——语言基础1
    2014年10月8日——进制转换
    js
    SQL的数据类型
    SQL,学习基础2
    SQL数据库的备份和恢复
    用java调用oracle存储过程总结(转)
    用JAVA调用Mysql数据库,数据存储过程的封装与调用;
  • 原文地址:https://www.cnblogs.com/guanhuohuo/p/12526155.html
Copyright © 2020-2023  润新知