• el-table简单写法


    1. <el-table
    2. :data="tableData"
    3. v-loading="loadingFlag"
    4. :height="heightMounted"
    5. style="width: 100%; maxheight: 590px"
    6. class="scrollbar-style"
    7. :header-cell-style="{ background: '#FAFAFA' }"
    8. >
    9. <template slot="empty">
    10. <img
    11. src="../../assets/nodata.png"
    12. alt="暂无数据"
    13. style="margin-top: 50px"
    14. />
    15. <p
    16. style="padding: 0; margin: 0; margin-top: -35px; margin-bottom: 20px"
    17. >
    18. 暂无数据
    19. </p>
    20. </template>
    21. <el-table-column
    22. prop="name1"
    23. label="项目1"
    24. width="300"
    25. show-overflow-tooltip
    26. >
    27. </el-table-column>
    28. <el-table-column
    29. prop="name2"
    30. label="项目2"
    31. width="240"
    32. show-overflow-tooltip
    33. >
    34. </el-table-column>
    35. <el-table-column
    36. prop="name3"
    37. label="项目3"
    38. width="240"
    39. show-overflow-tooltip
    40. >
    41. </el-table-column>
    42. <el-table-column prop="expense" label="价格" width="120">
    43. <template slot-scope="scope">
    44. <span>{{ toFixed(scope.row.expense) }}</span>
    45. </template>
    46. </el-table-column>
    47. <el-table-column
    48. prop="shareUserName"
    49. label="发起共享人"
    50. width="140"
    51. show-overflow-tooltip
    52. >
    53. </el-table-column>
    54. <el-table-column prop="StartTime" label="时间" width="170">
    55. <template slot-scope="scope">
    56. <span>{{
    57. scope.row.StartTime ? scope.row.StartTime.substring(0, 16) : ""
    58. }}</span>
    59. </template>
    60. </el-table-column>
    61. <el-table-column prop="status" label="状态" width="110">
    62. <template slot-scope="scope">
    63. <div
    64. :style="{
    65. color: showStateFun(scope.row.status).color,
    66. backgroundColor: showStateFun(scope.row.status).color,
    67. }"
    68. class="status-icon"
    69. ></div>
    70. <span
    71. :style="{
    72. color: showStateFun(scope.row.status).color,
    73. }"
    74. >{{ showStateFun(scope.row.status).text }}</span
    75. >
    76. </template>
    77. </el-table-column>
    78. <el-table-column prop="isChecked" label="aab" width="120">
    79. <template slot-scope="scope">
    80. <span>{{ scope.row.isChecked === 1 ? "是" : "否" }}</span>
    81. </template>
    82. </el-table-column>
    83. <el-table-column prop="aaa" width="265">
    84. <template slot="header">
    85. <div class="aaa-style">
    86. <div>设置</div>
    87. <el-tooltip
    88. class="item"
    89. effect="dark"
    90. content="设置XXX"
    91. placement="right"
    92. >
    93. <i class="el-icon-info"></i>
    94. </el-tooltip>
    95. </div>
    96. </template>
    97. <template slot-scope="scope">
    98. <span>{{ changeTypeFun(scope.row.aaa) }}</span>
    99. </template>
    100. </el-table-column>
    101. <el-table-column fixed="right" label="操作" width="280" align="center">
    102. <template slot-scope="scope">
    103. <span style="margin: 0px 10px">
    104. <el-button type="text" size="small" v-if="scope.row.downFlag === 1"
    105. ></el-button
    106. >
    107. <el-button
    108. type="text"
    109. size="small"
    110. v-else-if="scope.row.downFlag === 0"
    111. ></el-button
    112. >
    113. <el-button type="text" size="small" v-else disabled>下架</el-button>
    114. </span>
    115. <el-button type="text" size="small">价格</el-button>
    116. <el-button type="text" size="small">{{
    117. scope.row.isChecked ? "1" : "2"
    118. }}</el-button>
    119. </template>
    120. </el-table-column>
    121. </el-table>

  • 相关阅读:
    10 个最佳免费 PDF 压缩工具软件
    静态内存与动态内存 & malloc函数动态分配内存
    多级缓存架构
    C. Number Game(博弈)
    Java面试题03
    Solidity中的calldata,storage,memory
    Vue 2 如何添加 register-service-worker 以实现缓存请求的目的
    跨平台|融云 React Native IM SDK 全新改版上线
    最近学习内容(2023-10-22)
    大型医院容灾备份平台建设与应用实践
  • 原文地址:https://blog.csdn.net/jieweiwujie/article/details/127614196