ElementUI で el-table-column のデータをフォーマットするには 2 つの方法があります

① 最初のメソッドは、formatter="formatCashDate" を使用してフォーマットされます。

<el-table-column property="cashDate" label="" width="140" :formatter="formatCashDate"></el-table-column>
    // 格式化实际回款日期
    formatCashDate(row, column) {
     
    },

②2番目の方法

<el-table-column property="cashDate" label="" width="140">
            <template slot-scope="scope">
              {
   
   { formatCashDate(scope.row) }}
            </template>
          </el-table-column>
  // 格式化实际回款日期
    formatCashDate(row) {
     
    },

 

 

 

おすすめ

転載: blog.csdn.net/kobe_IT/article/details/130222016