How to Control data Wrap in table by element-ui

  1. Project needs to wrap the newly appended data in table
  2. some related codes
<el-table style="width: 100%" :data="tableData">
  <el-table-column prop="dishName" label="" width="200px"></el-table-column>
  <el-table-column prop="amount" label="" width="50px"></el-table-column>
  <el-table-column prop="money" label="" width=50px></el-table-column>
</el-table>
                
<script>
export default {
  data() {
    return {
      tableData: [{
        dishName: "ewqewqe",
        amount: 1,
        money: 30
      }, {
        dishName: "",
        amount: 2,
        money: 60
      }]
    };
  }
};
</script>
  1. expected effect

clipboard.png

  1. tried to add rn to the dishName string, but failed to achieve the effect
Feb.22,2022

< el-table-column prop= "dishName" label= "dish name" width= "200px" >

<template slot-scope="scope">
    {{scope.row.dishName}}
    <div v-if="scope.row.rn">
        {{scope.row.rn}}
    </div>
</template>

< / el-table-column >


use < template slot-scope= "scope" > < / template >


< el-table-column prop= "dishName" label= "dish name" width= "100" >

<template slot-scope="scope">
    

{{scope.row.dishName}}

<p v-if="scope.row.notSpice!=''" style="color:red;">{{scope.row.notSpice}}

</template>

< / el-table-column >
< script >
export default {
data () {

return {
  tableData: [{
    dishName: "ewqewqe",
    amount: 1,
    money: 30,
    notSpice: ''
  }, {
    dishName: '',
    amount: 2,
    money: 60,
    notSpice: ''
  }]
};

}
};
< / script >


https://element.eleme.io/-sharp/zh.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eae461-21bf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eae461-21bf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?