• 页面布局


    超出隐藏...

    overflow: hidden; word
    -break: break-all; /* break-all(允许在单词内换行。) */ text-overflow: ellipsis; /* 超出部分省略号 */ display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/ -webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/ -webkit-line-clamp: 1; /** 显示的行数 **/
    <view class="btn-box">
        <view class="reset" @tap="resetFilterData(page_index)">重置</view>
        <view class="submit" @tap="setFilterData(page_index)">确定</view>
    </view>

    css:

    .btn-box{
      border-top: 1rpx solid #999;
      flex-shrink: 0;
       100%;
      height: 82rpx;
      flex-direction: row !important;
      align-items: center;
      justify-content: space-between;
      >view {
       50%;
      height: 82rpx;
      align-items: center;
      justify-content: center;
    }
    .reset {
      color: #578EEE;
    }
    .submit {
      color: #fff;
    background-color: #578EEE;
    }
    }




    组件使用

    <list :tab="tabList" :activeIndex="activeIndex" @change="change"></list>


    -------------------------

    <template>
      <swiper class="home-swiper" :current="activeIndex" @change="change">
      <swiper-item v-for="(item ,index) in tab" :key="index" class="swiper-item">
      <list-item :list="listCatchData[index]" :load="load[index]" @loadmore="loadmore"></list-item>
      </swiper-item>

      </swiper>
    </template>

    --------------------------

    import listItem from './list-item.vue'
    export default {
    components: {
      listItem
    },
    props: {
      tab: {
        type: Array,
        default () {
          return []
        }
      },
      activeIndex: {
        type: Number,
        default: 0
      }
    },
    data() {
      return {
        list: [],
        // js 的限制 listCatchData[index] = data
        listCatchData: {},
        load: {},
        pageSize: 10
      };
    },
    watch: {
    tab(newVal) {
    if (newVal.length === 0) return
    this.listCatchData = {}
    this.load = {}
    this.getList(this.activeIndex)
    }
    },
    // onLoad 在页面 ,created 组件
    created() {
    // TODO tab 还没有赋值
    // this.getList(0)
    uni.$on('update_article',()=>{
    this.listCatchData = {}
    this.load = {}
    this.getList(this.activeIndex)
    })
    },
    methods: {
    loadmore() {
    if (this.load[this.activeIndex].loading === 'noMore') return
    this.load[this.activeIndex].page++
    this.getList(this.activeIndex)
    },



     删除线

    <text class="demo">¥6.51</text>


            .demo{ display: inline
    -block; color: #999; font-size: .24rem; background-image: url(data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///5mZmf///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw==); background-repeat: repeat-x; background-position: left center; height: .32rem; line-height: .32rem; }

    ----------------------

    <view class="vueBoxTop">
        <view class="vueBoxTopBox"></view>
    </view>

    //    顶部
            .vueBoxTop{
                 100%;
                height: 500rpx;
                background-color: red;
                background: url('https://sign.myphp.vip/img/avatar/20200508/200508-1588922945692.png')no-repeat top center;
                background-size: 100% 200rpx;
                padding-top: 172rpx;
                //    爱车信息
                .vueBoxTopBox{
                     100%;
                    height:493rpx;
                    background:rgba(255,255,255,1);
                    box-shadow:0rpx 9rpx 19rpx 0rpx rgba(6,0,1,0.09);
                    border-radius:15rpx;
                    background-color: yellow;
                }
            }

    ----------------------

    .

    .

  • 相关阅读:
    你真的了解try{ return }finally{}中的return?
    js删除一个div
    js清空 input file上传文件控件
    获取配置文件数据库名称
    【转】一文搞定web自动化环境常见问题
    【转】使用SHC加密bash脚本程序以及解密
    【转】Python远程调试图文教程 之 Pycharm Remote Debug
    【转】Windows下安装MySQL详细教程
    将安装CentOS虚机的iso设置为yum源
    【算法】java语言求不定长字符串的最长子串和长度
  • 原文地址:https://www.cnblogs.com/vip-deng-vip/p/12832132.html
Copyright © 2020-2023  润新知