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>
  • 相关阅读:
    51nod1042
    51nod1009
    分库分表Mycat总结
    RocketMQ事务消息实现分析
    RocketMQ消费模式
    mysql中的隐式转换总结
    EXPLAIN用法和结果分析
    MySQL日期时间处理函数总结
    RocketMQ在windows环境下的安装
    深入分析Synchronized原理
  • 原文地址:https://www.cnblogs.com/yangxuming/p/12367027.html
Copyright © 2011-2022 走看看