zoukankan      html  css  js  c++  java
  • vue 前端用法汇总二

    一、列表中el-table用法

    1、字数超长之后用点显示属性

    show-overflow-tooltip
    2、固定列
     <el-table-column fixed="right" label="操作" width="120">
    fixed="right" 固定在右边 left  固定在左边
    3、字体居中 align="center"
     <el-table-column prop="totalPersonCount" label="总数" align="center">
    4、大于当前日期不允许选择
     <el-form-item prop="yearMonth" label="上报年月">
             <el-date-picker v-model="addForm.yearMonth" type="month" :picker-options="expireTimeOption" placeholder="请选择上报年月" style="100%;" value-format="yyyy-MM" />
    </el-form-item>
      data() {
        return {
          // 只能选择之前的数据,不允许选择之后的数据
          expireTimeOption:{
            disabledDate(date){
              return date.getTime() > Date.now();
            }
          },
     }
    }
    5、输入框后面带有单位
    <el-form-item label="总数" prop="totalCount">
          <el-input v-model="addForm.totalCount" type="number" :min="0" maxlength="11" placeholder="请输入总数"><template slot="append">支</template></el-input>
    </el-form-item>

     6、列表中根据值的大小进行颜色的区分显示,如果为0 用红色标红

    <el-table-column prop="officialCount" label="办公室人员数" width="100" align="center">
                    <template slot-scope="scope">
                      <span :style="{'color':scope.row.officialCount ===0 ?'red':'#606266'}">{{ scope.row.officialCount }}</span>
                    </template>
     </el-table-column>
  • 相关阅读:
    一个简单的爬虫case2
    一个简单的爬虫case1
    Kick Start 2018-Round H-Problem C. Let Me Count The Ways
    Kick Start 2018-Round H-Problem B. Mural
    Kick Start 2018-Round H-Problem A. Big Buttons
    211. Add and Search Word
    HDU-1506 Largest Rectangle in a Histogram
    HDU-1236 排名
    HDU-1009 FatMouse' Trade
    HDU-1231 最大连续子序列
  • 原文地址:https://www.cnblogs.com/flyShare/p/15686703.html
Copyright © 2011-2022 走看看