zoukankan      html  css  js  c++  java
  • el-table 单元格增加下划线和单击事件

     <el-table-column align="center" type="selection" width="50" />
          <el-table-column
            v-for="column in columns"
            :key="column.prop"
            :show-overflow-tooltip="true"
            header-align="center"
            align="center"
            :prop="column.prop"
            :label="column.label"
            :width="column.width"
            :min-width="column.minWidth"
            :fixed="column.fixed"
            :type="column.type"
            :formatter="column.formatter"
            :sortable="column.sortable==null?true:column.sortable"
          >
            <!-- :sortable="column.sortable==null?true:column.sortable" -->
            <template slot-scope="scope">
              <span v-if="column.options && column.options.length">{{ matchEnumVal(scope.row[column.prop], column.options) }}</span>
              <span v-else-if="column.prop === 'address'">
                <div style="color:red;text-decoration:underline;cursor:pointer;" @click="handleSeeInfo(scope.$index, scope.row)">
                {{scope.row.address }}
               </div></span>
              <span v-else-if="column.prop === 'enableStatus'">{{ scope.row.enableStatus?'启用':'停用' }}</span>
              <span v-else-if="column.prop == 'genMethod'">{{ scope.row.genMethod ==='system' ?'是':'否' }}</span>
              <span v-else>{{ scope.row[column.prop] === true ? '是' : ( scope.row[column.prop] === false ? '否' : scope.row[column.prop]) }}</span>
    
              <!-- <span
                v-else-if="scope.row[column.prop] === true"
              >{{ scope.row.genMethod ==='system' ?'是':'否' }}</span> -->
            </template>
          </el-table-column>
  • 相关阅读:
    数组逆序输出与简单的数据匹配
    冒泡排序及其优化
    类型转换
    Spring学习【Spring】
    logistic回归模型
    决策树算法(3)
    决策树算法(2)
    决策树算法(1)
    朴素贝叶斯算法
    k近邻算法
  • 原文地址:https://www.cnblogs.com/yangxuming/p/12367027.html
Copyright © 2011-2022 走看看